cancel
Showing results for 
Search instead for 
Did you mean: 

How to create the multiple files based on segment.

Former Member
0 Kudos


Hi Experts,

sender side and receiver side i am using  same idoc. IDOC to  sFTP  Scenario (1:1 mapping)

sender side IDOC

IDOC

    E1STATE

    E1STATE  

for two segments E1STATE  i need to create  two files based on E1STATE. i need to split the idoc based on E1STATE segment and for each E1STATE segment i need to create one file.

please provide me solution for this requirement

Thanks,

Aadi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Venkat ,

Thanks for your reply.

         IDoc to sFTP scenario

                                 

actual sender structure

IDOC  

  EDI_DC40                                                  

  E1ADHDR(1..99)                                            

         E1STATE  (1..99)

 

actual  Receiver Structure     

IDOC  

  EDI_DC40                                                   

  E1ADHDR(1..99)                                             

         E1STATE  (1..99)

requirement sender idoc is the below one

IDOC  

  EDI_DC40                                                   

  E1ADHDR(1..99)                                             

         E1STATE  (1..99)

  E1ADHDR(1..99)                                             

         E1STATE  (1..99)

         E1STATE  (1..99)

          

same idoc using at sender side and reciver side  in my scenario ,so based on E1STATE segment ,for each E1STATE segment  i need to create one file at target side.

in this case i have 3 E1STATE segments so i need to create 3 files at target side.

please give me solution for this.

Thanks,

Aadi

iaki_vila
Active Contributor
0 Kudos

Hi,

If i was you i would try to divide the problem in several parts:

1. Try to generate N files with a simple payload and a simple IF instruction in the mapping to generate 2 or 3 or 4, etc. You can try with a simple SOAP sender to do this and simple payload as i said.

When you have the first step completed, try the second step:

2. Implement the mapping with your IDOC sender. Try to configure the logic to generate the contexts as Venkat pointed.

3. Merge the two prototypes of the below steps.

Regards.

former_member187010
Participant
0 Kudos

Hi Aadi,

Please check this

1. In signature choose 1 as occurrence for source and 0..unbound for target structure.
2. In Mapping, map the root node i.e. IDOC node with below mapping.

3. Here are test result

Regards

Jitender

Former Member
0 Kudos

Hi ,

Don't need to get panic by hearing multi mapping .

In simple terms what you need to do is , in message mapping drag source and target structures -->click on signature tab -->in target structure change the occurrence to 0..unbounded .

IDOC 0..unbounded       MT_file 0..unbounded

E1STATE -->remove context-->MT_file

Regards

Venkat

Former Member
0 Kudos

Working with PO single stack it will not support 0-UB in both sides it works in classical scenario.

iaki_vila
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Vila ,

Thanks for your reply.

IDOC

    E1ADHDR(1..99)

         E1STATE  

   E1ADHDR(1..99)

         E1STATE

         E1STATE

this is my source structure so based on E1STATE segment ,for each E1STATE segment  i need to create one file at target side.

in this case i have 3 E1STATE segments so i need to create 3 files at target side.

please give me solution for this.

Thanks,

Aadi

iaki_vila
Active Contributor
0 Kudos

Hi,

Under the Message tag in the target mapping you should implement the logic to create so much tags as E1STATE tags. In this Aashish Sinha blog's you have an example of IDOC-FILE scenario 1..n:

Regards.