cancel
Showing results for 
Search instead for 
Did you mean: 

Changing value of a field in mapping as per condition

Former Member
0 Kudos

Hi Experts,

I have one requirement in IDoc mapping to EDI structure.

I want to change the value of a field depending on the condition. But the problem is the field is mapped at higher level than the condition.

For example:

Say i have a source structure in IDoc with name Source1 and target structure Target1. Source1 is mapped to Target1. Both of these structures have multiple occurances. So in general out structure will look something like below:

Source1-> Target1

Source2->Target2

Source3->Target3

Now i want to change value of one field from Target1 structure depending on Value of one field from Source3. At the runtime when Target1 structure is getting filled Source3 value is not visible so I am not able to set a proper condition.

When at lower level we get value of Source3 can we change value of already filled structure Target1?

Thanks,

Atul

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Through UDF we can check the value of source[1]with source[3],if there r some changes then source[3] can be mapped to target[1].

What is your exact requirement?It may help to come up with a proper UDF.

former_member192295
Active Contributor
0 Kudos

Hi,

Use ABAP/JAVA mapping it will help u, graphical mapping this requirement little bit critical.

Former Member
0 Kudos

>>At the runtime when Target1 structure is getting filled Source3 value is not visible

Write a advanced UDF and give Cache as "Queue".

It will give you all the values of source side in an array,there you can use correct index and assign it to receiver side.

Thanx

Aamir

Former Member
0 Kudos

Hi Aamir,

Thanks for your reply.

If possible can you give any sample code for this kind of UDF?

Thanks,

Atul Patil