cancel
Showing results for 
Search instead for 
Did you mean: 

GUI Mapping - Changing Suppressed context into a value

Former Member
0 Kudos

Hi

I have an issue with SUPPRESS

I have the following result from part of a mapping

SUPPRESS

SUPPRESS

SUPPRESS

VALUE

SUPPRESS

VALUE

SUPPRESS

This has the correct number of contexts, but i need to do different tasks dependant if the value is present, i.e 'IF'

If the value is present do one task

ELSE do something different

Is there any simple method to turn SUPPRESS into a value IF can interpret ?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Is there any simple method to turn SUPPRESS into a value IF can interpret ?

Yes, the easiest way is to use mapWithDefault.

e.g


Source -> mapWithDefault:SUPPRESS -> equalsS -> your IF logic
                Constant:SUPPRESS -> /    

Hope this helps,

Mark

former_member854360
Active Contributor
0 Kudos
public void RemoveSuppress(String[] a,ResultList result,Container container){
for (int i=0; i<a.length;i++)
{
if (!a.equalsIgnoreCase(ResultList.SUPPRESS))
{
result.addValue(a);
}
}

ORRRRRRRRRR

you can use COLLEPSECONTEXT standard funtion.

source--->Splitbyvalue(Each value)--->Collepsecontext----->Target

Using collapseContexts() puts the first values of all contexts into a context. Empty contexts are replaced with an empty string:

http://help.sap.com/saphelp_nw04/helpdata/en/58/cd834014d26f1de10000000a1550b0/content.htm