cancel
Showing results for 
Search instead for 
Did you mean: 

if and if without else

Former Member
0 Kudos

Hi all,

In the functions i am using ifwithout else function. in that it is showing use SUPPRESS values are true or false what is the meaning of this. can any one explain with example.

thanks for reply...

regards

ramu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Read this OSS Note as SAP has changed the way "IF" works...

https://service.sap.com/sap/support/notes/1090369

Former Member
0 Kudos

Ramu,

When you use the "<b>IF without ELSE</b>" function,

1. You get a defult value "<b>false</b>" in the dropdown box under "<b>ifWithouElse Properties</b>" (if you double click on "ifWithoutElse" function).

2. So if it is "<b>False</b>" then the example explained by me will work as it is.

3. But, even if you change the value to "<b>True</b>" it will give the same result.

I don't know why it gives the same result, but this is true.

Kindly check this and test in your mapping.

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

<i>In the functions i am using ifwithout else function. in that it is showing use SUPPRESS values are true or false what is the meaning of this. can any one explain with example.</i>

If you use ifwithout else ...This function asks you about true and false. if you give "true" it will SUPRESS node if value passed is true.same with false.

Regards,

Akshay.

    • reward points if find useful.

Message was edited by:

Akshay Jamgaonkar

Former Member
0 Kudos

Hi Akshay,

I didn't understand that it will supress node if value passed is true. Can u explain with example please.

regards

ramu

Former Member
0 Kudos

Hi Ramu,

Whenever you use if or if without else condintion, it checks for the condition which you want to validate during your mapping and supress the fault values.

So, the option "<b>true</b>" in <b>if</b> condition will act as in below example.

<b>Example:</b> if --> age <= 17 then Map to target

age = 20

age = 25

age = 12

age = 05

In this condition if age is less than or equal to 17 then only value will be passed otherwise it will be supressed. So the result will be

17

__________

__________----> supressed for value 20

__________----> supressed for value 25

12

__________

05

__________

I hope this will let you understand the concept.

***Reward Points, if found helpful.<b></b><b></b><b></b><b></b>

Former Member
0 Kudos

Hi Sarvesh,

Thanks for your reply. I understood the fucntionality of if conditon. but my question is what is the meant for Use SUPPRESS values are 'true' or 'false'. I think u understant my question.

regards

ramu.

Former Member
0 Kudos

Hi,

suppose my requirement is like .

check value of src with "SAP" otherwise dont generate the target node itself.

so i will do equalss constant "SAP" and apply this to if without else.

now based on result of if condition..true or false it will generate node....or SUPRESS that value.

so if i am passing SAP,123,GAP,DAP,SAP.....as source

it will give me

val,SUPRESS,SUPRESS,SUPRESS,val...in target queue.

Regards,

Akshay.

    • reward points if find useful.