Skip to Content
0

Duplicating the values based on the occurrence of values in a particular segment

Nov 25, 2016 at 06:28 PM

39

avatar image

Hi Experts,

I have a development which will convert xgt matmas to xml file but in the idoc E1MARMM segment will be having number of occurances and rest of the segments will be having only one occurrence so now in the file records should be created for the unique values of the segment E1MARMM.

file structure will be like

MT_file

Record

MAKT

a

b

c

MARA

d

e

MARM

f

g

values of a,b,c,d,e in the MAKT, MARA will be having same occurrence respectively and f,g in MARM will be having more than one occurrence (E1MARMM will be mapped to MARM) so elements of MARM should be created based on the number of elements of the E1MARMM and MAKT & MARA should be copied in the each line of the record.

Please help me to create this logic.

PFA of the output file for reference

file.txt (1.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers