cancel
Showing results for 
Search instead for 
Did you mean: 

How to map IF condition

Former Member
0 Kudos

Hi experts,

I have one problem,

as

I have field 1, if value of field 1 is 001, receiver 2 will be mapped with field 2.

if value of field 1 is 002, receiver 2 will be mapped with field 4.

How i can do it ?

Please help,

Regards,

Study SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use IF condition Like this.

have field 1, if value of field 1 is 001, receiver 2 will be mapped with field 2.

Double click on Field 2 in aMapping window..

Take a Constant Value of 001 Use ( IF Then condition )

If Constant 001 then field1 to Field 2

If value of field 1 is 002, receiver 2 will be mapped with field 4.

Take a Constant Value of 002 Use ( IF Then condition )

If Constant 002 then field1 to Field 4

Regards,

Ramesh.

Answers (4)

Answers (4)

sunil_singh13
Active Contributor
0 Kudos

Hi,

use field1 ->equals ->001

on the upper side of if put field2 and on the else part

use if without else and in that

field1->equals->002

then put field 4

Reward points if helpful

Thanks

Sunil Singh

GabrielSagaya
Active Contributor
0 Kudos

constant>equals>if without else---> field2

(001) | receiver2-->

Field1----

constant>equals>if without else---> field4

(002) | receiver2-->

Field2----

Former Member
0 Kudos

Thanks for every one,

I have done my work.

I used

field 1 --> equal

constant(001) ---> IF without Else --> Value of field 2 --> Receiver 2

Field 1 --> equal

constant(002) ---> IF with Else --> Value of field 4 --> Receiver 2.

In the position of else Result of IF without else is mapped.

Regards,

Study SAP

Former Member
0 Kudos

Hi,

Can u elaborate, what is receiver 2 here?

Is that the field of target structure?

Regards

Bhanu

Intelligroup.

former_member8655
Active Participant
0 Kudos

Hi

you can use graphical mapping tool provided in XI. There is function IfThenElse which can be used for your case. you can use constants for comparision and then assign the value as per your requirment.

refer to this link.

http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/frameset.htm

Thanks

- Mitesh