Skip to Content
author's profile photo Former Member
Former Member

Require a Message Mapping for the Following Scenario

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 Target

Order-No Header

Segment(Attribute-Node)

Item |->Delivery-Num

Item

Segment(Attribute-Node)

RcvQuantity |->Delivery-Num

|-> Material-Num

|-> Quantity

That means For the Same Order-no if the item matches then RcvQuantity 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 item then separate IDoc should be created.

Please tell with what should Segment(Attribute-Node) needs to be mapped.

For example:-

we have

Sorurce :

Order-no Item RcvQuantity

A 1 10

A 2 20

A 1 10

B 2 10

B 1 10

C 1 20

C 1 10

D 3 20

Now Target:

IDoc

|->Header

|->Segment

|->Delivery-Num A

|->Item

|->Segment

|->Material-Num 1

|->Quantity 20

IDoc

|->Header

|->Segment

|->Delivery-Num A

|->Item

|->Segment

|->Material-Num 2

|->Quantity 20

IDoc

|->Header

|->Segment

|->Delivery-Num B

|->Item

|->Segment

|->Material-Num 1

|->Quantity 10

IDoc

|->Header

|->Segment

|->Delivery-Num B

|->Item

|->Segment

|->Material-Num 2

|->Quantity 10

IDoc

|->Header

|->Segment

|->Delivery-Num C

|->Item

|->Segment

|->Material-Num 1

|->Quantity 30

IDoc

|->Header

|->Segment

|->Delivery-Num D

|->Item

|->Segment

|->Material-Num 3

|->Quantity 20

Total of 6-IDoc needs to be created.

Kindly do the needy..

Thanq very much..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 30, 2011 at 07:11 AM

    HI,

    Can u please provide ur sender and receiver structure neatly

    Thanks,

    Enivass

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Prashanth,

      Find some field logic below, try using the similar logic "Delivery_Order_No" for the other fields

      1. Idoc

      Mat_num --> Remove Context ---> sort ---> splitByValue(value change) ---> collapse context ---> IDoc

      2. Material-Num

      Mat_num --> Remove Context ---> sort ---> splitByValue(value change) ---> collapse context ---> splitByValue(each Value) ---> IDoc

      3. Delivery_Order_No

      SortByKey ---> formatByExample ---> Collapse Context ---> splitByValue (each Value) ---> Delivery_Order_No

      SortByKey

      1st Input : Mat_num --> Remove Context ---> Ist Input

      2nd Input : Order_No ---> Remove COntext --> 2nd Input

      FormatByExample

      1st Input: Output of SortByKey

      2nd Input: Mat_num --> Remove Context ---> sort ---> splitByValue(value change)

      4.Quantity

      SortByKey ---> formatByExample ---> sum --->Quantity

      SortByKey

      1st Input : Mat_num --> Remove Context ---> Ist Input

      2nd Input : RCVQuantity---> Remove COntext --> 2nd Input

      FormatByExample

      1st Input: Output of SortByKey

      2nd Input: Mat_num --> Remove Context ---> sort ---> splitByValue(value change)

      Regards,

      Chandra Shekhar

  • Posted on Aug 30, 2011 at 07:16 AM

    Similar thread Need Mapping logic for the following scenario .

    Hope it helps.

    Regards,

    Sunil Chandra

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.