cancel
Showing results for 
Search instead for 
Did you mean: 

Map default values in Header based on multiple values in the line item

former_member187447
Participant
0 Kudos

Hi

I have a scenario in which the Header field of an IDOC should be populated with some default values based on some mixed mvt types in the line items.

eg:

Header -


> Delivery type -


> needs to be mapped to A (for X of line item 1)or B (for Y of line item 2) or C (for Z of line item 3 )

based on line items field

line item1---> mvt type---> X

line item 2-->mvt type----->Y

line item 3 -


> mvt type -


> Z

mvt types doesnt necessarily have to come in that order and even the same mvt type can repeat in multiple line items.

Can we achieve this logic in XI ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think if you include removeContext, Sort, SplitByValue (on Value Change), CollapseContext to mvt type in all line items and then use ifelse condition to achieve your result.

I will give an example of line Item1

mvt type --->RemoveContext ->Sort>SplitByValue(on value change) --> CollapseContext

Use the above mapping to IF function and check if it is having X, Y or Z then map the appropriate value to target field.

Do the same for rest of the line items.

Answers (0)