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: 

Default Select Option

Former Member
0 Kudos

Hi All,

I want to default a Select-option with a value.

How to do it.

Regards,

Sandy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If U want to do it at INITIALIZATION,

Do it like this....

S_OPT-LOW = Value.

S_OPT-SIGN = 'I'.

S_OPT-OPTION = 'EQ'.

APPEND S_OPT.

6 REPLIES 6

Former Member
0 Kudos

Hi,

<b>Use RANGE table for the Default values rather than Select Option.</b>

<b>

RANGES Tables</b>

You can use the RANGES statement to create internal tables of the same type as selection tables.

RANGES <rangetab> FOR <f>.

This statement is simply a shortened form of the following statements:

DATA: BEGIN OF <rangetab> OCCURS 0,

SIGN(1),

OPTION(2)

LOW LIKE <f>,

HIGH LIKE <f>,

END OF <rangetab>.

Internal tables created with RANGES have the same structure as selection tables, but they do not have the same functionality.

Regards,

Ranjit Thakur.

<b>Please Mark The Helpful Answer.</b>

Former Member
0 Kudos

Hello,

Check this.

SELECT-OPTIONS: S_WERKS FOR IT_OPENRESPOS-WERKS.

INITIALIZATION.
s_werks-sign = 'I'.
s_werks-option = 'BT'.
s_werks-low = 'AAAA'.
s_werks-high = 'BBBB'.

Append s_werks.

VAsanth

Former Member
0 Kudos

If U want to do it at INITIALIZATION,

Do it like this....

S_OPT-LOW = Value.

S_OPT-SIGN = 'I'.

S_OPT-OPTION = 'EQ'.

APPEND S_OPT.

Former Member
0 Kudos

hi,

1.select-options s_bukrs for bkpf-bukrs default 1000 to 3000.

2.

initialization.


s_akont-low = '0000004711'.
s_akont-sign = 'I'.
s_akont-option = 'EQ'.
APPEND s_akont.
s_akont-low = '0000005000'.
APPEND s_akont.
s_akont-low = '0000006000'.
APPEND s_akont.

Regards,

Santosh

0 Kudos

Hi,

YOu can suppy initial values to PARAMTERS OR SELECT-OPTIONS In the INITIALIZATION event of the report.

See below.

INITIALIZATION.

sel_crit-low = 'LOW_VALUE'

sel_crit-sign = 'I'

sel_crit-option = 'EQ'

append sel_crit.

sel_crit-high = 'HIGH_VALUE'

sel_crit-sign = 'I'

sel_crit-option = 'EQ'

append sel_crit.

Regards,

Sesh

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

tables mara.

select-options s_matnr for mara-matnr default '123'.

If you want to populate full range or many values,it should be done in initialization as suggested.