cancel
Showing results for 
Search instead for 
Did you mean: 

How we can add multiple condition in smartforms ???

Former Member
0 Kudos

Hello friends,

I have created one window in smartforms.

my condition is looks like....

IF ( WA_DATA-INCO1 = 'GRP' OR WA_DATA-INCO1 = 'GRQ' OR WA_DATA-INCO1 = 'GRR' )

AND V_NAME <> ''

BILL 1

ELSE

BILL2

ENDIF.

So, I have add condition in my node like.....

WA_DATA-INCO1 = 'GRP'

OR

WA_DATA-INCO1 = 'GRQ'

OR

WA_DATA-INCO1 = 'GRR'

V_NAME <> '' " Not Initial

*But here, It will take AND condition with not identical match.

I want any of first 3 and last one for checking*

Is it possible in smartforms?

Guide me please.

Full points rewarded if useful

Regards,

RH

Edited by: Ronny Hanks on Mar 19, 2008 7:47 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member200338
Active Contributor
0 Kudos

Hi,

Create a program line before the window. now write the coding as you have given in the program lines.

set global flag to indicate whether you want to process this or not.

Now goto to your window properties, click on condition tab, give the global flag name and the expected value.

Reward points if useful.

Regards,

Niyaz

Answers (3)

Answers (3)

Former Member
0 Kudos

by setting flag !!

Former Member
0 Kudos

Hi

declare global variable

use program line pass the global variable as output

write the code using the import parameters to set the INCO values to g_value

then assign the g_value to text element

no need of any condition in the text element

Regards

Shiva

sangeetha_sk
Participant
0 Kudos

Hi,

when go to text element's - condition tab.. you enter the condition in first line . then come to second line and press the button which is near to delete button and check button in the conditions tab. that is used to enter "OR"condition .In the third line, you enetr your condition.

example: a= b or c=d or e=f and g=h.

first line a = b

then in second line press "OR" button whihc is between Delete and Check button in condition tab.

then enetr c=d in third line.

then in 4th line press "OR" button whihc is between Delete and Check button in condition tab.

then in 5th line enter the condition e=f,

then in 6th line enter the condtion g=h.

Thanks

San

Former Member
0 Kudos

But San,

According to yr example,

It may understad like (a=b or c==d ) OR (e=f and g=h)

So, How it precess, we cant say.

but can u tell me..How to make group of all OR condiation and then AND condition ??

Regards,

Ronn

Former Member
0 Kudos

Except program lines....any other idea???

sangeetha_sk
Participant
0 Kudos

here it will be taken as ( a=b or c=d or e=f ) and g=h.

former_member739183
Discoverer
0 Kudos

Correct answer is this