cancel
Showing results for 
Search instead for 
Did you mean: 

Context Mapping Issue

silentbull
Participant
0 Kudos

Hello

I have the following structure and the target is idoc orders05.

- <task taskName="GRN Capture" taskStartTime="2015-09-02T07:00:26.600" taskEndTime="2015-09-02T07:01:04.010">

  <activity activityName="Image" text="" activityImageNo="50D29C21-AD47-49A1-9DC1-A97B2E3693FF" />

  <activity activityName="Text Input" text="636126" />

  </task>

- <task taskName="Asset Returns" taskStartTime="2015-09-02T06:59:55.610" taskEndTime="2015-09-02T07:00:07.147">

  <activity activityName="BB Basket" text="" number="3.000" />

  <activity activityName="Metal Wheel" text="" number="1.000" />

  </task>

My condition is if the attribute taskname = ;GRN Capture' and activityName under Activity = 'Text Input' then populate the attribute text which contain the value 636126. If this condition fails, I need to populate deliveryno which is in some other node into the target idoc.

I am struggling to get this in graphical mapping due to the conditions in different node and the parent node task occurring many times. The target element in BELNR in e1edk02.

Can someone give me a simple UDF to achieve this.

Sam

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Sam,

Just try like below,

Regards

Amarnath

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sam,


I am struggling to get this in graphical mapping due to the conditions in different node and the parent node task occurring many times. The target element in BELNR in e1edk02

You can concat @taskName and @activityName (set context to task) as in the screenshot below

This is for one field only. As for the other field, just negate the expression by adding not after the equalsS.

Hope this helps,

Mark

RaghuVamseedhar
Active Contributor
0 Kudos

Sam,

Please attach sample input and output XML. Above XML does not have DeliveryNo element.