Skip to Content
author's profile photo Former Member
Former Member

Multiple idocs from one file.

Hello,

We have a PlainFile–TO–Idoc SAP XI Scenario. We have configured everything and it is working fine. However, we have a new requirement where we need to produce multiple idocs from one file. I mean, in the text file we can have something similar to this:

HEADER;XYZ;123;123456
DETAIL;XYZ;123;123456
DETAIL;XYZ;123;123456
DETAIL;XYZ;123;123456
DETAIL;XYZ;123;123456
..
..
..
..
TRAILER;XYZ;123;456

Now for every 1000 "detail" records from the above structure it should create another idoc.

So can you tell us how to solve this problem? Is there anything we can do to configure SAP XI so we can send 1 File to multiple IDOCS.

Looking forward for your help on this..!!
Thanks in advance.

Purna

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Feb 19, 2014 at 02:18 PM

    Hello,

    check below wiki which shows how to create multiple idocs, so u can refer the same but to split idocs at every 1000 detail record u have to use a UDF which will create new idoc node when the occ of details is >= 1000

    http://wiki.scn.sap.com/wiki/display/XI/File+to+Multiple+IDOC+Splitting+without+BPM

    Thanks

    Amit Srivastava

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 19, 2014 at 02:19 PM

    Hi Purna,

    Please follow below link..

    File to Multiple IDOC Splitting without BPM - Process Integration - SCN Wiki

    You have to change the occurence in IDOC..

    For this you have to export idoc struture in your desktop and modify that occurence as shown in the link and import into the PI...

    Map that IDOC segment to row of your source struture..

    Remaining mappping will be as per the rules givin by you...

    Thanks,

    Sreenivas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 19, 2014 at 02:28 PM

    Hello,

    BTW, for creation of idoc node after 1000 records u can refer UDF (adjust the count from 15 to 1000) which i have shared in below thread:

    Thanks

    Amit Srivastava

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2014 at 02:51 PM

    Hi ,

    >>for every 1000 "detail" records from the above structure it should create another idoc

    Use the below udf in mapping

    int count =1 ;

    for(int i=0;i<DETAIL.length;i++)

    {

    IDOC.addValue("");

    for(int j=0;J<1000;j++)

    {

    ++count;

    open the respective segment and pass the values in it

    TarSeg.addValue("");

    f1.addValue(inp1[i]);f2.addValue(inp2[i]);....

    }

    count = 0;

    }

    Regards

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.