cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple smartform conditions

Former Member
0 Kudos

Hi,

I am facing problem with multiple conditions for a node.

My requirement is that node should be displayed only

a) Amt is greater than zero

b) Invoice type NE 'IV' and company code NE '001'.

The condition fails in any of one scenarios ( tried with OR and AND combinations).

Any advise or alternative solutions would be helpful .

Thanks

Regards

Reddy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It wud be better to create a W_flag variable in Global definitions TYPE FLAG..

Then create a Code node (Create -> Flow Logic -> Program Logics) .. keep this code node just before your existing node...

Put w_flag. w_amount , w_invoice_type and w_company_code in the Input Parameters. and Put w_flag in out parameters as well...

Now code like this as below in the editor..

if w_amount > '0'.
       if w_invoice_type ne 'IV' and w_company_code ne '001'.

                 w_flag = 'X'.
       endif.
endif.

Now in your existing node you can use this Flag as a condition .. So put this in Condition tab... as below:

Field name     relational operator       Com value
 
W_FLAG             =                            'X'

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Thanks. Resolved with your inputs.

Regards

Reddy

brad_bohn
Active Contributor
0 Kudos

Well, that sounds like three simple chained AND conditions; I'm not sure why it wouldn't work. You can debug it in the generated smartform code if necessary. However, for complex conditions, you can always create a global variable flag (type XFELD) and use a programming node to set the value of the variable prior to your other node. Then you simply need to check the value of the flag instead of checking all of the other conditions for your node.