‎2006 Feb 12 10:51 AM
i want to say:
if ZXXX not i (1,2,3)
x=y
endif.
what the write statment.
‎2006 Feb 12 11:26 AM
check out this code sample.
data: ZXXX(1) .
ranges: s_number for ZXXX .
s_number-sign = 'I'.
s_number-option = 'EQ'.
s_number-low = '1'.
APPEND s_number .
clear s_number .
s_number-sign = 'I'.
s_number-option = 'EQ'.
s_number-low = '2'.
APPEND s_number .
clear s_number .
s_number-sign = 'I'.
s_number-option = 'EQ'.
s_number-low = '3'.
APPEND s_number .
clear s_number .
ZXXX = '4' .
if ZXXX not in s_number.
write:/ ZXXX .
endif.
Regards
Raja
‎2006 Feb 12 12:20 PM
Hi Rani,
Check this simple one :
if ZXXX <> 1 and ZXXX <> 2 and ZXXX <> 3.
x = y.
endif.
‎2006 Feb 12 2:54 PM
Hi
You can use several way, I think depends on how many values you need to have in your ranges:
- 1) Perhaps easier way is to use a simple IF condition with AND option:
IF ZXXX <> 1 AND ZXXX <> 2 AND ZXXX <> 3.
ENDIF.
- 2) You can use a range in this way:
DATA: wa(1) TYPE n VALUE '4'.
RANGES r_range FOR wa.
DO 3 TIMES.
MOVE sy-index TO r_range-low.
r_range(3) = 'IEQ'.
APPEND r_range.
ENDDO.
IF NOT wa IN r_range.
WRITE wa.
ENDIF.
or in this way:
DO 3 TIMES.
MOVE sy-index TO r_range-low.
r_range(3) = 'EEQ'.
APPEND r_range.
ENDDO.
IF wa IN r_range.
WRITE: / wa.
ENDIF.
Max
‎2006 Feb 14 9:26 AM
Hi rani umbro ,
Is your question answered? reward the helpful answers and mark the thread as answerd.
Regards
Raja
‎2006 Feb 14 10:12 AM
Hi,
if zxxx ne 1 and zxxx ne 2 and zxxx ne 3.
x = y."Here I assumed x and y are varaibles
endif.
KIndly reward points by clikcing the star on the left of reply,if it helps.Otherwise,get back for clarifications.