cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Mapping n:1

deva_gembali2
Participant
0 Kudos

Dear Experts,

      Source side( Header and detail files )(0-unbound) which is map to Orders IDOC at target side.

How can i map , Header record of same Order Number of Line Items Records of same order Number ,which map to IDOC structure.

Accepted Solutions (0)

Answers (4)

Answers (4)

ambrish_mishra
Active Contributor
0 Kudos

Hello Deva,

First of all, you need to ensure that the collection of Header and Item data for the sales order is sorted by Order number. If it is not coming as sorted, you can apply a simple XSLT. you may also need to group the related Order lines by Order number.

Assuming your Header message also has an Order number field like lineitems, You can simply create IDocs based on Records else you can do so by the way you have shown in screenshot... You will have to build up the logic around that.

The IDoc structure is straight forward and you can map fields as per the functional requirement.

Hope it helps

Ambrish

nabendu_sen
Active Contributor
0 Kudos

Hi Deva,

You can sort both the Order Numbers coming from Header and Line item node. You can use UDF to take this input. If you want to create IDocs for the Order Numbers present in both nodes or any one node or you want to remove duplicates....whatever is your logic to generate IDocs.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Deva,

It depends on your mapping logic, have you got mapping document from functional team?

You have to think if Order Line has more than one record in file in that case how many records you have to create in ECC? like same way for Order Header.

If order Line number is same for multiple records how many IDocs u have to create?

Building mapping logic not difficult however u have to know answers to above questions .

Thank you,

Raj

deva_gembali2
Participant
0 Kudos

Hi Raja,

My File structure would be like

Header : 0-unbound

Multiple Order numbers like Order 1, order 2,order 3...

Line item file : 0-unbound

Multiple order numbers like  Order 1,Order 1, Order 1, Order 2,Order 2, Order 3 etc

Target side, Multiple IDOCs will be generated by logic :

Order(H) --> remove context-->splitbyvalue (value change) --> collapse --> IDOC

Now, my question: how to assign LineItem Orders to each particular IDOC ?

What is the mapping logic ?

Regards,

Deva

former_member184789
Active Contributor
0 Kudos

For n:1 mapping, You cud do as per below option, apart from BPM:

http://wiki.sdn.sap.com/wiki/display/XI/Multi-Mapping+using+Java+Mapping