File to IDOC for multiple records

hi friends
   my requirement is to design a scenario for FILE to IDOC (for customers) say i have 120 customers. i have changed the XSD file for IDOC and strucked at Integration Process. can anyone guide me in BPM.
thanks and regards
suman.

hi,
you can search sdn for it.
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Single File to multiple IDoc
regards,
ujjwal kumar

Similar Messages

  • Mapping issue: FCC: Idoc for each record in file

    Hi,
    I have file to Idoc scenario.
    I receive csv file with multiple records.
    The requirement is to create an Idoc for each record.
    For eg.
    source file
    A1,B1,C1
    A2,B2,C2
    A3,B3,C3
    After FCC
    <MT>
    <TRANS>
    <ROW>
    <A>A1</A>
    <B>B1</B>
    <C>C1</C>
    </ROW>
    <ROW>
    <A>A2</A>
    <B>B2</B>
    <C>C2</C>
    </ROW>
    <ROW>
    <A>A3</A>
    <B>B3</B>
    <C>C3</C>
    </ROW>
    </TRANS>
    <MT>
    I have first tested it with only 1 record to test end to end connectivity. It works as expected and Idoc is posted to target system.
    Now when I am trying to send multiple records, I am getting some issues.
    Below are the steps that I have taken to process multiple records:
    1. Changed the cardinality of ROW (child of RecordSet) from 1 to Unbounded.
    2. Changed the occurance of Idoc to Unbounded.
    3. Mapped ROW to Idoc root.
    I have tested the mapping in IR and it generates multiple IDOCs.
    When I send the test file, it fails with error Tag found instead of tag IDOC BEGIN=
    I can see the xml message created with multiple ROWs in XI by File adapter in sxmb_moni.
    When I do Test Configuration in ID, with the XML message extracted from sxmbmoni, the result that I got was:_
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1></ns0:Message1></ns0:Messages>
    This means that idoc was not created while mapping.
    But the same sample message works OK in IR!
    Pls help where I have missed.
    Regards,
    Anirudh.

    Sudhir,
    Thanks for your response.
    FCC is working fine. I have taken the XML message in XI created after FCC from csv sample message.
    I have tested this message in IR by placing it between
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
    </ns0:Message1>
    </ns0:Message>
    It is working fine and Idocs are created in mapping in IR.
    But the same sample message is creating below output ID!
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1></ns0:Message1></ns0:Messages>
    Regards,
    Anirudh.

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

  • File to RFC with multiple records using BPM Scenario Error...!!!

    Hello Guru's,
      I have done the File to RFC with multiple records using BPM scenario as per the Materiel available in the sdn.sap. This involves BAPI (BAPI_MATERIEL_AVAILABILITY). I have done exactly the same what is their in the materiel. SXI_CACHE is also giving return value " 0 ". File is getting deleted from the source directory, but no file in target directory. SXMB_MONI is also showing no error (black Flag). BPM is also error free. Checked the interfaces also.
    Can any one tell me what mistake would i have done.
    Thanks in advance.

    Hi,
    There is one similar discussion I found,
    FTP TO RFC using BPM
    Thanks
    Swarup

  • Bapi_po_create is not creating Purchase Orders for multiple records in file

    Hi All.
    iam trying to create contracts and Purchase Orders  In me21n,me31k .
    here iam using bdc for contract creation against services and using bapi_po_create for PO Creations.
    in this process i could create contracts and POs for the first record in the file but for second record bapi_po_create couldnt create POs and the return table in bapi says
    1.document contains no items.
    2.no services or limits have been maintained.
    wil be waiitng for  r great answer.
    bye.
    regards.
    seeta.

    Hi Seeta Ram,
    Did you pass the table PO_ITEM_SCHEDULES to BAPI_PO_CREATE with the coresponding Item numbers for each item in the table PO_ITEMS?
    Regards,
    Vitz.

  • N:1 multimapping for multiple records in every file

    Hi ,
    I am merging 2 files into a single file. First file has employee personal data and second file has employee salary data.I have created BPM and used correlation on EmpNumber to merge both the files. In BPM I am using fork step to recieve two files then use Transform step to merge the files and finally send dtep to send the output file.
    If both the input files have single employee record my scenario works fine. However my requirenment is file one will have 10 employee records . File two will have salary details of the same 10 employees . I have to  merge both the files and create 10 final records of employees .
    Here i am not able to use correlation as i dont have unique key in the file.
    Can any one tell me how to achive this?
    Regards,
    Shabari

    Please check the below blog
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/10526
    Refer the blog for the BPM design. You can make changes such that you include a fork(with two branches)inside the loop.  But without correlation how will you merge similar employee records.

  • Mapping from File to IDoc with multiple Idocs and multiple line items?

    Hi All,
    Need some help with mapping, requirement as below: I have a flat file with multiple records, need to create multiple idocs per each separate order in flat file with as many line items.
    Order_1 field-1 field-2 field-3 field-4
    Order_1 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    I have imported IDoc changed to 1:Unbounded, able to create multiple Idocs based on separate order from flat file.
    Order_No - removeContexts - splitByValue(ValueChanged) - collapseContexts - exists - creatIf - IDOC
    Now I am having hard time creating a line item segment E1EDP01. I want to have Idoc created below way:
    IDoc-1 (Order_1)
    E1EDP01
    E1EDP01
    IDoc-2 (Order_2)
    E1EDP01
    E1EDP01
    IDoc-3 (Order_3)
    E1EDP01
    E1EDP01
    I am getting multiple IDocs created. Please help me to create mutlieple line items under each Idoc. Please be speficic about the node funtions to be used, because I tried many times with different combinations, didn't work.
    Regards,
    N@v!n

    Hi Navin,
    Create your source structure like below
    <Order>1 to unbounded
        <Order_No>
        <field1>
        <field2>
        <field3>
        <field4>
    </oder>
    to create mutiple IDocs based on order number,use below logic
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)--->collapsecontext-->Idoc
    use below logic for E1EDPO1,
    Order----->removecontexts------>
                                                                                    formatByexample------>E1EDP01
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)-------->
    try above logic and let me know if you any issues.
    Regards,
    Raj

  • To create 5 different files in target for each record in the sender file

    Hi SapAll,
    i have got a a requirement where pi need to create 5 different files with data of each record from the sender side.
    Its an file to file scenario
    suppose there are 5 rows in a file , then in target side i need to create 5 diff with each one record in it.
    Can we do it without using 3 comm channels
    Thanks&regards,
    Sai

    Hey,
    As a more generic solution, can you try using MultiMapping. It is supposed to generate multiple instances of messages on receiver side.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    You just need to put a simple logic in Message Mapping to generate new Node for every occurence of source field.
    Thanks
    Aamir

  • Use of LIKE in where clause of select statement for multiple records

    Hi Experts,
    I have a account number field which is uploaded from a file. Now this account numbers uploaded does not match fully with sap table account numbers but it contains all of the numbers provided in the file mostly in the upright positions.
    For example in file we have account number as 2ARS1 while in sap table the value is 002ARS1.
    And i want to fetch data from sap table based on account number uploaded. So, i am trying to use LIKE with for all entries but its not working as mentioned below but LIKE is not working with FOR ALL ENTRIES.
    data : begin of t_dda occurs 0,
            dda(19) type c,
           end of t_dda.
    data : begin of t_bukrs occurs 0,
            bukrs type t012k-bukrs,
           end of t_bukrs.
    data : dda type t012k-bankn,
           w_dda type t012k-bankn.
    CONCATENATE '%'
                             '2ARS1'
                     INTO  W_DDA.
    MOVE W_DDA TO T_DDA-DDA.
    APPEND T_DDA.
    CLEAR T_DDA.
    free t_bukrs.
    SELECT BUKRS
      FROM T012K
      into TABLE t_bukrs
        for all entries in t_dda
    WHERE BANKN like t_dda-dda.
    Can anybody suggest what should i use to get the data for multiple account numbers using one select statement only instead on using SELECT UP TO 1 ROWS in LOOP....ENDLOOP ?
    Thanks in advance,
    Akash

    Hi,
    yes, For All entries won't work for LIKE with '%  '.
    I think the other alternative is go for Native SQL by writing sub-query
    sample code is here:
    data: begin of i_mara occurs 0,
              matnr like mara-matnr,
              matkl like mara-matkl,
           end of i_mara.
    exec sql.
    select matnr, matkl from mara where matnr in (select matnr from marc) and matnr like '%ma' into :i_mara
    endexec.
    loop at i_mara.
    write:/ i_mara-matnr, i_mara-matkl.
    endloop.
    hope u got it.
    regards
    Mahesh
    Edited by: Mahesh Reddy on Jan 21, 2009 2:32 PM

  • Help needed in PL/SQL for updating the column for multiple records

    Hi,
    I am new to PL/SQL and need some help. What is the most effiecient way to update some field in a table as I may need to update thousands of records. I have a coulmn groupid can have multiple records tied to it. All the records attached to some groupid have a priority field also.
    How can I update the prorityfield value for all the groupids in a profiecient way. Here is a sample data
    GroupId     Priority
    1            1
    1            2
    1            3
    1            4
    1            5
    2            1
    2            2
    2            3
    3            1Here I have three groups 1, 2, 3. Now if any group contains only one record the priority remains same e.g. groupid=3 on top. If any group contains more than one record e.g. groupid=1 & 2 I want to re-arrange the priority fields e.g. If I want to update groupid=1 now if I change the priority of 2 to 5 (make it the last) I want to rearrange the remaing records priority i.e. if 2 becomes 5 as I have 5 rows for groupid=1 then 5 becomes 4, 4 becomes 3, 3 becomes 2 and 1 remains the same.
    Same wya if I want to make the priority 1 to 3 for groupid=2 then need 2 to become 1 and 3 to become 2 etc....
    Any help is appreciated.
    Thanks

    Hi,
    You don't need PL/SQL to do this (though you can put the following in PL/SQL if you want to):
    UPDATE     table_x
    SET     priority = CASE
                   WHEN  groupid     = 1
                   AND   priority = 2
                        THEN  5
                   WHEN  groupod     = 1
                   AND   priority     BETWEEN 3 AND 5
                        THEN  priority - 1
                   WHEN  groupid = 2
                   THEN
                        CASE
                             WHEN  prioity = 1
                             THEN  3
                             ELSE  priority - 1
                        END
                 END
    WHERE     groupId          IN (1, 2)
    AND     (     priority     BETWEEN 2 AND 5
         OR     groupid          = 2
         );There are lots of different techniques that can reduce your coidng: for example, the nested CASE statement used for groupid=2 above.
    You could do several smaller UPDATEs (for example, one just for groupid=1). Execution will be slower, but coding and testing will be faster.
    You could make the "magic numbers" 2 (for groupid=1) and 1 (for groupid=2) variables, even outside of PL/SQL.
    If you need more help, post the information that Satyaki requested.

  • How to generate a new segment in IDoc for multiple occurance of Control Num

    Hi Experts,
    In my scenario, i need to generate a new segment in IDoc(Target Structure) based on  Control Number Field in the Source Structure.
    The segment need to be created for multiple occurance of the Control Number.
    Ex:
    Control Number - 100 appears 5 times in Source Structure.This control Number is mapped to one of the Field in the Segment of  IDoc.
    Now my requirement is to generate the Segment 5 times with respective to this Control Number.
    please help me out to resolve this issue.
    Thanks,
    Kish.

    Hi,
    Here is the XML Structure of my Source:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:GoodsReceipt_MT xmlns:ns0="urn:WOL-com:XI:data:HJ:10">
       <row>
          <CONTROL_NUMBER>111</CONTROL_NUMBER>
          <LINE_NUMBER>1111</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>111111</WH_ID>
          <LOCATION_ID/>
          <HU_ID>11111</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>111111</ITEM_NUMBER>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>11111</LOT_NUMBER>
          <UOM>11111</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>111</CONTROL_NUMBER>
          <LINE_NUMBER>12222</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>12222</WH_ID>
          <LOCATION_ID/>
          <HU_ID>1222</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>112222</ITEM_NUMBER>
          <TRAN_QTY>112222</TRAN_QTY>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>12222</LOT_NUMBER>
          <UOM>1122222</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>222</CONTROL_NUMBER>
          <LINE_NUMBER>2222</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>22222</WH_ID>
          <LOCATION_ID/>
          <HU_ID>222222</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>2222222</ITEM_NUMBER>
          <TRAN_QTY>22222222</TRAN_QTY>
          <LOCATION_ID_2>33333333</LOCATION_ID_2>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>22222</LOT_NUMBER>
          <UOM>22222</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>333</CONTROL_NUMBER>
          <LINE_NUMBER>3333</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>33333</WH_ID>
          <LOCATION_ID/>
          <HU_ID>33333</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>333333</ITEM_NUMBER>
          <TRAN_QTY>33333333</TRAN_QTY>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>33333</LOT_NUMBER>
          <UOM>333333</UOM>
       </row>
    </ns0:GoodsReceipt_MT>
    Now Control_Number 111 occurs 2 times, 222 & 333 occurs 1 time.
    Now one IDoc for 111,222 & 333 should be generated.
    But Control_number 111 appears 2 times.
    Now the data in the 2 rows should be passed to Single IDoc by repeating the segments inside the IDoc.
    As u said i changed the Occurance of IDoc to 0...unbound and imported as External Definition. I have done upto Generating IDoc for each unique Control_Number.
    I stuck up at repeating the Segments in the IDoc.
    So please help me out.
    Thanks,
    Kish.

  • Header line missing for multiple records in the Receiver Email.

    I have a file to email scenario
    I see the content in mapping has proper output with all the HDRs and ITMS. but when it comes throught the receiver it is missing the HDRs.
    Source
    HDR1***   ITM1***  ITM2****
    HDR2***   ITM1***  ITM2***ITM3**
    The email Body looks like the following:
    HDR1***   ITM1***  ITM2***ITM1**  ITM2***ITM3*
    I am missing the HDR for the subsequent recodrs and the subsequent items are shown as if they are the items of the first HDR1. I checked the Mapping the mapping output and it looks good, but when i actually get the email i see it missing susequent HDRs.

    When I was at a client on 11.5.10, I ended up creating a personalization on the Requisitions screen.
    If someone created a requisition with 2 ship to orgs, it raised an error.
    It was not full proof but it was deemed satisfactory by the client.
    You can consider personalization or you can modify the requisition approval workflow to include the check for multiple ship-to condition.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • Alv report for multiple record insertion

    hi,
    i'm new to abap. i'm using alv report for record display and insertion. how can i insert multiple records from alv to my table??

    well that can be achieved only by running BDC inside alv report to enter the entries.and in that too you can append or edit single entries only
    reward if useful
    regards
    vivek

  • Bdc session is not working for multiple records

    Hello Experts
    we have written abdc for f-27 using the session method.it is working fine for one record but if we supply mulite records it
    is giving the error, like bseg-wbter( ie amount which comes in the second screen) is not found in screen 1.
    ie the first screen.The bdc is working fine for one record in notepad.after completing the first record it goes to
    second record and in the first screen itself it says amount field not found in screen 1. But
    actually this field comes in second screen.
    my flat file is like this..
    10.10.2008     DA     9641     10.10.2008     1     IND     TEST          31     10001     320.21     10.10.2008     01     120021     345.94
    10.10.2008     DA     9641     10.10.2008     1     IND     TEST          31     10001     560.22     10.10.2008     01     120021     231.94

    please kindly see my program..
    LOOP AT itab.
        REFRESH itabbdc.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'  itab-bldat.
        PERFORM bdc_field       USING 'BKPF-BLART'  itab-blart.
        PERFORM bdc_field       USING 'BKPF-BUKRS'  itab-bukrs.
        PERFORM bdc_field       USING 'BKPF-BUDAT'  itab-budat.
        PERFORM bdc_field       USING 'BKPF-MONAT'  itab-monat.
        PERFORM bdc_field       USING 'BKPF-WAERS'  litab-waers.
        PERFORM bdc_field       USING 'BKPF-XBLNR'  itab-xblnr.
        PERFORM bdc_field       USING 'FS006-DOCID' itab-docid.
        PERFORM bdc_field       USING 'RF05A-NEWBS' itab-newbs.
        PERFORM bdc_field       USING 'RF05A-NEWKO' itab-newko.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0302' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  itab-wrbtr.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'  itab-zfbdt.
        PERFORM bdc_field       USING 'RF05A-NEWBS' itab-newbs2.
        PERFORM bdc_field       USING 'RF05A-NEWKO' itab-newko2.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=BU'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  itab-wrbtr2.
       PERFORM bdc_load USING 'F-27' itabbdc.
      ENDLOOP.
    *&      Form  open_session
          text
    -->  p1        text
    <--  p2        text
    FORM session_start .
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'F-27DA'
          keep   = 'X'
          user   = sy-uname.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "session_start
    FORM bdc_load USING tcode TYPE sytcode
                           bdcdata LIKE itabbdc.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode     = tcode
        TABLES
          dynprotab = itabbdc.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • ADI not working for multiple records

    Hi,
    We currently have an issue with ADI. The ADI we have produces an MS Word letter based on a custom view and custom integrator.
    On the person form, when I query for an employee and the resultset is 1 our ADI is working fine and the letter/word document is generated.
    When the query returns more than one employee, the Web ADI errors. It does not download any records into the excel file and then when it tries to open the word document it asks for Header Record Delimiters?
    In the excel document I get a Run-Time error '5922' Method 'Run' of object '_Application' failed.
    Is there a setting that only restricts ADI to return one row from this form?
    Any help would be greatly appreciated.
    Many thanks
    Martin

    Hi,
    We currently have an issue with ADI. The ADI we have produces an MS Word letter based on a custom view and custom integrator.
    On the person form, when I query for an employee and the resultset is 1 our ADI is working fine and the letter/word document is generated.
    When the query returns more than one employee, the Web ADI errors. It does not download any records into the excel file and then when it tries to open the word document it asks for Header Record Delimiters?
    In the excel document I get a Run-Time error '5922' Method 'Run' of object '_Application' failed.
    Is there a setting that only restricts ADI to return one row from this form?
    Any help would be greatly appreciated.
    Many thanks
    Martin

Maybe you are looking for