cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with mapping

Former Member
0 Kudos

Hi Gurus,

I am struggling with mapping. Please help me out.

My Input xml looks like below

eg1:

eg2:

In last ArticleInformation node, we will receive all ConditionItems.

In output, ArticleInformation we map to E1WPB02 and ConditionItem to E1WPB03

My requirement is If LineNumber of ArticleInformation == LineNo of ConditionItem, move conditionItem(E1WPB03) node under to corresponsing ArticleInformation (E1WPB01). Just like below. (note: I just used split by value here). But some times, we are having more than one Condition item for same article and splitbyvalue is not working in that case.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Can you try sort function followed by split by value(value change)?

Answers (2)

Answers (2)

Ryan-Crosby
Active Contributor

Hi Tapasya,

I think along the same lines of what Raghuraman has already mentioned but with a slight modification -

sort by line -> split by value (change) -> collapsecontext -> split by each value

Taking that approach should ensure that only one entry is created for each line item even when multiple conditions exist for an item.

Regards,

Ryan Crosby

Former Member
0 Kudos

Thanks Raghuram for quick response. Some times, we are missing conditionItem, only we are getting ArticleInformation. SplitbyValueChange won't work in that case

former_member186851
Active Contributor
0 Kudos

Incase of no condition Item means no value should be passed right?

I think using sort before should help.

Requirement is little unclear, each condition item should generate E1WPB03 and each article should generate E1WPB02 right?