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 with 2 rows

Former Member
0 Likes
884

Hi,

i've got to make a report with 2 rows in the select-options

SELECT-OPTIONS: sel001 FOR stichtag NO INTERVALS NO-EXTENSION,

sel002 FOR dfkkop-gpart DEFAULT 'M00000' TO 'M99999',

sel003 FOR dfkkop-vtref DEFAULT 'A00000' TO 'A99999',

sel004 FOR dimaiobpar-zstatus DEFAULT '1' NO INTERVALS.

for sel003 i need another default-row with 'B00000' to 'B99999' so that i can assign both rows to vtref_r

APPEND sel002 TO gpart_r.

APPEND sel003 TO vtref_r.

CALL FUNCTION 'FKK_OPEN_ITEM_SELECT_WITH_DATE'

EXPORTING

i_key_date = stichtag

i_gpart = gpart_r

i_vtref = vtref_r

TABLES

t_op = itab2.

i need both in this function.

regards,

Tobias

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
765

remove NO-EXTENSION.. then on the selection screen hit on the multiple selection aroow the yellow chingee.. and give your other value also and save the variant..

in this way you would be able to send two rows in the vtref_r

or build a range table.

Read only

mnicolai_77
Active Participant
0 Likes
765

hi Tobias,

i think that you have to load them in event INITIALIZZATION as it follows

>INITIALIZZATION.

>sel003-sign = 'I'.

>sel003-option = 'BT'.

>sel003-low = 'A00000'.

>sel003-high = 'A99999'.

>append sel003.

>clear sel003.

>

>sel003-sign = 'I'.

>sel003-option = 'BT'.

>sel003-low = 'B00000'.

>sel003-high = 'B99999'.

>append sel003.

>clear sel003.

bye

Marco

Read only

Former Member
0 Likes
765

Hi Tobias,

You can use the header line of sel003 to append these values to the selection table sel003 (actually sel003 is the name of the header line as well as the table created using SELECT-OPTIONS sel003 for.... statement).


APPEND sel002 TO gpart_r.
APPEND sel003 TO vtref_r.

"set the header line for sel003 for the second row
sel003-sign = 'I'.
sel003-option = 'BT'. "between for a range
sel003-low = 'B00000'.
sel003-high = 'B99999'.
append sel003.
clear sel003." this will clear the header line sel003

CALL FUNCTION 'FKK_OPEN_ITEM_SELECT_WITH_DATE'
EXPORTING
i_key_date = stichtag
i_gpart = gpart_r
i_vtref = vtref_r
TABLES
t_op = itab2.

Using header lines is an obsolete way in ABAP Objects context, try avoiding it.

Hope this helps.

Thanks

Sanjeev

Read only

Former Member
0 Likes
765

If that default row is not to be modified by the user, then simply define a range and fill that range as below.

RANGES: r_vtref FOR dfkkop-vtref DEFAULT 'B00000' TO 'B99999'.

APPEND r_vtref TO vtref_r.

or simply do this.

vtref_r-low = 'B00000'.

vtref_r-high = 'B99999'.

vtref_r-option = 'EQ'.

vtref_r-sign = 'I'.

APPEND vtref_r.