Skip to Content
0
Former Member
Sep 11, 2011 at 12:49 PM

Require a message mapping for the following scenario.

16 Views

Hi,

I require a Message mapping for this Logic.

In the Source I have 4 fields and in the Target side, the fields should appear like this.

Source Structure- File

Order_No

Date

Mat_No

Quantity

Target Structure-IDoc

IDoc

|-> Header

|-> Delivery_Order_No

|-> Recv_Date

|-> Item

|-> Delivery_Order_No

|-> Material_Num

|-> Recv_Quantity.

That means For the Same Order-no if the Material number matches then Recv_Quantity should be added and for this whole 1 IDoc should be created.

Even if the Item matches but the Order-no doesnot match then separate IDoc should be created

Also If the Order-no matches but not Material number then also separate IDoc should be created.

For example:-

we have

Source Structure- File

Order-no Date Mat_No Quantity

A 01/02/2011 1 10

A 01/02/2011 2 20

A 01/02/2011 1 10

B 01/02/2011 2 10

B 01/02/2011 1 10

C 01/02/2011 1 20

C 01/02/2011 1 10

C 01/02/2011 3 20

Target Structure-IDoc

Delivery_Order_No Recv_Date Material_Num Recv_Quantity

A 01/02/2011 1 20

A 01/02/2011 2 10

B 01/02/2011 1 10

B 01/02/2011 2 10

C 01/02/2011 1 30

C 01/02/2011 3 20

So for this example total of 6-Idocs created. That means for example if Order_No is A When the Mat_No is 1 the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly if Order_No is A when the Mat_No is 2 then separate IDoc needs to be created with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Like wise the process goes on upto C.

Kindly do the needy..

Thanq very much in advance..