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

select-options value

Former Member
0 Likes
692

Hi all.

I have defined a select-options with no intervals. I want to loop through all the values that are input in select-options. Can i use loop at or do i need to fetch the vaues in an itab first?

thanks,

HM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
664

Hi,

You can do loop on select-options field.

Regards,

Satish

6 REPLIES 6
Read only

Former Member
0 Likes
665

Hi,

You can do loop on select-options field.

Regards,

Satish

Read only

Former Member
0 Likes
664

HI Hitesh,

A sample example for looping at selct-options.

tables MARA.

select-option : mat for mara-matnr.

DATA: BEGIN OF ITAB OCCURS 0,

MATNR TYPE MARA-MATNR,

END OF ITAB.

START-OF-SELECTION.

LOOP AT MAT.

MOVE MAT-LOW TO ITAB-MANTR.

APPEND ITAB.

ENDLOOP.

Please reward if usefull.

Thanks,

Gokul.

Read only

Former Member
0 Likes
664

HI,

yes you can do <i>loop at</i>.

rgs

Read only

Former Member
0 Likes
664

hi

YOU CAN PUT LOOP AT SELECT-OPTIONS

NO PROBLEM AT ALL

Read only

Former Member
0 Likes
664

Hi,

Yes you can use it, below is the sample code :

tables : bsis.

data : count type i.

data : begin of itab occurs 0,

buzei like bsis-buzei,

end of itab.

select-OPTIONS : num for bsis-buzei.

start-of-SELECTION.

count = 1.

do num-high times.

if count = 1.

count = num-low.

move : count to itab-buzei.

append itab.

clear itab.

count = count + 1.

else.

move : count to itab-buzei.

append itab.

clear itab.

count = count + 1.

endif.

if count GT num-high.

exit.

ENDIF.

enddo.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
664

Hi Hitesh

It may not be a good programming practice to Loop at select-options(it will give you the results).

Get all the relevant entries in an itab from the check table or so then loop.

Regards

Arun