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 and multiple default values

Former Member
0 Likes
3,823

Hi all,

How i can define a select-options with 4 values default?

For example i want:

SELECT-OPTIONS: SELBUKRS FOR BUKRS OBLIGATORY.

and i want these default values:

DEFAULT '1000', '2000', '5100', '5200'.

Thanks all,

Best regards

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
2,423

Hi,

Declare this in the Initialization event -

SELBUKRS-low = '1000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

SELBUKRS-low = '2000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

SELBUKRS-low = '3000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

Regards,

Amit

10 REPLIES 10
Read only

Former Member
0 Likes
2,423

Hi,

Try this :


INITIALIZATION.
SELBUKRS-SIGN = 'I'.
SELBUKRS-OPTION = 'EQ'.
SELBUKRS-LOW = '1000'.
append SELBUKRS.

SELBUKRS-SIGN = 'I'.
SELBUKRS-OPTION = 'EQ'.
SELBUKRS-LOW = '2000'.
append SELBUKRS

...

Hope this helps,

Erwan

Read only

Former Member
0 Likes
2,423

Hello,

In the initailization event.

SELBUKRS-SIGN = 'I'.

SELBUKRS-OPTION = 'EQ'.

SELBUKRS-LOW = '1000'.

append SELBUKRS.

SELBUKRS-LOW = '2000'.

append SELBUKRS.

SELBUKRS-LOW = '5100'.

append SELBUKRS.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
2,423

In the <b>Initialization</b> event

Say your select option is SELBUKRS then

SELBUKRS-sign = 'I'

SELBUKRS-option = 'EQ'.

SELBUKRS-low = '1000'.

append SELBUKRS.

SELBUKRS-sign = 'I'

SELBUKRS-option = 'EQ'.

SELBUKRS-low = '2000'.

append SELBUKRS.

SELBUKRS-sign = 'I'

SELBUKRS-option = 'EQ'.

SELBUKRS-low = '5100'.

append SELBUKRS.

SELBUKRS-sign = 'I'

SELBUKRS-option = 'EQ'.

SELBUKRS-low = '5200'.

append s_opt.

this would help you to define the four values

Read only

Former Member
0 Likes
2,423

make use of Event INITIALZATIONS.

DATA SBOOK_WA TYPE SBOOK.

SELECT-OPTIONS FL_DATE FOR SBOOK_WA-FLDATE.

INITIALIZATION.

MOVE: 'I' TO FL_DATE-SIGN,

'EQ' TO FL_DATE-OPTION,

SY-DATUM TO FL_DATE-LOW.

APPEND FL_DATE.

MOVE: 'BT' TO FL_DATE-OPTION,

'19960101' TO FL_DATE-LOW,

'19960630' TO FL_DATE-HIGH.

APPEND FL_DATE.

Regards

Prabhu

Read only

Former Member
0 Likes
2,423

initialization.

selbukrs-low = 1000'.

selbukrs-sign = 'I'.

selbukrs-option = 'EQ'.

append selbukrs.

selbukrs-low = '2000'.

selbukrs-sign = 'I'.

selbukrs-option = 'EQ'.

append selbukrs.

selbukrs-low = '5100'.

selbukrs-sign = 'I'.

selbukrs-option = 'EQ'.

append selbukrs.

Read only

Former Member
0 Likes
2,423

Hi ,

In the Initialization event in your report, add the following code & these values will be defaulted automatically.

INITIALIZATION.

MOVE: 'I' TO BUKRS-SIGN,

'EQ' TO BUKRS-OPTION,

'1000' TO BUKRS-LOW.

APPEND BUKRS.

CLEAR BUKRS.

MOVE: 'I' TO BUKRS-SIGN,

'EQ' TO BUKRS-OPTION,

'2000' TO BUKRS-LOW.

APPEND BUKRS.

CLEAR BUKRS.

MOVE: 'I' TO BUKRS-SIGN,

'EQ' TO BUKRS-OPTION,

'5100' TO BUKRS-LOW.

APPEND BUKRS.

CLEAR BUKRS.

MOVE: 'I' TO BUKRS-SIGN,

'EQ' TO BUKRS-OPTION,

'5200' TO BUKRS-LOW.

APPEND BUKRS.

Regards,

Chetan.

PS:Reward points if this helps.

Read only

Former Member
0 Likes
2,423

Hi,

fill the range-table SELBUKRS at event initialization:

INITIALIZATION

clear selbukrs.

selbukrs-option = 'EQ'.

selbukrs-sign = 'I'.

selbukrs-low = '1000'.

append selbukrs.

selbukrs-low = '2000'.

append selbukrs.

selbukrs-low = '5100'.

append selbukrs.

selbukrs-low = '5200'.

append selbukrs.

regards,

christian

Read only

amit_khare
Active Contributor
0 Likes
2,424

Hi,

Declare this in the Initialization event -

SELBUKRS-low = '1000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

SELBUKRS-low = '2000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

SELBUKRS-low = '3000'.

SELBUKRS-sign = 'I'.

SELBUKRS-option = 'EQ'.

APPEND SELBUKRS.

Regards,

Amit

Read only

Former Member
0 Likes
2,423

Thanks all. It works perfectly

Read only

Former Member
0 Likes
2,423

so here u have two options to keep the values default for selection screen-screen

by coading u can put it and one more method is

when execute u will get seleciton screen just press Multiple selection

and enter the values which ever u want as default

i think this might be easy

thanks and Regards,

Mahesh.G