‎2007 Dec 27 10:13 AM
Hello,
I want to use a default value in select-option.
I am getting the default value from the table , storing it in a variable and using this variable in the select-option.
but this is not working.
please let me know how to handle this.
Thanks.
Ramya
‎2007 Dec 27 10:18 AM
hi,
You have to populate default values for a select-option in Initialization event.
check this code.
tables : mara.
types : begin of ty_mara,
matnr type mara-matnr,
end of ty_mara.
data: t_mara type table of ty_mara,
wa_mara like line of t_mara.
select-options : s_matnr for mara-matnr.
Initialization.
select matnr
from mara
into table t_mara.
if sy-subrc eq 0.
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.
loop at t_mara.
s_matnr-low = t_mara-matnr.
append s_matnr.
endloop.
endif.
Regards
Sailaja.
‎2007 Dec 27 10:15 AM
Hi Ramya,
Just post the coding you are using then we can have a look!
Regards,
John.
‎2007 Dec 27 10:17 AM
Hi Ramya
Please give the select statement so that i can say whether its correct select statement and also whether its working or not.I can help you if you give the statement.
Regards
Kalyan
‎2007 Dec 27 10:18 AM
hi,
You have to populate default values for a select-option in Initialization event.
check this code.
tables : mara.
types : begin of ty_mara,
matnr type mara-matnr,
end of ty_mara.
data: t_mara type table of ty_mara,
wa_mara like line of t_mara.
select-options : s_matnr for mara-matnr.
Initialization.
select matnr
from mara
into table t_mara.
if sy-subrc eq 0.
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.
loop at t_mara.
s_matnr-low = t_mara-matnr.
append s_matnr.
endloop.
endif.
Regards
Sailaja.
‎2007 Dec 27 10:19 AM
Try this logic
tables: spfli.
select-options: p_carrid for spfli-carrid.
initialization.
p_carrid-low = 'aa'.
p_carrid-high = 'bb'.
append p_carrid.
If usefull rewards points helpfull.....
‎2007 Dec 27 10:28 AM
Hi,
You have to write a select statement in the initialization event and get the value and pass the value to the selection screen parameters.
Thanks,
Sriram Ponna.