2009 Mar 19 2:23 AM
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?
2009 Mar 19 2:43 AM
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
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?
2009 Mar 19 2:43 AM
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
2009 Mar 19 2:55 AM
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.
2009 Mar 19 3:02 AM
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
2009 Mar 19 5:14 AM
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
2009 Mar 19 2:47 AM
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 .
2009 Mar 19 6:32 AM
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.