on 06-25-2009 11:25 AM
hello everybody
i have a file (xml) -> XI -> Idoc scenario
sometimes idoc message is so much big and i have problem to process it.
so i would like split message in more idoc but i need decide a cut-point
example in file i have 200 row and i don't want create 200 idocs but example 4.
So i need cut file every 50 rows.
It's possible?
thanks
Alex
i solved myself . no solution found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write a UDF, which will use source as Row field value and target as Idoc.
The below mentioned code can be used to split up the file with 200 row into 4 Idocs. But with this logic, you need to check the child node mapping, if they are getting affected or not.
// split the value if more than 50 segments are found.
int i,j;
for(i= 1;i<=(a.length) ;i++)
{
if( (i % 50 ) == 0)
{
result.addValue(a[0]);
result.addContextChange();
}
else {
if((i == (a.length) ))
{
result.addValue(a[0]);
result.addContextChange();
}
else {
result.addValue(a[0]);
}
}
}
BR,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think the problem is due to IDOC segment occurrence. Better to increase segment occurrence, the problem will be sort out easily. In standard PI i think we don't have option to cut file.
Find below mentioned link help you.
/people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
/people/alessandro.guarneri/blog/2006/03/05/managing-bulky-flat-messages-with-sap-xi-tunneling-once-again--updated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alessandro ,
We had the same problem in HR implementation where we used to get data for thousands of employees in a single file.
As Idoc was not able to hold this much of data,data used to be truncated.
Then we had taken a field (employee number) as a criteria to generate IDocs,and now we have an IDoc generated for each employee record.
This was helpful as for a single employee,there were a number of change records.
The logic used was:
Employeecode -> splitByValue(value changed) -> collapseContexts -> IDoc.
Does it suit your requirement as well?I mean,may be you can find such field for splitting IDocs.
Kindly let us know.
Thanks.
Regards,
Shweta
Hi,
I guess u can use any of the field from xml file to create multiple IDOC.
Say employess details are there with company name.
then u can generate multiple IDocs depends on company name.
but in this case u won't be able to cut file in equal size.
this is just one suggestion.
Regards,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
use parameter "Recordsets per Message" to split the message in the sender adapter.
[Converting File Content in a Sender Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm]
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.