Multiple records in a single file

Hello,
Source IDOC :
Segment1
+fld1
+fld2
+fld3
+fld4
Destination field:
parent
+material
++field1
Now I want fld1,fld2,fld3,fld4(from source IDOC) to be mapped with field1 of the target file structure
In such a way that it should create 4 seperate output records in a file if 4 fields exists
same way if 3 fields exists (out of 4) in the source IDOC, it should create only 3 target records inside the target file. and so on...
Any idea as how do I do it?
thanks and regards,
Nikhil.

well,
I got the solution with createif
thanks anyways

Similar Messages

  • Multiple records for a single transaction - Issue in LSMW

    Hi,
    i'm facing a issue in LSMW
    i have the data coming up in the flat file. the data which constitutes the single transaction consists of  data from multiple records from the flat file..
    suppose we have 10 records in the flat file... and all the 10 records related to ony  2 transactions i.e say 6 records to first transaction and next 4 records to next transaction.
    we have a direct input method to handle this data like field1 for first record, field2 for 2nd record and so on...
    while uploading, we will get all the records one by one into our source structure. My question is can we handle this scenario in lsmw? if yes, pls suggest
    Thanks in advance
    Shekhar

    Hi Kris,
    this is regarding the asset creation via AS01..
    we are getting the flat file in that way. Lets assume like this:
    suppose for one transaction we may need to fill 5 depreciation keys and for another option only 3 dep. keys we need to fill.
    then in the flat file, we can get like 5 records for first transaction i.e asset and 3 records for 2nd transaction
    Can we handle this via lsmw
    Regards
    shekhar

  • Concatenate multiple records into one single record

    Hello everyone,
    Can anyone guide me how to merge multiple records into one single record
    like......... I am getting the data in the file like
    aaaaa/bbbbbbb/ccccccccccc/dddddddddddd/eee
    ffffff/gggg/hhhhhhhhhhhhhh
    /123/4567/55555/99999999/kaoabfa/eee
    fffff/kkkkkkkk/llllllllllllllllllllllll
    when i use gui_upload I am getting the data into the internal table in the above format.
    My main intension is to split the record at / to multiple lines and dowload it into another file.
    What i am planning to do is... if the line does not start with / then i want to concatenate the multiple lines into single line and then split it into multiple records. Can anyone guide me how to achieve this.

    Yes, it should work.
    In my example
    Loop at itab.
    concatenate i_text itab into i_text.
    endloop.
    You change that loop for the loop of your internal table with the file records
    So if you have this three records
    'aaaa/bbb/ccc'
    '/dddd/efg'
    'hijk/lmn'
    i_text will look like this at the end
    'aaaa/bbb/ccc/dddd/efghijk/lmn'
    then in this part of the code
    split i_text at '/' into table itab2.
    itab2 will have the records looking like this
    aaaa
    bbb
    ccc
    dddd
    efghijk
    lmn'

  • 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.

  • MessageTransformBean - SimplePlain2XML - Multiple records on a single line

    Hi,
    I am trying to convert multiple record from a single line to multipe rows in an XML message with the MessageTransformBean.
    If the record look like this it's working:
    RECORD1textETC
    RECORD2textETC
    But the incoming message are all on a single line:
    RECORD1textETCRECORD2textETC
    Is there a way to add a linefeed to my incoming message after X characters, or to tell the adapter to split by length instead of spliting on the end of line?
    Thanks,
    Martin

    I had to code a custom Module Adapter to do it.
    Here's the main part of the module adapter EOLConvertBean...
    Message msg = (Message) inputModuleData.getPrincipalData();
    XMLPayload xmlpayload = msg.getDocument();
    byte[] content = xmlpayload.getContent();
    byte crlf = 0x0A; // end of line char
    int current = 0;  // current bytes read     
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int lines = content.length / recordLen; // record len = insert EOL after X recordLen
    // TODO change for do while for 1x line record
    for (int i = 0; i <= lines; i++) {
         baos.write(content, current, recordLen);
         baos.write(crlf);
         current += recordLen;
    xmlpayload.setContent(baos.toByteArray());
    inputModuleData.setPrincipalData(msg);
    Edited by: Martin Lavoie Rousseau on Oct 6, 2010 9:08 PM

  • 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

  • How can i scan multiple pages in a single file in pdf.

    How can i scan multiple pages in a single file in pdf using 1536 dnf.

    Hi @veerendrajain ,
    I see that you would like to save multiple PDF documents into one file. I would like to help you out today.
    In the HP Scan Software, select Advanced scan settings, click on the File tab and uncheck Create a separate file for each scanned image.
    Hope this helps.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How to insert multiple records in a single query

    Dear all,
    Can you please tell
    how to insert multiple records in a single query ??

    INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
    INSERT INTO table_name
    (column_1, column_2)
    SELECT 'value_A', 'value_B' FROM DUAL
    UNION ALL
    SELECT 'value_C', 'value_D' FROM DUAL
    ;Edited by: Benton on Nov 9, 2010 1:59 PM

  • Multiple records as a single transaction in JDBC Receiver Adapter

    Hi,
    I am sending multiple records in a single message to a JDBC receiver adapter to get updated to the database. How to make all the insert a single transaction. Like all the records has to be inserted else all has to be rolled back.
    For eg for table Employee two fields EMPNO and EMPNAME
    EMPNO  EMPNAME
    1            Jay
    2            Christie
    These two records are in the same message and has to be updated
    if one fails the other has to be rolled back.
    How can i achieve it using a JDBC Receiver Adapter.
    Thanks
    Sebin

    Hi Rolf Micus,
    My xml structure to insert 2 tables are as follow:-
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_PODB xmlns:ns0="http://abeam.com/xi/fer_filejdbc_scenarios1">
    ..   <STATEMENT_HEADER>
    ....      <ROW action="INSERT">
    ......         <TABLE>ZPO_HEADER</TABLE>
    ......        <access>
    ........            <PONUMBER>001</PONUMBER>
    ........            <PODATE>20070801</PODATE>
    ........            <POAMOUNT>200.99</POAMOUNT>
    ....         </access>
    ....      </ROW>
    ..   </STATEMENT_HEADER>
    ..   <STATEMENT_DETAIL>
    ....      <ROW action="INSERT">
    ......         <TABLE>ZPODETAIL</TABLE>
    ......         <access>
    ........            <PONUMBER>001</PONUMBER>
    ........            <PONO>1</PONO>
    ........            <POITEMCODE>A12345</POITEMCODE>
    ........            <POITEMDESC>Testing A</POITEMDESC>
    ........            <POITEMAMOUNT>2990.00</POITEMAMOUNT>
    ........            <POITEMQTY>55</POITEMQTY>
    ......         </access>
    ....      </ROW>
    ..   </STATEMENT_DETAIL>
    </ns0:MT_PODB>
    Fro the structure that you have declared..there is only contained 1 statement, try to admend your MT to have 2 statements.
    If you wish to insert multiple records, just create a loop/multiple of access tag inside STATEMENT tag. For example, multiple records insert into Header should have multiple access tag in Header STATEMENT. Same goes for muliple records insert into Details STATEMENT should have multiple access tag in Details STATEMENT.
    With this structure, whenever any records insert/update/delete failed...it will rollback all the transactions together, ie. Header and Details.
    PS: For different table, please create different STATEMENT.
    Hope it helps.
    Message was edited by: Pua Ming Fei

  • Multiple accounting doc in single file - PROXY

    Hi,
    I am reciving multiple accounting doc in single file..
    MT_INPUT
    acc_doc1
    acc_doc2
    I need to send it seperately to PROXY.
    MT_INPUT
    acc_doc1
    MT_INPUT
    acc_doc2
    proxy needs to be called multiple times.....
    how to do this?
    Regards,
    Akshay.

    Hi Akshay,
    Create a 1..n mapping and 1..n interface mapping.
    You will then need to create an enhanced interface determination. (There is a radio button to select 'Enhanced').  The rest of you config will be the same.
    This will split your single message into several messages, which will be processed individually by the receiver proxy.
    Regards,
    Yaghya

  • 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.

  • Mapping is inserting multiple records from a single source to Dimension.

    Hi All,
    I am very new to OWB. Please help me out. I've created Dimension with the help of the wizard and then a mapping which consist of single source and single dimension. The mapping is populating nearly 500 times of the actual records. Following are some details to give you a better understanding of mapping: I created a dimension with four levels and two hierarchy. Levels are L1, L2, L3 and L4 and hierarchies are H1-> L1, L2 and L4
    and H2-> L3 and L4. L4 is lowest level of hierarchy. L1 and L3 are parent levels in the respective hierarchies. I assigned an attribute of each level as Business identifier that means business identifier attribute is different in each level. In mapping I mapped the parent natural key(Key for parent Level in a hierarchy) as the value which has been mapped for parent level. The result is coming 500 times of the record that exist in source table. I've tried even single common business identifier for each level but again the result is 5 times of the records. Please let me know the solution.
    Thanks is advance.
    Amit

    Hi ,
    You may not be having multiple records in your dimension.
    To understand better the records insertion, try a snow flake version of the dimension and see how the records are inserted as per the levels in the respective tables.
    Thanks

  • Multiple iDocs in a single file

    Hello,
    I'm working on some integration to send a purchase order change file into SAP from BizTalk.  Everything works when we send every change as its own iDoc, or when we send all changes for a single PO in a single file, but when we try and include multiple iDocs in a single send, we get an error that it has to many elements.  The definition below is of the idocData element which indicates it can send more than one:
    <xs:elementxmlns:q2="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/PORDCH03//711"minOccurs="1" maxOccurs="2147483647" name="idocData" nillable="true"type="q2:PORDCH03">
    A sample of the file:
    <?xml version="1.0"?>
    <ns0:Send xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:ns2="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/Common/" xmlns:ns1="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/PORDCH03//711" xmlns:ns0="http://Microsoft.LobServices.Sap/2007/03/Idoc/3/PORDCH03//711/Send">
         <ns0:idocData>
            <ns1:EDI_DC40>
            </ns1:EDI_DC40>
            <ns1:E2PORDCH000GRP>
            ......        </ns1:E2PORDCH000GRP>
        </ns0:idocData>
        <ns0:idocData>
            <ns1:EDI_DC40>
            </ns1:EDI_DC40>
            <ns1:E2PORDCH000GRP>
         </ns1:E2PORDCH000GRP>
        </ns0:idocData>
    </ns0:Send>

    Hey Josh,
    Hope your issue is fixed by now.
    If not please check the Inbound Process code of the Order which is triggering Idoc in the SAP System.
    You have to modify that as per se your need.
    Thanks.

  • Sending multiple IDocs (all in single file) to FTP via XI

    Hi All,
    We have a requirement as below where we are looking for various feasible solutions.
    The requirement is to collect multiple IDocs in ERP (2000-5000 in number) per day (either Flat File or XML) and needs to be sent as a single File (which has all these IDocs) to FTP Server via XI.
    BPM is not allowed to use and we are working on PI 7.0, so IDoc packaging is also not applicable. There is no mapping required, we need to just route them to FTP from ERP System.
    Looking forward for various solutions.
    Regards,
    N. Jayanth Kumar.

    Hi,
         Using the XML file port at R/3 to collect the Idocs would be a feasible solution. Also, as Sunil as already pointed out, you can configure this as a pass through interface, which will improve your overall processing time.
    Another solution can be to pass the Idocs to PI and then use the append mode in the receiver file adapter to collect the days idoc into a single file.
    To append only idocs for a particular day, try using dynamic filename, where file would have the date in it. This way, only Idocs for a particular day would be appended.
    Regards

  • M276 Unable to scan multiple pages into a single file

    Hi, just bought the Laserjet Pro 200 M276nw, and when I scan multiple-pages documents, it generates one PDF document for each page scanned, but I want this multiple pages into a single PDF file. Anyone can help? Thanks so much

    Yes it's possible.  Use the Image Capture app.  It has an option to scan PDF documents into a single file.

Maybe you are looking for

  • Can't open domain.sites2 in iWeb

    Hi, Can anyone help? My laptop crashed a the same time as my TM backups. I have managed to salvage my domain.sites2 file, but when I rebuilt the laptop and upgraded to ML, any time I try to open iWeb it says it cannot open file ~/domain.sites2. Thing

  • Adobe ribbon vanished from bar in excel

    Hope somebody can help me here. I am running Adobe 9, standard version on vista. I am also running MS Office 2007. We have been using the Adobe ribbon, or the button on the top of our excel spreadsheets for months. It has been a breeze creating .PDF'

  • Import US Per Diems from Internet  Travel Management

    Dear all! I hope someone can help me. I have problems with the IMG Activity "Import US Per Diems/Flat Rates from Internet" (Transaction PREP) Path is: Financial Accounting > Travel Management > Travel Expenses > Trip Reimbursement Amounts > Automatic

  • Help, I have a used imac not reading dvd/cd

    I bought i mac from a school replacing with newer ones. Doesnt read any cd/dvd. tried cleaning lense, disk utility and clearing caches. before i look into a usb external dvd drive is there a possibility dvd/cd use was prohibited. i do not have the in

  • Problem with OFFSET_GEOM_SEGMENT

    I'm having a problem trying to use the LRS offset segment function. Possibly I'm mis-interpreting the docs since I keep getting an incorrect ARC_TOLERANCE specification with both 10.1.0.4.0 and 10.2.0.1.0. What am I missing? SELECT SDO_GEOM.VALIDATE_