‎2007 Jun 12 12:29 PM
hey, i have
Range lr_doctyp with
I EQ A1
I EQ A2
I EQ A3
I EQ A4.
another variable lv_doctyp value A4.
i need to find out if lv_doctyp exists in lr_doctyp.
‎2007 Jun 12 12:32 PM
Hi,
you can use
<b>if lv_doctype IN lr_doctype.</b>
To declare you can use
DATA: lv_doctype type <your type>.
DATA: lr_doctype type range of <your type>.
DATA: wa_lr_doctype like line of lr_doctype.
Then you can insert the data as follows.
wa_lr_doctype-low = 'A1'.
append wa_lr_doctype to lr_doctype.
wa_lr_doctype-low = 'A2'.
append wa_lr_doctype to lr_doctype.
wa_lr_doctype-low = 'A3'.
append wa_lr_doctype to lr_doctype.
wa_lr_doctype-low = 'A4'.
append wa_lr_doctype to lr_doctype.
then use
lv_doctype = 'A4'.
<b>if lv_doctype IN lr_doctype.</b>
Regards,
Sesh
.
.
‎2007 Jun 12 12:36 PM
loop at lr_doctyp.
read table lv_doctyp with key low = lr_doctyp.
if lv_doctyp = 'A4'.
else.
message..
endif.
endloop.