FILE TO MULTIPLE IDOC QUERY

Hi,
I have a file (PO details)from which i create multiple idoc. The structure of file and idoc is as follows
--BATCH   
   ---HEADER
ITEM
--/BATCH
IDOC IS
--IDOC
     ---BATCH
HEADER
ITEM
now in order to get multiple idoc from the file structure i changed the idoc segment cardanility to 0-unbounded and mapped
HEADER of file to IDOC node of idoc so that idoc gets created for each header,
my requirement is that for each idoc
1) the batch segment should also get populated
2) there is a feild batchid in the batch of file value of that feild should be populated in one of the header feilds
Presently suppose the file has 10 POs, then it creates 10 IDOCS where in only the first idoc has the batch segment populated and the header of first idoc has batch id populated , rest 9 IDOCS the batch segment is blank and even i am not getting the batchid value in the header.
Edited by: Sudhakar Gongloor on Jun 21, 2010 4:12 PM

exactly.
so in your case if source field A has 5 values and you need there values to go into 5 IDocs, you will use
Source field A -> Split by value -> Idoc field
Also note that you will have to similarly maintain a context mapping for the parent node of the target field.

Similar Messages

  • One file for multiple IDOCs

    Hi,
    Need help on IDOC files created on application server.
    For IDOCs of EDI type generally one file is created on application server for one idoc. Is there any way to create a common file for multiple IDOCs that are created in a batch job?
    Thanking in anticipation
    Sudhir Bhate

    Hi Sudhir;
       Yes, it is a setting on the outbound parameters of the partner profile.  In the section for "output mode," select "Collect IDocs."  This link to help.sap.com describes the procedure:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b812a43d711d1893e0000e8323c4f/content.htm
    Cheers,
    John

  • Error Handling in File to Multiple IDOC Scenario?

    Hello Experts,
    My scenario is file with Multiple records and I want to send it to SAP system.If there will be 10 Records in my file I need to create 10 IDOC in Target system.
    I can use below of the two options.
    1) File to Multiple Idoc (1.N Mapping)
    2) Using BPM
    3)Directly place the file in SAP application server and process it via ABAP Program.
    However I am not clear in which option error handling will be more effective.Please suggest.
    Basically I want to handle If out of 10 records 9 are correct and 1 record is not correct then I should be able to report within PI without affecting 9 correct records.Is it possible 9 records will be sent to SAP system and PI will only show error for 1 incorrect record.
    Also I will be doing this scenrio for transaction data with huge size (1 Million Records).Which approach will be more effective in this case.
    Thanks,
    Pushkar

    Hi Patel,
    I want to handle If out of 10 records 9 are correct and 1 record is not correct then I should be able to report within PI without affecting 9 correct records.Is it possible 9 records will be sent to SAP system and PI will only show error for 1 incorrect record.
    when working on graphical mapping, the target structure is created when there are no errors in all records of source structure.
    suppose if we have validation error in 9th and 10th record, then we can not process the first eight records and inturn we can not store the two error records in XI for further.
    i suggest you the third option, you can directly place the file in SAP application server and process it via ABAP Program.
    this is far better because you can do more customizations as you have to deal with millions of records.
    Regards,
    Pradeep A.

  • File to Multiple Idocs scenario. Pls help

    Hi All,
    For Single File to Multiple Idocs scenario i am referring blog --
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Suppose my source file is
    AAA, BBB,CCC
    111,222,333
    ZZZ,ZZZ,ZZZ
    I want to make 2 IDOCS for the first 2 records (AAA, BBB,CCC   and  111,222,333)
    and do not want to make IDOC for the 3rd record  -- how to achive this.
    Regards

    Hi,
    If the condition is like, for 'AAA' and '111', IDocs to be generated, then do as follows.
    If IDOCs are of same type.
    1. Value
    > Equals -
    > createIf -
    > IDOC
       Constant('AAA')
    2. Value
    > Equals -
    > createIf -
    > IDOC
       Constant('111')
    3. Value
    > Equals -
    > not -
    > createIf -
    > IDOC
       Constant('ZZZ')
    If 2 IDocs are of differnet types,
    create different mapping programs with same logic.
    If 2 IDocs are to be generated based on the record no in the file rather than the first field value, i think you can go for Global container.
    Refer these,
    [http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/frameset.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/EN/49/1ebc6111ea2f45a9946c702b685299/content.htm ]
    [http://help.sap.com/saphelp_erp2004/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/frameset.htm]
    thanks.
    Edited by: P.Ravi Varma on Apr 22, 2009 10:27 AM

  • File to multiple IDOCs error

    Dear All,
            I am trying to create customer master using FILE-To-Multiple IDocs.Idoc generated with 2 errors.
    1.First one is status 51...Specify the Account Group.
    2.Second one is it's generating only single idoc(not multiple).
    I have mapped Account Group source field to KTOKD(Idoc).is this mapping problem?I have given IDOC occurence unbounded but not generating multiple idocs.below is my message mapping structure.
    mt_customer                                                   Debmas01
      customer  (1...1)                                
        customer_master(1..unbounded)----
    >IDOC (1..unbounded)
    below is my input xml file with data.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_customer xmlns:ns0="urn://fenestacustmast">
       <Customer>
          <Customer_master>
             <AccountGroup>0004</AccountGroup>
             <CustomerNumber/>
             <CompanyCode>1000</CompanyCode>
             <SalesOrg>DBPM</SalesOrg>
             <DistributionChannel>PS</DistributionChannel>
             <Division>WD</Division>
             <Title>Mr</Title>
             <Name>Preethi</Name>
             <SearchTerm>Mat</SearchTerm>
             <SearchTerm2>V6CUSTNO</SearchTerm2>
             <StreetNumber>Street 6</StreetNumber>
             <City>Bangalore</City>
             <Country>IN</Country>
             <Region>KAR</Region>
             <TransporationZone>ASCHTS01</TransporationZone>
             <Fax>251662546</Fax>
             <Telephone>9658965236</Telephone>
             <VATRegNo>ABCG1254</VATRegNo>
             <LegalStatus>01</LegalStatus>
             <ReconAccount>36023901</ReconAccount>
             <SortKey>001</SortKey>
             <TermsOfPayment>S028</TermsOfPayment>
             <ToleranceGroup>1000</ToleranceGroup>
             <PaymentHistRecord>TRUE</PaymentHistRecord>
             <SalesDistrict>A1KAKA</SalesDistrict>
             <SalesOffice>BPBL</SalesOffice>
             <SalesGroup>SEN</SalesGroup>
             <Currency>INR</Currency>
             <CustPricingProc>1</CustPricingProc>
             <CustStatsGroup>1</CustStatsGroup>
             <DeliveringPriority>01</DeliveringPriority>
             <ShippingConditions>01</ShippingConditions>
             <Plant>DBBG</Plant>
             <AccountAssGroup>01</AccountAssGroup>
             <TaxClassification>1</TaxClassification>
             <InvoicingDate>IN</InvoicingDate>
             <InvoicingListDate>IN</InvoicingListDate>
             <IncoTerms>FCA</IncoTerms>
             <IncotermsPart2>Bangalore</IncotermsPart2>
             <CreditControlArea>FENE</CreditControlArea>
          </Customer_master>
       </Customer>
    </ns0:mt_customer>
    I did very simple mapping one to one without any functions.All are string types.I couldn't find what is the error?any help would be appreciated.
    Thanks in advance.
    Vinay

    Hi,
        I would like to know whether you have mapped your customer_master(1..unbounded) node to IDOC(1..unbounded) node???Please check it once.Depending on that only the multiple IDOCs will be generated. I think it is mapping problem only. Have you changed the occurrence of IDOC to unbounded by exporting & then reimporting it to external definitions???? I've already done it & i got multiple IDOcs generated. Please check it and let me know the response so that I can help.
    Please follow th below links
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Thanks & Regards
    Priyanka Anagani

  • File to Multiple Idocs, Error: Tag MESSAGE1 found instead of tag IDOC BEGIN

    Hi,
    I have configured my file to multiple idocs scenario using the following blog -
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
    Now when i try to execute this scenario it is scenario it is giving me the following error at "Call Adapter" Stage in runtime-
    "Tag MESSAGE1 found instead of tag IDOC BEGIN="
    My message looks like this at "Request Message Mapping" Stage in runtime -
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    - <ns0:Message1>
    - <ZDR009>
    - <IDOC BEGIN="1">
    - <Z100901 SEGMENT="1">
      <RUNDATE>20080220</RUNDATE>
      <RUNTIME>0037</RUNTIME>
      <CONSTANT1>PYRLINCST</CONSTANT1>
      <CONSTANT2>CSC</CONSTANT2>
    - <Z100902 SEGMENT="1">
      <RECTYP>2</RECTYP>
      <SSN>641381239</SSN>
    Kindly assist me in solving this error, Thanks in Advance!!
    Regards.
    Sudheer

    Hi Sudheer,
    Just the check the message mapping. Check the parant node mappings to create two different messages.
    It seems that the mapping done on IDOC Node to create the IDOCs is getting failed.
    Copy the content from inbound payload and test it in message mapping.
    Remember, when you load the test data into your test tab you will get the error of structure mismatch coz in your mapping you have additional message.
    Do the change with original data as shown below befor testing.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
    Original message will be here.
    </ns0:Message1>
    </ns0:Messages>
    Regards,
    Sarvesh

  • Flat file to multiple IDOCs

    Hi experts,
    I have a bit of a problem here wit a flat file to IDOC interface.
    My input CSV file structure (shortened) is as follows -
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:POINBOUND_MT xmlns:ns0="urn:xx:xi:dwn:xx:pf:xxx:poinbound:100">
       <Record>
          <Row>
             <PO_HEADER_ID/>
             <TYPE_LOOKUP_CODE/>
             <LINE_NUM/>
             <AMOUNT_LIMIT/>
          </Row>
       </Record>
    </ns0:POINBOUND_MT>
    the target side is an idoc - PORDCR1.PORDCR102.
    in the input file, for each row the PO_HEADER_ID field will have repeated values. the structure for eg.-
    PO_HEADER_ID < other fields> < otherfields> ...
    12345 <other fields>..<..  >
    12345 <other fields>..<..>
    12345 <other fields>..<..>
    56789 <other fields>..<..>
    56789 <other fields>..<..>
    Now i need two idocs ( 2 distinct header values) on target side - the 1st idoc will have first 3 line items and 2nd idoc will have the last 2 line items.  have already edited the IDOC in xsd format to make it unbounded.
    <b><u>Problem</u></b> - i am able to create two idocs by handling contexts(splitbyvalue and a UDF), but with the line items its not working i.e. <u>the first idoc gets the 3 line items created but the 2nd idoc does not have any!</u> 
    my mapping for line items is -
    PO_HEADER_ID <-> splitbyvalue(value changed) <-> count <---> UDF (for result.addvalue using count)  <----->  lDOC LINE_ITEM node.
    This logic does not work incase i need to create more than one idoc on the target side, it only works for the first idoc..so wat can i do??
    Plz help.
    thnx in advance!
    Raju.

    Hi Raju,
    check these links...
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Sachin

  • File-XI-multiple IDoc Scenario

    Hi there -
       I am working on single File-XI-multiple IDoc Scenario and have following questions:
    (please keep in mind that there is already an existing multiple IDocs-XI-single File scenario between the same systems)
    1. Please provide any detailed step by step documentation from end-to-end.
    2. I am thinking it's compulsory to use BPM, is there any way to aviod?
    3. Is it possible to update existing IDocs in R/3 directly from the data from XI?
    Thanks everyone in advance...
    Pat

    HI,
    Pls go thru following links-
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Single inbound file -> XI -> Multiple IDOCs in SAP
    One file for multiple IDOCs
    Hope this helps..
    Regards,
    Moorthy

  • Single file to multiple IDOC's

    I have a scenario (File to IDOC) where single file creates multiple IDOC's.
    I got message mapping error in production for record 622.
    Question here is will the IDOC's till entries 621 be created in the ECC system or the entire messaged failed.?
    It is sure that from 622 nothing was processed.
    Thanks.

    So, in Mapping Mapping, in outbound interface, you certainly used an external definition with option "maxOccurs=Unbounded". is that right?
    Anyway, as in moni, you have only one XML message, and as you said to us that this message is in error in moni (so red flag), it's the wole message (file) which has been rejected.
    Have you check the WE02 (ECC) and IDX5 (PI) ?... because you will have directly your answer of your question "does my file is treated partially ? or completly rejected?" !
    regards.
    mickael

  • Single inbound file - XI - Multiple IDOCs in SAP

    Hi XI pros,
    my file input file has very simple structure of header and item:
    H
    L
    L
    L
    Header has 2 fields snd item has 3 fields which I need to map to IDOC and post simple MM document in SAP.
    Mapping itself is very easy. I need to create separate IDOC for every item record type L.
    Question is whether I can do this in general without BPM ?
    Thank you, Forest.

    Hi Forest,
    Go thru this blog of <b>File to Multiple IDoc's</b>
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    I think this satisfy ur requirements.
    Hope it helps and u don't forget to give me points.
    Regards
    Arpit Seth

  • Each line of a file to a single Idoc (one file to multiple IDoc)?

    Hi Community,
    I have a flat file with many lines. Each of these lines has the same structure and has to fill a separate IDoc. How can I configure XI that it creates for each line a separate IDoc?
    I already found a blog to such a topic: File to Multiple IDocs (XSLT Mapping)
    But thatu2019s not what I am looking for (or I do not get the Point).
    I also tried to set u201CRecords per Messageu201D to 1. But that is not working to. :/
    Maybe one of you guys has an idea?
    Thanks in advance,
    Udo

    Hi Udo,
    For instance if  file structure is as follows:
    <File>
    <Header>
    </Header>
    <Item>
    </Item>
    <Item>
    </Item>
    </File>
    Now if u want to genarate a new Idoc for each n every <Item> in the file. The Header Information is to be repeated for each IDOC as well.
    Then allu need to do is  import the idoc in XI, then take the idoc xsd and change the occurrence o..unbound and then create the external definition.
    Look into this blog.
    The specified item was not found.
    Now use the external definition in your mapping instead of using the original IDOC. In your mapping map the item to IDOC, and for header data you have to use the useOneAsMany function.
    Reward if found useful
    Regards,
    Vinod.

  • Configuration scenario of file to multiple IDOCs in XI

    I have to configure a scenario of file to multiple IDOCs in XI.
          I have XML file in MDM server. And it contains multiple segments. Each Segment is  a combination of DEBMAS and ADRMAS.
    So in XI configuration I have to separate the mapping for DEBMAS and ADRMAS. And my ADRMAS idoc should post first in R3 and then DEBMAS should post.
    These IDOCs are multiple because each segment in XML file will be a IDOC.
    Does BPM process is mandatory here or we can do in any other way.
        Could you please suggest how to do this configuration. If you have any documents pls share with me.
    Regards,
    Venkat

    Hi,
    First you need to split the messages into multiple IDOC types. As you are going to send this to IDOC adapter, it is required to have BPM to split the message.
    These 2 docs may help u:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Regards,
    Moorthy

  • File to multiple idoc, Raising alerts , not using ccBPM

    Hi experts,
    I have file to multiple idoc scenario.sturcture of the incoming file like given below..
    Header
    line item
    line item
    header
    line item
    line item
    there is a field Company COde in Header.If that company code is not Equal to "L" then dont map that header and line items with target
    now we have to raise an alert notification mail saying that "company code is wrong." we have to send a single mail for this scenario if this condition is true even many times.
    i am not using ccBPM in the scenario.
    how can we achieve this functionality??
    Thanks in advance.
    Thanks,
    Rohit

    Refer this blog to bundle multiple idocs.
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    After you create the custom idoc interface using the above blog,
    map the root node of the idoc interface based on your condition.
    put a if condition to pass a constant to the root node for the idoc.
    as an else condition, raise an exception using a udf.
    Create a generic alert for runtime errors in mapping, which send mails whenever there is a failure in the mapping.
    http://help.sap.com/saphelp_erp2004/helpdata/en/80/942f3ffed33d67e10000000a114084/content.htm
    Regards,
    Ravi

  • File to multiple idoc scenarios depending on finput field value

    Hi,
    i have a file to idoc scenario.
    depending on a particular field of the file i have to trigger a single idoc (with all the records in the file)or multiple idocs  (for each record in the file ).
    for example,
    the file has 5 records-
    2 records have field value A (create 1 idoc for all As)
    3 records have field value B (create 1 idoc for each B)
    so in this case 4 idocs (1 for all A, and 3x1 for B) are created
    What is the best solution ?-
    1. to have several outbound idoc interfaces and check each interface mapping for field value (A or B) ?
    this solution seems like overwork to me
    2. handle this in mapping ?
    in that case will UDF be better or ABAP mapping
    3. any other way ?
    Thanks in advance

    Hi,
    if you have one IDOC type you can use ABAP mapping
    this way you will handle everything in tables
    and you will be able to post one IDOC (bundled)
    with all IDOCs inside
    also if you use ABAP mapping you will be able to incorporate changes
    easily in the future I believe
    for idoc bundling:
    <a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • File to multiple IDOC(message)

    Hi
    I need to map file to multiple IDoc type  that means on source message have two target message . Any ideas how to achieve that
    Thanks in advance
    Regards
    Swatantra

    refer these weblogs that will give you an idea;
    Multi Mapping -
    BPM involved:
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Without BPM:
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Maybe you are looking for

  • Windows 8.1 in Bootcamp not recognising home network WiFi

    I am running bootcamp with Windows 8.1 on my MacBook Pro Retina Early 2013. I installed it together with all drivers as suggested by bootcamp. In Mac OS 10.9.4 I am connected to my home network and can see about 4-5 other networks (from my neighbours

  • Fake apple customer support

    recently i received a e-mail with this content : " Dear Apple Customer,  To get back into your apple account, you'll need to confirm your account . It's easy: Click the link below to open a secure browser window. Confirm that you're the owner of the

  • TS1363 Iphone 4 went white screen then black  Trying to restore with Itunes.  Having no luck anyone have a suggestion

    Iphone 4 went to a complete white screen at 7 last night and then when i plugged it up to charge it went off and wont come back on at all. ive tried to restore it on itunes but i never backed it up. i dont care about losing all my data i just want th

  • Printing to Video Problems

    When I try to print to video, the deck records and I see what I'm trying to record on my computer monitor. But in playback all I get is a black screen with no audio. Is there some A/V setting that needs to be adjusted?   Mac OS X (10.4.4)  

  • Error codes-45054, simply reinstall iTunes

    I did a disk repair and this did not help so i re downloaded iTunes and the error code disappeared, hope this helps someone