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

ABAP list report, multiple selections - select-options

Former Member
0 Likes
2,838

I have written a very simple ABAP list report, that contains a single select-option. On the selection screen, I have the option of entering multiple values, with each new value being displayed directly underneath the old, but I am only getting the first value entered on the screen displayed. Does anyone have any sample code for me?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,953

Hi Daniel,

Select_Options consists of 4 parameters, in with the range consists in eg...

Select-options s_vbeln for vbak-vbeln.

then s_vbeln-low, s_vbeln-high are the range values...

So whne you write select query.

write vbeln in s_vbeln

instead of vbeln eq s_vbeln

Hope this solves your problem.

Thanks & Regards,

Dileep .C

6 REPLIES 6
Read only

Former Member
0 Likes
1,954

Hi Daniel,

Select_Options consists of 4 parameters, in with the range consists in eg...

Select-options s_vbeln for vbak-vbeln.

then s_vbeln-low, s_vbeln-high are the range values...

So whne you write select query.

write vbeln in s_vbeln

instead of vbeln eq s_vbeln

Hope this solves your problem.

Thanks & Regards,

Dileep .C

Read only

0 Likes
1,953

The report is much more basic than that. The select option is not referred from a field in the ddic. I created a variable, with a type of char50, and I just want to be able to write whatever the user has input in the selection screen into the report.

Read only

0 Likes
1,953

Hi friend,

Try like this.

Report ZTEST.

DATA: s TYPE char30,

ss1 type char30.

SELECT-OPTIONS: ss FOR s.

LOOP AT ss. <--- Looping at selection-options table.

ss1 = ss-low.

WRITE:/ ss1.

ENDLOOP.

Thanks..

Edited by: Sap Fan on Mar 19, 2009 4:02 AM

Read only

0 Likes
1,953

Report ZTEST.

DATA: s TYPE i,

ss1 type i,

diff type i,

t type i.

SELECT-OPTIONS: ss FOR s.

diff = ss-high - ss-low.

DO diff TIMES <--- Looping at selection-options table.

ss1 = ss-low + i.

WRITE:/ ss1.

i = i + 1.

ENDDO.

Thanks..

Edited by: Sarbajit Majumdar on Mar 19, 2009 11:50 AM

Read only

Former Member
0 Likes
1,953

data: begin of itab occurs 0,
             aufnr like aufk-aufnr,
        end of itab .

select-options: s_aufnr for aufk-aufnr .

start-of-selection.

select aufnr into table itab from aufk where aufnr in s_aufnr .

loop at itab .
   write: /10 itab-aufnr.
endloop .
Read only

Former Member
0 Likes
1,953

Hi,

REPORT Z_TEST.
DATA: text TYPE char50.
SELECT-OPTIONS: input FOR text.

WRITE: / input-low,
       / input-high.

Is this your requirement?

Make sure the 1st value you enter is of lesser value than the 2nd value alphabetically or numerically.

I would suggest use PARAMETERS instead and use LOOP and save the no of values you require in an internal table.

Regards.