Application Development 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: 

select-options value

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

You can do loop on select-options field.

Regards,

Satish

6 REPLIES 6

Former Member
0 Kudos

Hi,

You can do loop on select-options field.

Regards,

Satish

Former Member
0 Kudos

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.

Former Member
0 Kudos

HI,

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

rgs

Former Member
0 Kudos

hi

YOU CAN PUT LOOP AT SELECT-OPTIONS

NO PROBLEM AT ALL

Former Member
0 Kudos

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.

Former Member
0 Kudos

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