cancel
Showing results for 
Search instead for 
Did you mean: 

facing an issue while mapping

praveen_vanga3
Participant
0 Kudos


Hi ,

I am facing issue in mapping.

I am developing IDOC to flat file scenario, in one of the segment is repeating so based on repetitive segment target file needs to be created.

suppose  E1LFA1M contains  LIFNR   ------ 1000

                                                NAME1 ------ ABC

                                                NAME2 ------ XYZ

                                                LAND1 ------- IN

                 E1LFB1M  Contains BUKRS ( Repetitive Segment )

                                                  1000

                                                  2000

file will be like below:

LIFNR      NAME1      NAME2      LAND1      BUKRS

1000           ABC           XYZ           IN              1000

1000           ABC           XYZ           IN               2000

Can you guide me how to map source to target nodes in the below screen shot.

Thanks

Vanga

Accepted Solutions (0)

Answers (2)

Answers (2)

nabendu_sen
Active Contributor
0 Kudos

Hi Vanga,

E1LFA1M is occurring once at Source IDoc and you want replicate the same value at the multiple occurrence of Target fields (Occurrence depends on E1LFB1M).

You should use "copyValue" function with Index '0' to copy the same value multiple times at the Target side. (Sender Field 1: N Target Field ---Same value needs to be copied) .

Standard Functions in PI 7.0 - Process Integration - SCN Wiki

If you face issue, change the Index to '1' then check.

Regards,

Nabendu.

former_member184720
Active Contributor
0 Kudos

I see that you have changes the occurrence of the message type to 0..unbounded. Are you trying to create separate file for each line?

file will be like below:

LIFNR      NAME1      NAME2      LAND1      BUKRS

1000           ABC           XYZ           IN              1000

1000           ABC           XYZ           IN               2000

If everything has to be in one file, you shouldn't change MT occurrence. Instead just change the occurrence of Record segment to 0..unbounded.

Then map E1LFB1M -> remove context ->Records.

For fields under E1LFA1M, use "useoneasmany" function to repeat as many time as E1LFB1M occurs. Please search for useoneasmany function, you'll find lot of blogs on SCN.

for BUKRS, it should be a direct mapping.

Try above suggestions and share your findings.