on 07-29-2009 7:07 PM
Scenario is Fileu2013TOu2013Idoc. We have a requirement where we need to produce multiple idocs from one file.
The input file is 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 MULTIPLE IDOC's in SAP.
In PI, Integration directory, under "File Content Conversion" added 2 lines as below:
Recordset Structure=DETAIL,1
Recordset per Message=1000
This splits the FILE to many messages (each 1000 DETAIL) in PI (SXMB_MONI) and creates many IDOC (only if FILE has DETAIL records).
However this works only if the FILE has all DETAIL records (no HEADER, no TRAILER).
Can someone suggest how to use "Recordset per Message" if there are more NODEs in the input FILE?
Thank you very much.
Hi
Please use the Recordset structure.
Recordset Structure=Header,1,DETAIL,*,Trailer,1
Also please use keyfield for this which is mandatory
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FILE to IDOC
I'm trying to see if there is a solutin without BPM.
In FILE Sender CC, will it be possible to call a OS script to split the input file (nameA.txt) into multiple files (nameA_1.txt, nameA_2.txt, Note: The OS script will delete the original file nameA.txt)?
I'm not sure if the OS script will be called first before processing the original input file!! Please help if this approach would work. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can try doing this:
1. Read the complete file and do a FCC.
2. Write splitting logic (per 1000) in udf
3. Use multimapping and enhanced interface determination
4. Also make sure you have changed the occurrence of idoc to 1 ot unbounded (for this download the XDSD of idoc and edit manually then import it as a external definition)
Regards
Suraj
Suraj
Thanks.
I got your point. I also read Enhanced (Mapping-Based) Interface Determination http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/content.htm.
It appears target IDOC message splits are not supported since the IDOC adapter is not part of the AE. /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
So I will use your approach in two steps. Please let me know if my understanding is correct.
Step 1:
FILE to FILE
1. Read the source file and do a FCC.
2. Write splitting logic (per 1000) in udf
3. Use multimapping and enhanced interface determination
4. Write source file to multiple target files. FILE1,2..N
Step 2:
FILE1,2,3..N to IDOC
1. Normal mapping. (Note: no change of IDOC occurrence of idoc to 1 ot unbounded is needed as original message is split to multiple files in step 1)
Appreciate the input.
Hey
Please use Multimapping with BPM to solve your problem.
Write a UDF which will keep a counter of nodes and creates a new root node for every 1000 record.
Thanks
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks.
It was helpful. Awarded points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ravi,
Recordset per message will not work in your case. But you can do with a BPM.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.