on 11-22-2011 3:08 PM
Hi expert,
I have a flat file to IDOC scenario. In flat file, I have thousands of rows. Each row need to create one IDOC. In IDOC, I have 3 segments(seg2 is the child of seg1, seg3 is the child of seg2). Each field in flat file will be mapped to the same name in IDOC. Here is my example structure:
MT_Flatfile
row--0:unbounded
seg1a --0:1
seg1b --0:1
seg2a - 0:1
seg2b - 0:1
seg3a - 0:1
seg3b - 0:1
Sample_IDOC_name
IDOC - 0:unbounded
EDI_DC40
seg1 - 1:1
seg1a - 0:1
seg1b - 0:1
seg2 - 0:unbounded
seg2a - 0:1
seg2b - 0:2
seg3 - 0:unbounded
seg3a - 0:1
seg3b - 0:1
I mapped row to IDOC. It did create multiple IDOCs. But each IDOC only contain seg1. Then I mapped row to seg2 and seg3 node. The first IDOC has three segments and the rest still only have seg1. And in first IDOC, the seg1 is filled correct. seg2 and seg3 have multiple records. Can anyone tell me how I do mapping without using BPM for this case to make each IDOC has one seg1, one seg2 and one seg3?
Thanks a lot.
Charles
Edited by: Charles M Gates on Nov 22, 2011 4:08 PM
Edited by: Charles M Gates on Nov 22, 2011 4:09 PM
The way you developed scenarios looks perfect, only thing you need to cross check mapping once again and play with contexts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Charles, search SDN blogs for "idoc split" and you will find plenty of examples. I once used [Michals blog about Idoc bundling|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2762] [original link is broken] [original link is broken]; and it worked like a charm :-).
Regards, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Your issue come from certainly to the fact that in source file, for at least one row, there is a segN which is missing (see occurence "0..1").
And so after that, you have a bad behavior to the target Idoc segment, due to the fact you did not manage properly the Context. In Message Mapping, use the right click to display your context, and you will see a difference of context between your source and the desired target.
the error certainly appears for a sub-segment which exist whereas its highest level is missing (in your source).
regards
Mickael
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.