cancel
Showing results for 
Search instead for 
Did you mean: 

one IDOC to N IDOcs

vishnu_pallamreddy
Contributor
0 Kudos


Hi All,

our scenario is to split one IDOC(segments have child nodes) into N IDOCs based on segment type.

Please see the screen shot for IDOC.....

Our scenario is

Segment ZST_IDOCTOFILE should be created as single message(IDOC).

Segment ZSG_SPLITIDOC2 which is repeated twice, but should be created as a single message(IDOC).

Segment ZSG_SPLITIDOC1 should be created as single message(IDOC).

Segment ZST_IDOCFILE should be created as single message(IDOC).

Segment ZST_IDOCFILE2 will be created as a single message(IDOC).

Segment ZST_IDOCFILE1 should be created as single message(IDOC).

any one suggest me the solution....

Thanks & Regards,

Vishnu pallamreddy

Accepted Solutions (1)

Accepted Solutions (1)

Muniyappan
Active Contributor
0 Kudos

Hi Vishnu,

Can you share your target idoc message?

it will be good if you can share input and out xml.

say if am creating single idoc for ZST_IDOCTOFILE what are the fields it should be having?

Regards,

Muni

Former Member
0 Kudos

Thanks Muni for reply.

Please find the screenshot for source and target message ZST_IDOCTOFILE.

Muniyappan
Active Contributor
0 Kudos

Hi Ram,

From the screen shot i can assume below things

you want to create a single idoc for each ZST_IDOCTOFILE segment.

and ZST_IDOCTOFILE segment can contain child nodes ZSG_SPLITIDOC1 with 0..99 occurrence.

say i have source side like this.

ZST_IDOCTOFILE

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

ZST_IDOCTOFILE

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

  

in the target side i need

idoc1

ZST_IDOCTOFILE

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

idoc2

ZST_IDOCTOFILE

     ZSG_SPLITIDOC1

     ZSG_SPLITIDOC1

   


is that correct?

also you have to change the occurrence of idoc in the target message by creating external definition

the procedure already explained in the previous thread created by Vishnu,

Regards,

Muni



vishnu_pallamreddy
Contributor
0 Kudos

Hi Muni,

Our requirement is we have to create multiple idocs based on segments....

ZST_IDOCTOFILE this is one parent segment

ZSG_SPLITIDOC2 and ZSG_SPLITIDOC1 these are child segments.... under ZST_IDOCTOFILE.

now we have to create one  IDCO based on ZST_IDOCTOFILE this parent segment and create another IDOC based on ZSG_SPLITIDOC2(child segment) and if we have multiple same segments(ZSG_SPLITIDOC2) it should create one single IDOC...

Similarly if another parent and child segments are there then it should create individual IDOCs...

Thanks & Regards,

Vishnu.

Muniyappan
Active Contributor
0 Kudos

Hi Vishnu,

ok. now i can understand this. but not completely.

could you please share the input and output xml?

attach the xml files if possible. so that people can try it out and share solution to you.

screen shot not going to help as we have to create data type from scratch which is time consuming.

Regards,

Muni.

vishnu_pallamreddy
Contributor
0 Kudos

Hi Muni,

The following is my source structure:(we02)

Segemnt 1

      segnment 11<1>

      segnment 12

      segment 11<2>

Segment 2

      segment 21<1>

      segment 22

      segment 21<2>

then we need to get the following output:

segment 1
     segment  11<1>
     segment12

segment 1

     segment  11<2>

     segment 12


Segment 2
     segment 21<1>
     segment 22

Segment 2
      segment 21<2>
      segment 22

I think it would be understand to you.......
so we have to create IDOC's based on no of same segments occurred......

please see the attachment for IDOC structure....

Could you please let me know how can we get the required output...

Thanks & Regards,

Vishnu....

Muniyappan
Active Contributor
0 Kudos

hi,

your input

Segemnt 1

      segnment 11<1>

      segnment 12

      segment 11<2>

your output

segment 1
     segment  11<1>
     segment12

segment 1

     segment  11<2>

     segment 12

here each segment will come under separate idoc?

like

idoc-1

segment 1
     segment  11<1>
     segment12

idoc-2

segment  11<2>

     segment 12

or

idoc

segment 1
     segment  11<1>
     segment12

segment 1

     segment  11<2>

     segment 12

please confirm.

i asked multiple times for input and output xml.

check this recent thread where use shared his input and output xml.

if you share it can help us. sorry for asking this.

Regards,

Muni.

vishnu_pallamreddy
Contributor
0 Kudos

Hi Muni,

Each segment will come under separate idoc....

idoc-1

segment 1
    segment  11<1>
    segment12

idoc-2

segment  11<2>

    segment 12  this is the required output.....

we took same idoc structure for source message type and target message type in message mapping..

please find the IDOC structure file.....

Answers (0)