cancel
Showing results for 
Search instead for 
Did you mean: 

If statement with an AND in Transformation File

aditya_ponnala
Participant
0 Kudos

What would be the right syntax for If statement with an "if" statement and "And"?

INTRN=*IF(EMPGROUP=*STR(C) and *JOB=*STR(TEMP) THEN *STR(S); *STR())

When I use above syntax, transformation file is finding error with "And".

former_member186338
Active Contributor
0 Kudos

aditya.ponnala

You have number of question where I provided the correct answer, but it was not accepted. Please review!

aditya_ponnala
Participant
0 Kudos

I didn't accept in those questions because those answers didn't help. In this case it did and accepted the answer.

Thanks!

former_member186338
Active Contributor
0 Kudos

OK, looks like if you receive correct, but negative answer - you don't accept it!

Then next time you will get no answer from me.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Why not to read help???

https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.34/en-US/f9c4554f6faf1014878bae8cb...

There is no "and" operator supported!

"And" logic can be simulated by:

INTRN=*IF(EMPGROUP+JOB=*STR(CTEMP) THEN *STR(S); *STR())

From help:

"Condition1 and Condition 2 can contain multiple items that are added together (using the plus (+) sign)"

P.S. Even sample is provided in help:

Mapping Function 1: 
Product=*IF (product+ID+Entity=*Str(148552) then *str(MHarn); ID(1:1) = *str(C) then *str(XX); *str(YY))

Answers (1)

Answers (1)

aditya_ponnala
Participant
0 Kudos

Hi Vadim,

I tried searching in previous comments and couldn't find the help. Hence posted in the forum.

former_member186338
Active Contributor
0 Kudos

Sorry, but EPM help is always located on help.sap.com

How it's possible to work with product without reading help?