Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to suppress segment that do not meet the filter

Hello Experts,

I am having problems suppresing the segment that do not meet the filter. Even if I already put a filter, the target segment still produces to line Item when the only needed is one.

Sample Scenario:

LineItem1

SegmentA

Field1 Correct Value

Field1.1 Correct Value

Field1.2 Correct Value

SegmentA

Field1 Wrong Value

Field1.1 Wrong Value

Field1.2 Wrong Value

LineItem2

SegmentA

Field1 Correct Value

Field1.1 Correct Value

Field1.2 Correct Value

SegmentA

Field1 Wrong Value

Field1.1 Wrong Value

Field1.2 Wrong Value

LineItem3

SegmentA

Field1 Correct Value

Field1.1 Correct Value

Field1.2 Correct Value

SegmentA

Field1 Wrong Value

Field1.1 Wrong Value

Field1.2 Wrong Value

What I need to do is to just consider in every LineItem the correct SegmentA. I have already tried to filter this using IF function but still the 2nd Segment with incorrect value is being produced. Is there a function that can suppress the segment with wrong value? Or do you have a UDF template that suppresses a segment with wrong fields (--I don't have much knowledge in Java coding and creating UDF)?

Please help. Thanks a lot.

Former Member
Not what you were looking for? View more on this topic or Ask a question