cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on Mapping Logic

sahithi_moparthi
Contributor
0 Kudos

Hi All,

  I need some help on the UDF.My scenarios is as below:

Source side:
Transporation stage 1   0-999
       ItemNo:00010
       Item NO:00020
        Item NO :00030
Transporation stage  2  0-999
        Item NO:00020
        Item NO :00030
Item:                             0-999
    ID :000010
Deliverydetails
     ID :80000235
Item:
ID :0000020
Deliverydetails
  ID:80000235
Item:
ID :0000030
Deliverydetails
  ID:80000236


Target side:

E1EDK03 - It has to repeate based on the number of transportaion stages.
Under E1EDK03,have another segment
           YE1EDK03 - has to repeate based on the ItemNO
But YE1EDK03 has fileds like:
            Item No :
           Stage :
          DEliver no:
The output shuold be like:
E1EDK03
     YE1EDK03
          ItemNo:000010
           Stage   :1
          Deliver :8000235
     YE1EDK03
          ItemNo:000020
           Stage   :1
          Deliver :8000235
E1EDK03
  YE1EDK03
          ItemNo:000020
           Stage   :2
          Deliver :????

Here the item 20 delivery number has to populate.
      Here i'm not able to retrieve the Delivery number(????).So can anyone help what function i have to use or any UDF??

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Santhoshi,

check below screen shot that may help you i have replicate ur example as below.:

Regards

Gagan

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Maybe you can try this mapping:

For E1EDK03

For YE1EDK03: Since you are basing your split on the number of unique ID number, it is best to use this instead of ItemNo

For Item No:

For Stage

For Deliver No use the Delivery Item ID

Test Case:

Hope this helps,

Mark

sahithi_moparthi
Contributor
0 Kudos

Hi,

  Thanks for your reply.But i didn't acheive completely.In every stage i have item assignment node.So that represent in which stage the items are delivered.If you see the below screenshot ,the item is missing.so the Item 10 delivered at the first stage.Like this we need to identify in which stage the items are delivered.

And the last highlighted contains items with delivery like below:

Item:                             0-999

    ID :000010

Deliverydetails

     ID :80000235

Item:

ID :0000020

Deliverydetails

  ID:80000235

Item:

ID :0000030

Deliverydetails

  ID:80000236

So,if i have 2 deliveries,but the stage is one..then it is failing.

gagandeep_batra
Active Contributor
0 Kudos

Hi Santhoshi,

i am doing with above example plz check below and i am using same function also.

Regards

Gagan

sahithi_moparthi
Contributor
0 Kudos

Hi,

Thanks for your help.

gagandeep_batra
Active Contributor
0 Kudos

Hi Santhoshi,

You can use Node functions  Use OneAsMany function to achieve  this.

And also can you upload source and target xsd structure here?

Regards

Gagan