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: 

how to set default values in initialization event for select option

Former Member
0 Kudos

Abapers,

I have 3 GL account like 0024831231,0024831238,0024831245.

Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event

Thanks

8 REPLIES 8

Former Member
0 Kudos

Select option is table <Structure> with fields, low, high, sign & option

you need to append the value into the select option, with appropriate value in low or

example:

S_HKONT-low = <value>

S_HKONT-SIGN = 'I'

S_hkont-OPTION = 'EQ'

append s_hkont.

Default value for select-option also can be added directly in select-option statement.

Regards,

Mahesh

naveen_inuganti2
Active Contributor
0 Kudos

Hi...

Do like this...

>s_hkont-low = '0024831231'

>s_hkont-option = 'EQ'.

>append s_hkont.

>clear s_hkont.

>

>s_hkont-low = '0024831238'

>s_hkont-option = 'EQ'.

>append s_hkont.

>clear s_hkont.

>

>s_hkont-low = '0024831245'.

>s_hkont-option = 'EQ'.

>append s_hkont.

>clear s_hkont.

Thanks,

Naveen.I

Former Member
0 Kudos

HI,

TRY THIS...

INITIALIZATION.

s_hkont-low = ' value'.

s_hkont-high = value'.

Former Member
0 Kudos

Hi,

see below link..

hope it will help..

Former Member
0 Kudos

mahesh,

This way i can assign only 1 gl code

thanks

Former Member
0 Kudos

Rai,

Obviously, you need to add thise statement three times for each GL Account.

clear s_hkont.

S_HKONT-low = '0024831231'.

S_HKONT-SIGN = 'I'

S_hkont-OPTION = 'EQ'

append s_hkont.

S_HKONT-low = '0024831238'.

append s_hkont.

S_HKONT-low = '0024831245'.

append s_hkont.

Regards,

Mahesh

Former Member
0 Kudos

thanks naveen

Former Member
0 Kudos

thanks mahesh