Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How

abdulazeez12
Active Contributor
0 Likes
369

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.

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
351

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

.

.

Read only

Former Member
0 Likes
351

loop at lr_doctyp.

read table lv_doctyp with key low = lr_doctyp.

if lv_doctyp = 'A4'.

else.

message..

endif.

endloop.