on 02-19-2014 2:14 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.