‎2009 Sep 24 10:32 AM
Hi,
I need to put a condition in smartform like below:
(IT_TAB-GRADE = '26' OR IT_TAB-GRADE = '27') AND IT_TAB-NO_INDC = 'X'.
In the codition tab I have written like this:
IT_TAB-GRADE = '26'
OR
IT_TAB-GRADE = '27'
IT_TAB-NO_INDC = 'X'.
But this condition is not working.
Appreciate any help.
Thanks & Regards,
Soumya.
‎2009 Sep 24 10:39 AM
you need to pass like this:
IT_TAB-GRADE = '26'
IT_TAB-NO_INDC = 'X'. " this needs to be repeated
OR
IT_TAB-GRADE = '27'
IT_TAB-NO_INDC = 'X'.
‎2009 Sep 24 10:39 AM
you need to pass like this:
IT_TAB-GRADE = '26'
IT_TAB-NO_INDC = 'X'. " this needs to be repeated
OR
IT_TAB-GRADE = '27'
IT_TAB-NO_INDC = 'X'.
‎2009 Sep 24 10:42 AM
Hello Jose,
Unfortunately, there's no trivial way to express directly a logical "complex" disjunction (e.g. disjunction between conjunctions) in that condition tab for a smartform as no parenthesis are allowed; therefore there's no way to force the priority by which logical operators are evaluated.
You could easily workaround by expanding the clause
(IT_TAB-GRADE = '26' OR IT_TAB-GRADE = '27') AND IT_TAB-NO_INDC = 'X'.
in:
(IT_TAB-GRADE = '26' AND IT_TAB-NO_INDC = 'X') OR (IT_TAB-GRADE = '27' AND IT_TAB-NO_INDC = 'X').
This can be easily expressed in the condition tab as follows:
IT_TAB-GRADE = '26'
IT_TAB-NO_INDC = 'X'.
OR
IT_TAB-GRADE = '27'
IT_TAB-NO_INDC = 'X'.
Hope this helps
Matteo
‎2009 Sep 24 10:45 AM
Hi,
Its better if you add a program lines above the condition and update a flag using IF statement for the above condition.
IF (IT_TAB-GRADE = '26' OR IT_TAB-GRADE = '27') AND IT_TAB-NO_INDC = 'X'.
l_flag = 'X'.
ENDIF.After that in the condition just give the flag.
Regards
Karthik D