cancel
Showing results for 
Search instead for 
Did you mean: 

How to repeet same segment in IDOC for diffrent inputs in source

Former Member
0 Kudos

Hi Experts,

I have a requirement. My secnario is file to IDOC. I have three fields in each record of source file like below.

Emp1, Name1, Sal1;

Emp2, Name2, Sal2;

Emp3, Name3, Sal3;

My requirement is, there is one segment (E1EDK14) in IDoc With Cardinlay 0..99. In that Segment there are two fields with cardinaliy 0..1 like Qualf and orgid and as usal one mandatory SEGMENT attribute.

I need to map EMP1 and Constant (001) to the segments (E1EDK14) Qualf adn Orgid and Name1, Constant (002) to the same segment Qualf and Orgid and Sal1 and constant(003) to same segment Qualf and Orgid.

Like wise for second row, i need to repeet the same segment.

In general, i need to repeet same segment along with its fileds for each value in the row.

Kinldy suggest some sloution.

Thnx

Subbu

Accepted Solutions (1)

Accepted Solutions (1)

former_member518917
Participant
0 Kudos

have u tried this using Duplicating the Field?

Answers (4)

Answers (4)

former_member206760
Active Contributor
0 Kudos

Rama,

suppose you have structure like

source_MT(message type)

records 0..un

+EMP

+Name

+SAL

then MAP like this ;

records( change the context to the source_MT)----


>E1EDK14 ( this will repeat E1EDK14 according to the number of records)

then EMP-->qualf like dat..

see if it works

Former Member
0 Kudos

Thanks all.... Infact i tried this option before posting this question to SDN, But at that time it was not working...Now it is working...

Thnx

Subbu

former_member193376
Active Contributor
0 Kudos

You can duplicate the node as long as you dont duplicate it more than the max occurances

Former Member
0 Kudos

Right click on E1EDK14 and select Duplicate Subtree for creating duplicate nodes.

former_member181962
Active Contributor
0 Kudos

Hi,

As Ritu said, In your target message type in Message Mapping, Right Click on E1EDK14 and chose Duplicate Subtree.

Then map a constant for the E1EDK14 node and SEGMENT attribute.

Map a constant 001 in the first occurance of QUALF in E1EDK14 and EMP1 field to the ORGID

similarly do the same for the next two occurances of E1EDK14