cancel
Showing results for 
Search instead for 
Did you mean: 

Reg SUPRESS in message mapping

Former Member
0 Kudos

Hi Guys,

i have a requirement to map the items from source based on a condition(if flag = X).if the condition is true then need to create item segment in target else donot create segment.

here iam facing a problem with SUPRESS.

if the first item is false and the second item is true and third is false and fourth is true....then, iam getting the SUPRESS for false values and not able to create the segment even for true values.

how to remove the supress... suggest me.....this is an tough requirement for me.

Thanks,

M.S

Accepted Solutions (1)

Accepted Solutions (1)

GabrielSagaya
Active Contributor
0 Kudos

Assume if Queue have

123

234

SUPPRESS

233

SUPPRESS

100

345

SUPPRESS

Your target should have

123

234

233

100

345

If so

Please follow

Function myudf(String a[], ResultList result, Container container)

{

for(int k =0 ; k< a.length; k++)

{

if (!a[k].equalsIgnoreCase(ResultList.SUPPRESS))

result.addValues(a[k]);

}

}

Answers (3)

Answers (3)

Former Member
0 Kudos

I dont know, but for one of my UDF, SUPRESS played major role;

I had similar problem

I did


IF<condition>;
  then create node/value
else.
   SUPRESS.
endif.

jyothi_anagani
Active Contributor
0 Kudos

Hi,

Do This..

 
Flag--------------------\
Constant(X)------------->equalS-------->CreateIf------------->ouputnode 

Thanks.

Former Member
0 Kudos

my requirement is if src = X then map the source node to target node

siddhesh_pathak4
Contributor
0 Kudos

Try to use below UDF, this may help

for (int i; i.length();i++)
{
   if(b.equals("X"))
  result.addValue(a);
  else
 result.addValue(" ");
}

Pass a as your source node and b for src.

Former Member
0 Kudos

Hi,

CreateIF() node function should be fine for this requrement.

Refer to this link:

http://help.sap.com/saphelp_erp2004/helpdata/EN/d9/3033f96c79674f90e3ab8d101a595b/frameset.htm

Yo ucan find many links related to this function.

Regards,

Divyesh

Former Member
0 Kudos

Can you pls give me the full code of this UDF...

jyothi_anagani
Active Contributor
0 Kudos

Hi,



Source       \
                   \
                     equalS--------------if------------------------->Target
                   /           Source---then
Constant(X) /

It wii Surely Work.

Former Member
0 Kudos

HI Jyothi,

If you didnt understand the issue pls donot reply with in appropriate answers....pls ask to explain the issue...

Thanks for the co-operation

siddhesh_pathak4
Contributor
0 Kudos

Hello,

This is the complete UDF what problem you are facing....

siddhesh_pathak4
Contributor
0 Kudos

Hello,

Try to maintain the same context of source fields. that can solve your problem. You have to play with context.