06-03-2009 3:27 PM
Hi Experts,
I have 2 variables (both are characters so search operations are possible)
1) 10,000.000
2) 10,0000.
I need to check if the a variable has both ', 'and '.'
Means the first varibale must return me true and the second one false
Let me know if there is solution , without Searching first with , and again Searching with .
06-03-2009 3:55 PM
Hi ,
You can use the CS (contain string) string operator .
Please check the code - -
DATA : w_var(15) TYPE c VALUE '10,000.000',
w_var1(15) TYPE c VALUE '10,0000'.
IF w_var CS ',' AND w_var CS '.'.
MESSAGE '1st variable is True ' TYPE 'I'.
ELSEIF w_var1 CS ',' AND w_var1 CS '.'.
MESSAGE '2nd variable is True 1' TYPE 'I'.
ELSE.
MESSAGE 'Booth are False' TYPE 'I'.
ENDIF.
Regards
Pinaki
06-03-2009 3:32 PM
06-03-2009 3:55 PM
Hi ,
You can use the CS (contain string) string operator .
Please check the code - -
DATA : w_var(15) TYPE c VALUE '10,000.000',
w_var1(15) TYPE c VALUE '10,0000'.
IF w_var CS ',' AND w_var CS '.'.
MESSAGE '1st variable is True ' TYPE 'I'.
ELSEIF w_var1 CS ',' AND w_var1 CS '.'.
MESSAGE '2nd variable is True 1' TYPE 'I'.
ELSE.
MESSAGE 'Booth are False' TYPE 'I'.
ENDIF.
Regards
Pinaki