‎2008 Aug 21 9:53 PM
Hi all,
I have a field 'years of service' in selections screen with select option.
Now i have to give 5,10,16,20,25,30,35,40,45 as possible values in that field.
Can anyone suggest me how can i do that?
thanks.
‎2008 Aug 22 4:51 AM
Hi,
Try this.
Either use
1. 'RANGES
2. Populate the values of the select options in the internal table say itab1. Then call the function module.
'F4_INT_TABLE_VALUE_REQUEST'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = <table field name>
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = <select option name>
value_org = 'S'
TABLES
value_tab = itab1
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Sharin.
‎2008 Aug 21 10:03 PM
Hi,
Append the select-option internal table with desired values in AT Selection Screen Output event.
Thanks,
Kamesh Bathla
‎2008 Aug 24 1:47 AM
‎2008 Aug 21 10:32 PM
Hi,
Check this example code, populate your values accordingly.
tables mara.
select-options: s_matnr for mara-matnr.
at selection-screen output.
s_matnr-low = 'A'.
append s_matnr.
s_matnr-low = 'B'.
append s_matnr.
s_matnr-low = 'C'.
append s_matnr.
‎2008 Aug 24 1:47 AM
‎2008 Aug 22 4:33 AM
Hi,
Create a range table with type LVC_T_RNGS. And add the required values to the table in AT SELECTION-SCREEN OUTPUT.
Ex:
data: years_of_service type LVC_T_RNGS,
wa_years_of_service type LVC_S_RNGS.
wa_years_of_service-sign = 'I'.
wa_years_of_service-option = 'EQ'.
wa_years_of_service-low = 5.
append wa_years_of_service to years_of_service.
wa_years_of_service-sign = 'I'.
wa_years_of_service-option = 'EQ'.
wa_years_of_service-low = 10.
append wa_years_of_service to years_of_service.
wa_years_of_service-sign = 'I'.
wa_years_of_service-option = 'EQ'.
wa_years_of_service-low = 16.
append wa_years_of_service to years_of_service.
....
Add all the values you are required.
Regards,
Sai Prasad
‎2008 Aug 24 1:47 AM
‎2008 Aug 22 4:51 AM
Hi,
Try this.
Either use
1. 'RANGES
2. Populate the values of the select options in the internal table say itab1. Then call the function module.
'F4_INT_TABLE_VALUE_REQUEST'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = <table field name>
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = <select option name>
value_org = 'S'
TABLES
value_tab = itab1
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Sharin.
‎2008 Aug 22 5:02 AM
Hi,
we can populate the values for select-options with the help of at selection-screen output statement.
example :
tables mara.
select-options: s_matnr for mara-matnr.
at selection-screen output.
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.
s_matnrx-low = '5'.
append s_matnr .
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.
s_matnr-low = '10'.
append s_matnr .
s_matnr-sign = 'I'.
s_matnrx-option = 'EQ'.
s_matnr-low = '16'.
append s_matnr .
Hope this helps.
thanx,
dhanashri.
‎2008 Aug 22 5:17 AM
Hi,
Select-options is an internal table with s_matnr as the table name and having sign,options,low,high.
all you have to do is update low value with your conditions in 'at selection-screen output'.
Thanks
Ramana
‎2008 Aug 22 5:43 AM
Hi Siddarth .,
Use at selection screen event and validate the input value in ( 5 , 10, 15 ,20,25,30,35,40) .
thanks
Sreenivas