cancel
Showing results for 
Search instead for 
Did you mean: 

How to check multiple conditions.

former_member223432
Participant
0 Kudos

Hi,

I am performing the below mapping.

Whenever there is QUALF = 'C' or 'I' or 'v'..map from E1EDL42-belnr if No QUAL found then Map from E1edl20-vbeln.

The above functionlaity is working fine if there is C or I or V in qualf field.But failing when its empty.

I am using EqualsS and OR to perfom the above functionality but somehow its giving SUPPRESS values as input to OR functionality because the values in QUALF is 'nulll' and the oR expects either true or False.

PLease let me know how i can resolve this. here is the mapping.

qualf----


Equals----


constant(C)----


qualf----


OR(C and I)

Equals--


OR(Cand I or V)--


if yes then belnr else vbeln

constant(I)----


qualf----


Equals----


constant(V)----


regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Try to use qualf--MapWithDefault: in this case, if there suppress passed, the function still give a default value.

Liang

former_member223432
Participant
0 Kudos

thanks rodrigo and liang ji..

Problem solved

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

before you validate the values C,I,V, validate if the value is equal "". if true validate the content. also pay attension coz the field may not come, so you should validate if it exist first of all.

that should solve your issue

former_member223432
Participant
0 Kudos

Hi rodrigo,

I did what u said..but still not fgetting the right output..

Any more suggestions please...realy appreciate your help.

regards

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

in case of of empy value you should map the vblen field.

your mapping should look like

if qualf----

-


Equals----

-


constant("")----

-


(true)map vblen

else

qualf----

-


Equals----

-


constant(C)----

-


qualf----

-


OR(C and I)

Equals----


OR(Cand I or V)----

-


if yes then belnr else vbeln

constant(I)----

-


qualf----

-


Equals----

-


constant(V)----

-


that should solve your issue.

does the qualf exist in the structure or it has a null value?

if boths may accur your mapping should be

if qualf----

-


not Exist----

-


(true)map vblen

else

if qualf----

-


Equals----

-


constant("")----

-


(true)map vblen

else

qualf----

-


Equals----

-


constant(C)----

-


qualf----

-


OR(C and I)

Equals----


OR(Cand I or V)----

-


if yes then belnr else vbeln

constant(I)----

-


qualf----

-


Equals----

-


constant(V)----

-


there is not another possiblity. also you can validate the qualf field in a UDF to check if it exist and if it has a null value but SAP recommends first solve the validation ussing the standar functionality and if it not possible use a UDF. you are missing something in your mapping, please check it out.

Thanks

Rodrigo P-.