‎2008 May 28 6:46 AM
Hi
I have a SELECT-OPTION, say so_value.
It can have any of the following 3 values:
"A B and SPACE"
How can I assign these values to the select-option variable -so_value?Regards
Santo
‎2008 May 28 6:57 AM
Hi,
Hi,
Use Value help for that.
SELECT-OPTIONS : s_plant FOR zaw_pol_plan-plant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_plant1-low .
i_t001w-value = 'A'.
APPEND i_t001w.
i_t001w-value = 'B'.
APPEND i_t001w.
i_t001w-value = ' '.
APPEND i_t001w.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = ws_repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = v_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
s_plant1-low = v_return-fieldval.
Pls. reward if useful...
‎2008 May 28 6:49 AM
Hi Santo,
chk this
data : v_char(1).
select-options : so_value for v_char.
initialization.
so_value-sign = 'I'.
so_value-option = 'EQ'.
so_value-low = 'A'.
append so_value.
clear so_value.
so_value-sign = 'I'.
so_value-option = 'EQ'.
so_value-low = 'B'.
append so_value.
clear so_value.
so_value-sign = 'I'.
so_value-option = 'EQ'.
so_value-low = ' '.
append so_value.
clear so_value.
‎2008 May 28 6:54 AM
Hi Sekar
I have one doubt - as we are appending the values, will so_value be able to hold all the 3 values?
Santo
‎2008 May 28 6:56 AM
Hi Santo,
yes it will hold the 3 values,
to check that, just click on the extension box on selection screen next to the select option, it will show the 3 values
‎2008 May 28 6:57 AM
Hi,
Hi,
Use Value help for that.
SELECT-OPTIONS : s_plant FOR zaw_pol_plan-plant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_plant1-low .
i_t001w-value = 'A'.
APPEND i_t001w.
i_t001w-value = 'B'.
APPEND i_t001w.
i_t001w-value = ' '.
APPEND i_t001w.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = ws_repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = v_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
s_plant1-low = v_return-fieldval.
Pls. reward if useful...