cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple if conditions under message mapping

venkatasap
Participant
0 Kudos

Hi Sap All.

i have got a requirement in an Idoc to file Interface where i need to compare the sender node field with 2 values and based on the result i need to map to target field.

for example :

If ZCOLLAB = 'X', then set 'NEW'. If ZCOLLAB = space, then set 'ACKNWL' to the target field.

so how i can achieve this .

will be waiting for any best answer.

regards.

Varma.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Varma,

First use If with Else function and second if should be If without else.

If ZCOLLAB = 'X'

then send "NEW" as constant

Else Check if ZCOLLAB = space

then send "ACKNWL" as constant

Thanks,

Answers (2)

Answers (2)

Former Member
0 Kudos

You can use fixValue but I won't recommend using it just for couple of entries. If you had 3 or more "if" statements, then using fixValue or UDF would have been better ... in your present situation, simply use graphical "if" twice.

venkatasap
Participant
0 Kudos

Hi .

Thanks for your response.

but in this case how i can join both If Statements and then pass the value to target.

the main point is here i need to compare only 2 conditions and then pass the value to target based on the condition.

will be waiitng for a good answer.

regards.

Varma

Former Member
0 Kudos

Hi Varma,

in that case I recommend to use a Java Mapping instead of a graphical mapping:

http://help.sap.com/saphelp_nwpi711/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

Kind Regards,

Gábor

Former Member
0 Kudos

Hi,

Use FixValues function, in this put X & space in key column and value column entry will be NEW and ACKNWL respectively .

So, your mapping will be :

Source --> FixValues -


> Target

I hope this will certainly solve your query.

Regards, Gaurav.