Skip to Content
0
Former Member
Nov 04, 2013 at 06:49 PM

Need Mapping Help

27 Views

Hi Experts,

I am doing outbound scenario IDoc(invoic.invoice05) to file. in that based on the material number and ID we should replicate the target structure.

Source structure fields,

E1EDP01 0..Unbound

Z1EDPM1 0..Unbound

ID 1...1

E1EDP02 0..Unbound

Mterail Number 1..1

Trget Structure is

RequestMessages> 1..1

<RequestMessage> 1..Unbound

<Searchcriterias> 1..1

<SearchCriteria> 1..Unbound

<ID>

<Mterail Number>

if Mterial is exist then we should replicate <RequestMessage> and <SearchCriteria> nodes.

ex:

Material

ID

1

A1

A2

2

B1

B2

B3

3

expected output xml should be

RequestMessages>

<RequestMessage>

<Searchcriterias>

<SearchCriteria>

<ID>A1</ID>

<Mterail Number>1</Mterail Number>

</SearchCriteria>

<SearchCriteria>

<ID>A2</ID>

<Mterail Number>1</Mterail Number>

</SearchCriteria>

</Searchcriterias>

</RequestMessage>

<RequestMessage>

<Searchcriterias>

<SearchCriteria>

<ID>B11</ID>

<Mterail Number>2</Mterail Number>

</SearchCriteria>

<SearchCriteria>

<ID>B2</ID>

<Mterail Number>2</Mterail Number>

</SearchCriteria>

<SearchCriteria>

<ID>B3</ID>

<Mterail Number>2</Mterail Number>

</SearchCriteria>

</Searchcriterias>

</RequestMessage>

<RequestMessage>

<Searchcriterias>

<SearchCriteria>

<ID></ID>

<Mterail Number>3</Mterail Number>

</Searchcriterias>

</RequestMessage>

This how target is expecting how to handle the context? Please help me on this and highly appreciated for your help.

Regards,

Sanjay.