cancel
Showing results for 
Search instead for 
Did you mean: 

File to multiple IDOC split without BPM

former_member260907
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

The way you developed scenarios looks perfect, only thing you need to cross check mapping once again and play with contexts.

Former Member
0 Kudos

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

former_member260907
Participant
0 Kudos

Hi Martin,

Yes. That is the one I followed through. But sounds not successful to me.

Charles

Former Member
0 Kudos

Hi,

This is something where you need to check with your context...

definitely mapping issue...ensure the vlaues are generated with context change for the segments of the IDocs 2 and so on....

HTH

Rajesh

Former Member
0 Kudos

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

former_member260907
Participant
0 Kudos

Hi

Thanks all for the input. I solved the issue myself. I used function "SplitByValue" and it works now.

Cheers.

Charles