Multiple jobs writing to a single file

Hi,
My program requires me to create 20 jobs. Each job needs to write into a single file on the application server. I have tried using open dataset, transfer and close dataset approach but it doesn't work.
I open the data set before submitting the report via jobs. in the each job the there is the transfer statement. When all jobs are completed close data set statement is triggered.
When i run this code the jobs give a dump at the transfer statement stating that the data set is not open.
Can anyone suggest a different approach to achieve this. I need to create a single file with all the processing details retrieved from the jobs.
PS: I have also tried using EXPORT LIST TO MEMORY while submitting, but it gives me an error that we cannot use use this when submitting the report via jobs.

The batch job cannot share the OPEN DATASET of the caller...
You must open the DATASET in each job, and only one job at any time can do this if you  dont want unpredictable results.
Lock
Manage error code during OPEN form if another job is currently filling the dataset (DO/ENDDO) - Lock during OPEN/TRANSFER/CLOSE
Locks
The database interface does not have an integrated lock mechanism to ensure that only one ABAP program accesses a file at any one time. If several programs simultaneously gain write access to a file, this will have unpredictable results.
To avoid this situation, SAP locks can be assigned, or unique file names such as GUIDs can be used.
Look for an existing lock object or create a new one to insure this.
OPEN DATASET Syntax
OPEN/TRANSFER/CLOSE at end of each job to minimize lock time. Use FOR [APPENDING|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_ACCESS.htm#&ABAP_ALTERNATIVE_2@2@] in [OPEN DATASET|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET.htm] statement
Regards,
Raymond

Similar Messages

  • Problem in reading no. of files and writing into a single file

    Hi,
    Iam with Problem in reading no. of files and writing into a single file....
    Iam reading no. of files stored in local directory.......
    Iam able to read and print the data in files successfully....but while writing..only first file is being written...and the next files are not written in my output file...
    plz tell me my mistake....I hope Iam doing some mistake while writing into file...PLz help.....
    Basically my code structure is like this....
    import java.io.*;
    import java.util.regex.*;
    import java.util.*;
    import java.text.*;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    class Writing {
    public static void main(String args[]) throws Exception {
              FileOutputStream fileOut = new FileOutputStream("ServerResult.xls"); //my output file
              int counter = 1;
              File dir = new File("C:/Perform/ServerLogs");
              String[] children = dir.list();
              if( children == null)
                   System.out.println("The Directory mentioned does not exist");
              else {
                   for (int fileNo = 0; fileNo < children.length; fileNo++ ) {        //Files iteration starts
                        String filename = children[fileNo];
              File logFile = new File(filename);
    FileReader logFileReader = new FileReader(logFile);
    BufferedReader logReader = new BufferedReader(logFileReader);
    StringBuffer sBuf = new StringBuffer(5000);
              HSSFWorkbook wb = new HSSFWorkbook();          
              HSSFSheet sheet = wb.createSheet();
              HSSFRow rowTitle;
              HSSFRow rowReq;
              HSSFRow rowRes;
    String aLine = null;
    boolean skip = false;
    boolean readed = false;
    boolean initReq = false;
              boolean flag = false;
    long requestTime = 0;
    long responseTime = 0;
    long recdTime = 0;
    long sentTime = 0;
              long hasTime = 0;
              long presentTime = 0;
              int hasCalls = 0;
    Pattern startMessage = Pattern.compile("^<MESSAGE.*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern requestMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<ActName>(.*)</ActName>.*", Pattern.DOTALL);
    Pattern requestMessage1 = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<Svc id=\"(.*)\">.*", Pattern.DOTALL);
    Pattern responseMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern initMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"HostConnInit\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    Pattern initResMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*", Pattern.DOTALL);
    Pattern initResIDMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*<IATA>"+args[0]+"</IATA>.*", Pattern.DOTALL);
              Pattern sentMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgSentInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
              Pattern rcvdMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgRcvdInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    DecimalFormat dcf = new DecimalFormat("########.##");
    String actName = "";
              if (fileNo ==0)
              rowTitle = sheet.createRow((short)0);
              rowTitle.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)0).setCellValue("Req/Res");
              rowTitle.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)1).setCellValue("Action");
              rowTitle.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)2).setCellValue("Server Time(in ms)");
              rowTitle.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)3).setCellValue("Request Vs Response Time in Server(in ms)");
              rowTitle.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)4).setCellValue("Time Taken By HAS/HOST(in ms)");
              rowTitle.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)5).setCellValue("No. of HAS calls");
              rowTitle.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
              rowTitle.createCell((short)6).setCellValue("Data Size");
              //wb.write(fileOut);
    while((aLine=logReader.readLine()) != null) {
    if(aLine.startsWith("<MESSAGE TYPE=\"EVENT\"")) {
    Matcher m = startMessage.matcher(aLine);
    if(m.find()) {
    sBuf.setLength(0);
    sBuf.append(aLine);
    skip = false;
    initReq = false;
    m = initMessage.matcher(aLine);
    if(m.find()) {
    initReq = true;
    } else {
    if(initReq) {
    m = initResMessage.matcher(aLine);
    if(m.find()) {
    sBuf.setLength(0);
    sBuf.append(aLine);
    skip = false;
    } else if(aLine.startsWith("</MESSAGE>")) {
    if(!skip) {
    sBuf.append(aLine);
    readed = true;
    } else if(!skip){
    sBuf.append(aLine);
    if(!skip && readed) {
    String tempStr = sBuf.toString();
    if(tempStr.length() > 0) {
    boolean reqMatched = false;
    Matcher m = null;
    if(initReq) {
    m = initMessage.matcher(tempStr);
    actName = "Intialization";
    } else {
    m = requestMessage.matcher(tempStr);
    String time = "";
    if(m.find()) {
    reqMatched = true;
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    if(i == 1) {
    time = groupStr;
    } else if(i == 2) {
    actName = groupStr;
    } else if(!initReq){
    m = requestMessage1.matcher(tempStr);
    if(m.find()) {
    reqMatched = true;
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    if(i == 1) {
    time = groupStr;
    } else if(i == 2) {
    actName = groupStr;
    if(time.length() > 0 ) {
    try{
    requestTime = sdf.parse(time).getTime();
    }catch(Exception ex){}
    System.out.println("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
                                  //bw.write("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
                                  String reqDataSize = dcf.format(((double)time.length()/1024.0))+"K" ;
                                  rowReq = sheet.createRow((short)counter);
                                       rowReq.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)0).setCellValue("Request");
                                       rowReq.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)1).setCellValue(actName);
                                       rowReq.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)2).setCellValue(time);
                                       rowReq.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)3).setCellValue("");
                                       rowReq.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)4).setCellValue("");
                                       rowReq.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)5).setCellValue("");
                                       rowReq.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
                                       rowReq.createCell((short)6).setCellValue(reqDataSize);
                                       counter = counter +1;
                                       System.out.println("counter is "+counter);
                             Matcher l = sentMessage.matcher(tempStr);
                             Matcher k = rcvdMessage.matcher(tempStr);
                   if(l.find()) {
                                            for (int i=1; i<=l.groupCount(); i++) {
         String groupStr2 = l.group(i);
    try{
    sentTime = sdf.parse(groupStr2).getTime();
    }catch(Exception ex){}
                        if(k.find())
                                                 for(int j=1;j<=k.groupCount(); j++) {
                                                 String groupStr1 = k.group(j);
                                                 try{
    recdTime = sdf.parse(groupStr1).getTime();
    }catch(Exception ex){}
                                                 presentTime = (recdTime - sentTime);
                                                 hasTime = hasTime + presentTime;
                                                 hasCalls = hasCalls +1;
    if(!reqMatched) {
    if(initReq) {
    m=initResIDMessage.matcher(tempStr);
    } else {
    m=responseMessage.matcher(tempStr);
    if(m.find()) {
    for (int i=1; i<=m.groupCount(); i++) {
    String groupStr = m.group(i);
    try{
    responseTime = sdf.parse(groupStr).getTime();
    }catch(Exception ex){}
                                                 String resDataSize = dcf.format(((double)tempStr.length()/1024.0))+"K" ;
                                                 rowRes = sheet.createRow((short)(counter));
                                                 rowRes.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)0).setCellValue("Response");
                                                 rowRes.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)1).setCellValue(actName);
                                                 rowRes.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)2).setCellValue(groupStr);
                                                 rowRes.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)3).setCellValue((responseTime - requestTime));
                                                 rowRes.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)4).setCellValue(hasTime);
                                                 rowRes.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
                                                 rowRes.createCell((short)5).setCellValue(hasCalls);
                                                 rowRes.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
                                                 rowRes.createCell((short)6).setCellValue(resDataSize);
                                                 hasTime = 0;
                                                 hasCalls = 0;
                                                 counter = counter + 1 ;
    sBuf.setLength(0);
    readed = false;
              wb.write(fileOut);
              } // End of for (int fileNo = 0; fileNo < children.length; fileNo++ )
    }     //End of else
              fileOut.close();
    } //End of public static void main
    } // End of Class

    First of all, use [code]-tags to make your code readable, please.
    I didn't do a complete inspection of your code (because it's too much and unreadable as it is) and I don't know POI, but creating a new HSSFWorkbook for each input file sounds fishy to me ... try re-using the workbook and just creating a new sheet in each iteration.

  • Multiple ISA's in a single file while batching outbounds

    Hi,
    Here is a peculiar scenario.
    We have few customers which send PO through a third-party TP. Though we get these files from a third-party vendor, the orders will still contain the acutal customer sender id's. So we have configured a single Trading partner setup in B2B for this third-party vendor and before we feed the file to B2B, we are flipping the sender id(TEMP_TP) in ISA segments, so that B2B can identify and process the file.
    While sending the outbounds back to B2B, we are over-riding the ISA SenderId value using Internal properties from BPEL from the common TEMP_TP to actual customer sender ids. This is to avoid the development of external pos-processing logic to re-flip the TP to individual customer names.
    We have also enabled time-based batching for this trading partner. However when B2B batches the outbound file, it creates MULTIPLE ISAs for each sender id and writes all of them in a single file.
    I understand that there have to be multiple ISAs if there are more than one Sender id, but my problem is i don't want to have multiple ISAs in the single file. Is there any setting to be done for each of these ISAs to be created in different file. I would like to have only one ISA in a file though the batching is enabled.
    Please suggest
    Thanks,
    Phani

    Eng,
    Thanks for your response.
    When we send each ST/SE segment to B2B from BPEL, we are overriding the ISASenderId property by setting a value in Internalproperties.
    This value will not be same if the order belongs to different customers. So when such orders(ST/SE) with different Over-ridden sender Ids are being batched in B2B(they will be sent to a single TP) , it creates a single file with multiple ISA segments, by batching all the ST/SE belonging to one senderid in each ISA.
    Regards,
    Phani

  • Multiple Idocs (DEBMAS06) into one single file

    Hi All,
    Multiple Idocs(DEBMAS06) are sent from SAP in bulk to be sent to FTP server via XI...(Cannot use Append the file as The structure is with Header,Detail(all the idoc details) and Trailer)
    I have seen different threads which speaks about the same,
    But Please suggest me the best approach to proceed with this kind of scenario...
    Multiple IDocs -> XI -> Flat file which is speaking about BPM and also Packaging(SAP note 814393)
    and https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b
    (How Tou2026 Send Multiple IDocs Within One XI Message)
    I prefer not to use BPM... but if required then....
    Please suggest me which is the best approach to proceed with it..
    Thanks and Regards,
    Sridhar Reddy

    Hi ,
    I had tried the scenario Multiple IDOC's coming from R/3 and send all of them into a Single File
    But it did not work...
    Of course i changed as Micahel mentioned in
    The specified item was not found.
    (Collect and make pack size to 50) but still the idocs are posting as 50 messages in XI and 50 files are being created ...
    But as per his remarks we need customization which is very difficult...
    And also i checked Michaels blog
    The specified item was not found.
    But this is dicussing reverse of my scenario...
    and finally i am thinking of going with the stefens weblog...
    Collecting IDocs without using BPM
    Can any one please suggest any other best way to handle this...
    Instead of going for BPM i am implementing as Stefen suggested ... This is because we have many such interfaces where SAP sends collective idocs....
    Regards,
    Sridhar Reddy
    Edited by: sridhar reddy kondam on Oct 22, 2008 6:20 AM

  • How to create multiple modules in quizzes in single file?

    Hi,
    Can someone guide me how to create a multiple module quizzes under one captivate file ( captivate 5.5 ver)
    I have a quiz.cptx file with 50 questions from different chapters A,B,C,D,E with 10 questions in each chapter.
    The scenario
    Note : min 80% score  per chapter is the passing criteria
    1. Start the quiz after login and password
    2. Start the quiz for chapter A ( 10 questions)
    3. score for chapter A should be displayed
    4. If "cpQuizInfoPointsscored"'s  value < = 40 ; ie 80 % for chapter A
             review of the failed questions in the chapter
             OR
             retake quiz for that chapter should be triggered,
       else goto chapter B
    5. Start the quiz for chapter B ( 10 questions)
    3. score for chapter B should be displayed
    5. If "cpQuizInfoPointsscored"'s  value < = 40 ; ie 80 % for chapter B
             review of the failed questions in the chapter
             OR
             retake quiz for that chapter should be triggered,
       else goto chapter C
    6. //rly with other chapters
    7. After passing all chapters the result should be printer based on the scores.
    Is there any better ideas to crack the steps 4 - 6, bcz i am not able to reset the value of "cpQuizInfoPointsscored"; which is incremented as each question is completed.

    Welcome to the forum,
    Agree totally with Rod, this can be done with advanced actions (have some examples on my blog), but it is a lot of work. And the Quizzing system variables such as cpQuizINfoPointsscored are all read only, no way to change them by advanced actions at all.
    If you want to transfer variable values from one file to another, like from the different quiz files to a main file (to take decisions over there about possible branchings), you should have a look at Michael Lund's Save & Load Data widget:
    Save & Load Data widget
    Lilybiri

  • Reading a multiple record types from a single File using BPEL file adapter

    Hi all.
    We have a requirement where we want to read a CSV file using the BPEl adapter.
    Following is the sample of csv file
    HDR,1,2,3
    ---- First transaction starts----
    TH,1,2,3
    RSD,1,1
    RSD,1,1
    TD,1
    -------Second transaction starts---
    TH,1,2,3
    RSD,1,1
    RSD,1,1
    RSD,1,1
    RSD,1,2
    TD,1
    TD,1
    -------------Third Transaction starts---
    TH,1,2,3
    RSD,1,1
    TD,1
    TD,1
    TD,1
    TD,1
    -------------Fourth Transaction starts---
    TH,1,2,3
    LN,1,1,1,1,2
    -----End of File---
    TAIL
    I have modified the file with some comments to have some clear understanding.
    Basically our file is a transactions file from legacy system & contains mutliple transactions
    First line will be a Header record starting "HDR" & contains all summary details about the file.
    After it is details of all transactions thorughout the day, each transaction begins with record starting "TH".As shown in all transactions above.EAch transaction can have other multiple records like the RSD & TD shown above.
    Our need is to read each transaction from the file & create an instance.How can we configure BPEL to grab the data starting with TH till it encounter's another TH.
    Please advise
    Krunal

    You can't use the wizard to create a schema if a file as complex as this. the good news is that you can create one yourself. What you need to do is create standard xsd that will handle your file, then what you do is add the terminators that determine when a field stops.
    Here is an example, hopefully this provides you enough infor for you to make your own.
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://Invoice"
    xmlns:tns="http://Invoice"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:encoding="ASCII"
    nxsd:stream="chars"
    nxsd:version="NXSD">
    <xsd:element name="Invoice">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="InvoiceHeader" nxsd:startsWith="000" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="tns:InvoiceHeaderDetails" />
    <xsd:element ref="tns:LineItem" nxsd:startsWith="001" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="InvoiceHeaderDetails">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="InvoiceNo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="16" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="InvoiceDate" type="xsd:string" nxsd:style="fixedLength" nxsd:length="15" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="VendorNo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="29" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="OriginCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="OperatorID" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="LineCount" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="34" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="GrossAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="17" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="DiscountAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="50" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="FreightAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="93" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="TaxAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="50" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="DiscountFlag" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="LineItem">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="LineItemDetails">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="InvoiceLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="DistributionCount" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="BusinessUnitPO" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="PONo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="POLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="38" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="InvoiceLineAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="17" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element ref="tns:Distribution" nxsd:startsWith="002" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Distribution">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="InvoiceLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="DistributionLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="GLAccountCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="84" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    <xsd:element name="DistributionAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="162" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="DistributionTaxAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="62" nxsd:paddedBy=" " nxsd:padStyle="tail" />
    <xsd:element name="GLDepartmentCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    cheers
    James

  • How to produce a single file per one IDOC?

    Hi Experts,
    I have a scenario where I need to create a file for one IDOC. Suppose if the IDOC contains multiple IDOCS then I need to produce multiple files. How can be done using FCC?
    Secondly If there are multiple IDOCs in to a single file how can I have a new line after each record with a deliminator at the end of the last field?
    Thanks
    Rajeev.

    Hello Rajeev,
    I have a scenario where I need to create a file for one IDOC. Suppose if the IDOC contains multiple IDOCS then I need to produce multiple files. How can be done using FCC?
    In order to achive this you can use MultiMappiing,
    - If you have multiple IDOCS at source side, you need to add those at source message type in MessageMapping and map to the file.
    check the following link how multimapping is achived.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Secondly If there are multiple IDOCs in to a single file how can I have a new line after each record with a deliminator at the end of the last field?
    As far i know i don't think it is possible i can't find any option at receiver FCC anyway look at this blog once
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    Regards,
    Prasanna

  • Multiple systems writing to single csv file

    I am preparing to have two identical test systems that test a single product go into service side by side.  There has been one or the other of these in service for a number of years but due to volume, both must now operate in parallel.
    The sticky point on this is that results are written to a CSV file and the file can only be opened by one caller at a time (whether one of the systems or a user).   My first approach is somewhat klunky but I think it may work.
    When system 1 is ready to save, it creates a temp file based on it's stand ID.  It then looks for the comparable temp file from system 2. If it sees it, system 1 goes into a loop for what should be adequate time for system 2 to write and exit and then system 1 writes and at the end deletes it's tmp file.  If system 2 tmp file stays longer than the allowed for time, system 1 returns an error to the user that data was not saved and continues on. (same thing on other system with numbers switched)
    As I say, it's klunky.
    For this product, the csv format is preferred by production and because both machines will be running a single work order, they want the data to go into a single file.
    Any alternative methods I should be considering ?
    Thanks for any input.
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."

    I fully agree with RavenFan's idea of making another application just for writing the file.  It greatly simplifies the process.  I would also recommend using the STM library to make the TCP/IP communications easier to understand.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Need help (desperately) '^_^ in writing multiple objects in a single file

    For all those Java guru out there please help me,
    I want to write a simple application that can serialize objects in a single file. Currently I know how to serialize one object in one file using the ObjectOutputStream's writeObject () method.But the problem is that if i have 10.000 objects to serialize then I will have 10.000 file in my HD. To simplify things I want to write those 10.000 objects in a single file. But I dont know how to do that, any one can help ??

    You can write any number of objects of any type into a file when you serialize them. You need to realize that once they're written to the file, they're all placed in there as type Object, so there really isn't any distinction between any of them. You don't have a file that contains only Shapes, or only Images. You write them out as Objects, and then you discover their types later as your deserialize them and read them in. You should read into the "Reflection" capabilities that all objects have. You write an Image to a file, and then a Shape, and then a Color, you can later pack these all into an ArrayList as you read them in, and when you use them discover their type using reflection.
    -Jason Thomas.

  • Multiple files in different directory using single FILE adaptor

    Hi Guys,
    How can we handle multiple files having different format(PDF,TXT,EXCEL) and in different directory with the single FILE adaptor.
    I know by using "." we ca get mutilple files, but here tthe files are of different format and in different directory.
    Could you please explain as to how we can handle this scenarios?
    Thanks
    Sahil

    Hi,
    The short answer is - "No".
    The Long Question - "Why do you want to use a SINGLE channel".
    If your idea is to reuse the interface then dont worry... Except for the Senderchannel and Sender agreement all your other objects can be reused ...provided your sender apter converts the different files into the same XML format..
    For TXT you can use the simple file adpater..
    For excel see if you can use save the file as .CSV format...then you can use it directlky by the simple FIle adapter..
    For PDF use conversion agent... Here a blog to get u started on that ->
    /people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
    regards
    Arvind R

  • Scanning multiple pages to single file

    I have the HP Officejet Pro 8600.  I use to be able to scan multiple pages to one file.  For some reason now it separates the pages into single files.  Under advanced settings it looks like the option "create a separate file for each scanned page" is checked, however, it is not highlighted so I can't change it or uncheck it. 

    KB-Sales,
    Welcome to the HP Forum.
    Assuming a recent Windows Operating System and that you install the Full Feature Software (printer software), then you may use the Printer Assistant shortcut to access Scan Document or Photo.
    From there, you may be able to use / create a Scan Template to combine files to output to a final, single file.
    The following Dragon Document may help:
    Scan_Multiple_Documents-Combine
    Note the hint about creating your own Shortcut / Template in the instructions.
    Click the Kudos Thumbs-Up to show you appreciate the help and time from our Experts.
    Although I strive to reflect HP's best practices, I do not work for HP. 
    Click Accept as Solution when the Answer is a good Fix or Workaround!
    Kind Regards,
    Dragon-Fur

  • How to spool out put of multiple scripts and get a single spool file output

    Hi,
    I have one master script that calls three other scripts. The three scripts each produce their own spool files. But I would like to have the master script also produce one single output (in addition to the three indiviual output I mean). How to do that? Can you please help.
    Following are the scripts:
    --m.sql (master script)
    spool c:\m.log
    @1.sql
    @2.sql
    @3.sql
    spool off
    --1.sql
    spool c:\1.log
    insert into test values(1);
    commit;
    spool off
    --2.sql
    spool c:\2.log
    insert into test values(2);
    commit;
    spool off
    spool c:\3.log
    insert into test values(3);
    commit;
    spool off
    --table used
    SQL> desc test
    Name                                      Null?    Type
    A                                                  NUMBERWhen I run the above script m.sql it does produce the other 3 log files (1.log,2.log etc) but m.log (which is master log file which should have output of each of the three calling script) is empty file with 0 byte!
    Thanks
    Edited by: orausern on May 1, 2011 3:17 AM

    I have one master script that calls three other scripts. The three scripts each produce their own spool files. But I would like to have the master script also produce one single output (in addition to the three indiviual output I mean). How to do that? Can you please help. Not sure if that's possible directly with sqlplus spool option
    When you spool to a different file in a single session, sqlplus stops writing to earlier spool file and redirects the output to the file specified in last spool command.
    at the end of the script, however, below may help
    host type c:\1.log >> c:\m.log
    host type c:\2.log >> c:\m.log
    host type c:\3.log >> c:\m.log

  • Multiple FileChannels on a Single File

    I wonder if anyone could help on this please: is it possible to have multiple filechannels on single file, basically I have a RandomAccessFile where I got my FileChannel from , any attempt for a getChannel on this RandomAccessFile object always return a unique FileChannel same as the previous one. is there anyway to get deferent FileChannels ? or may be any other way to get around this?

    Thanks Alan, for the replay, but actually I do not want to open the file many times, if I would to use what you have suggested: " FileChannel fc1 = new RandomAccessFile(f, "rw").getChannel();
    FileChannel fc2 = new RandomAccessFile(f, "rw").getChannel();"
    then this will open the file "f" many times.
    my question is : I would like to open the file once by " RandomAccessFile raf = new RandomAcessFile(f, "rw")" and then how could I get multiple channels on this raf ?
    any time I call raf.getChannel() it return a unique FileChannel object, say:
    FileChannel fic1 = raf.getChannel(); FileChannel fic2 = raf.getChannel();
    fic1 and fic2 are eventually the same, so any attempt to manipulate fic1 would affect fic2; say the cursor position and so on.

  • Multiple labels on a single file?

    Is there a way to place multiple labels on a single file? I'd like to be able to sort files based on several partially overlapping criteria. Thanks.

    Files can only have one name.

  • How to put multiple classes in a single file?

    Hello,
    I'd like to put mutliple classes in a single file. (This
    would be useful for grouping children that are minor extensions of
    parent classes or helper classes that are used by one class only).
    When I tried to put two classes in one file, I got this error
    message:
    5006: An ActionScript file can not have more than one
    externally visible definition: Notation.editField,
    Notation.labelField1
    This is the structure I used. Thanks in advance for your
    help.

    You can declare multiple classes in a single file, but only
    one can be
    within the package declaration. All class declarations
    outside the package
    are invisible to code outside the file.
    package sample
    public class SampleClass
    class SampleClassHelper
    class SampleClassHelper2

Maybe you are looking for