cancel
Showing results for 
Search instead for 
Did you mean: 

How to skip a line item based on condition in PI Mapping

former_member744905
Discoverer
0 Kudos

Hi Experts,

I was trying to skip the line item using createif function. But I am not able to do this for looping.

My requirement is below.

In IDOC there is segment E1EDL24. In this when LFIMG is equal to 0, the target system does not require that segment itself.

When I did mapping as below, it is checking the first E1EDL24 and if value of LFIMG is 0, it is skipping the line item.

But E1EDL24 segment will be more than 10 segment. I need to validate each one and based on LFIMG , I need to create the Line item segment.

Please suggest how can I achieve this requirement.

Thanks in advance,

Remya.

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Remya,

Right click on LFIMG, in context select next level.

FYI..If you use removeContext, then entire queue of LFIMG (all values in IDoc) are considered. Can lead to wrong result.

yeeloon-khoo
Explorer
0 Kudos

Agreed, normally I do not use removeContext, in stead using above method or formatByExample to change the context. If use removeContext, in case of multiple idoc processing at one time, LFIMG value from different idoc also combined together and wrong.

vinaymittal
Contributor
0 Kudos

use removecontext after LIFMG then give it a try

former_member744905
Discoverer
0 Kudos

Hi,

But If I use remove context, how can I remove the segment which is carrying the 0 value..

Can you please elaborate..?

Thanks in advance

Remya

former_member186851
Active Contributor
0 Kudos

Hello Remya,

Try using remove context followed by the condition.

And finally use split by value in case multiple line items are not coming.

vinaymittal
Contributor
0 Kudos

LIFMG-->RemoveContext----->(if greater than 0)--->CreateIf--->target node