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

How to initialize the Select Options

Former Member
0 Likes
3,126

Hi,

I have 5 select-options and 3 parameters in my selection screen. I have to assign default values to the select-options.

I have S_VKORG for Sales Organization. The default values for this select-option are 'KF11', 'BH13', 'KF26'. How to assign the default vales to a Select-Option..? For a parameter, we do it by adding DEFAULT VALUE stament in the declaration itself. How to do it for Select-Option..?

The same way, for another Select-Option, I have 7 default values.

Please help me on the same how to assign default values to the select-option.

Thanks in advance,

Best Regards,

Paddu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,981

Hi

Under INITIALIZATION EVENT do like below .

INITIALIZATION.

INITIALIZATION .

so_mara-sign = 'I' .

so_mara-option = 'EQ' .

so_mara-low = 'JP10' .

APPEND so_mara .

Thanks

Hope it helps.

5 REPLIES 5
Read only

Former Member
0 Likes
1,981

Hi,

You can do at the at selection-screen event as below .

codeselect-options: s_uom for mara-meins no intervals.

at selection-screen.

if s_ucom[] is initial.

s_ucom-sign = 'I'.

s_ucom-option = 'EQ'.

s_ucom-low = 'KG'.

append s_ucom.

clear s_ucom.

s_ucom-sign = 'I'.

s_ucom-option = 'EQ'.

s_ucom-low = 'ZBT'.

append s_ucom.

clear s_ucom.

s_ucom-sign = 'I'.

s_ucom-option = 'EQ'.

s_ucom-low = 'ZUN'.

append s_ucom.

[/code]

endif.

Thanks,

Read only

Former Member
0 Likes
1,982

Hi

Under INITIALIZATION EVENT do like below .

INITIALIZATION.

INITIALIZATION .

so_mara-sign = 'I' .

so_mara-option = 'EQ' .

so_mara-low = 'JP10' .

APPEND so_mara .

Thanks

Hope it helps.

Read only

Vijay
Active Contributor
0 Likes
1,981

hi

do it like this

select-options: s_field for mara-matnr .

at selection-screen.

if s_field [] is initial.

s_field-sign = 'I'.

s_field-option = 'EQ'.

s_field-low = 'KG'.

append s_field.

clear s_field-low .

s_field-low = 'ZBT'.

append s_field.

clear s_field-low .

s_field-low = 'ZUN'.

append s_field.

endif.

regards

vijay

reward points if helpful

Read only

Former Member
0 Likes
1,981

Hi,

You can do as below in the initialization event :

 
INITIALIZATION.

if s_vkorg[] is initial.

s_vkorg-sign = 'I'.
s_vkorg-option = 'EQ'.
s_vkorg-low = 'KF11'.
append s_vkorg.

s_vkorg-sign = 'I'.
s_vkorg-option = 'EQ'.
s_vkorg-low = 'BH13'.
append s_vkorg.

s_vkorg-sign = 'I'.
s_vkorg-option = 'EQ'.
s_vkorg-low = 'KF26'.
append s_vkorg.

endif.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,981

PADDU,

INITIALZATION.

S_VKORG-OPTION = 'EQ' .

S_VKORG-SIGN = 'I'.

S_VKORG-LOW = 'KF11'.

S_VKORG-HIGH = ''.

APPEND s_vkorg.

CLEAR s_vkorg.

S_VKORG-OPTION = 'EQ' .

S_VKORG-SIGN = 'I'.

S_VKORG-LOW = 'BH13'.

S_VKORG-HIGH = ''.

APPEND s_vkorg.

CLEAR s_vkorg.

S_VKORG-OPTION = 'EQ' .

S_VKORG-SIGN = 'I'.

S_VKORG-LOW = 'KF26'.

S_VKORG-HIGH = ''.

APPEND s_vkorg.

CLEAR s_vkorg.

Don't forget to reward if useful..