cancel
Showing results for 
Search instead for 
Did you mean: 

createif with false ?

Former Member
0 Kudos

Hi,

is there a possibility to use createif with false condition ?

if (condition is false) then createif target node ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gordon,

Can you explain your requirement with an example?

Regards,

Jai Shankar

Former Member
0 Kudos

requirements:

i want to create a segment (E1edka1) with createif ... if my UDF output is false or true.

I have a udf and if it´s value is true ... the segment shouldnt be created.

If the output of the UDF is false ... than the segment should be created.

undestand ?

Former Member
0 Kudos

Gordon the only way around this if you are using a UDF to give you the values is to output the other way around... so for example your normal conditions for an output of true would now out put false and visa versa...

Former Member
0 Kudos

Gordon,

do this way.

use UDF "output" + New UDF ( here we convert true to flase and false value to true)assign it to IF without else statment

Ex: UDF output =True

Ture+UDF =Flase -> pass the input to IF with out else statement which is flase so no segement will be created

similarly false+UDF=True -> pass the input to IF with out else statement which is true so segement will be created

Former Member
0 Kudos

Hi Gordon,

>>I have a udf and if it´s value is true ... the segment shouldnt be created.

If the output of the UDF is false ... than the segment should be created

This can be handled in advanced UDF. There is a function called suppress. You can use this for your purpose.

resultList.suppress

will not create target node.

Go through the link to understand the usage

http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm

Regards,

Jai Shankar

Former Member
0 Kudos

Jai ... i cant find anything at this link ?

Is it possible to create a node by udf ?

Former Member
0 Kudos

Gordon,

You are mapping the UDF to a target node. Correct? If you use the function resultList.suppress the target node will not be created. If you do not use this function the target node will be created. Is this not your reqquirement?

From SAP Help

<i>

ResultList.SUPPRESS

Constant that causes a field and its subnode to be ignored during processing

</i>

Regards,

Jai Shankar

Former Member
0 Kudos

Jai...

yes you´re right! I will use this function.

Thank You.

Former Member
0 Kudos

Hi Gordon,

Welcome.:-)

Take care while using this function. Since this function will supress the creation of <b>subnodes</b> too.

Regards,

Jai Shankar

Former Member
0 Kudos

This is what i wanted

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

In general

source node - exists - true -- createIf -- target node will be created.

Your requirement is

source node - exists - false --Use <b>NOT</b> function -- createIf -- target node will be created.

See the below link

http://help.sap.com/saphelp_nw2004s/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm

Regards

Chilla

Former Member
0 Kudos

yes you can use fixed values to reverse the parameter... so if you have false going in then false becomes true....

does that make sense?

You goto conversion functions---> Fixed Values

and in the table you have True and False on one side and on the other you have False Directly opposite True and True directly opposite False

Message was edited by:

Alex Ong

Former Member
0 Kudos

That is exactly the way if have done it... but it seems a little bit confusing

Is there no other way to get this ?