‎2007 Aug 24 8:19 AM
here in selectio screen user enters
plant -
1000
storage bin -
(dropdown list).
depending on the plant enters in selection screen i want the storage bin in drop down .
<b>note</b> here both are mandatory fields ..
‎2007 Aug 24 8:26 AM
‎2007 Aug 24 8:29 AM
Check the below code, it will help to solve your problem...
" List Boxes on Selection Screens
"Here is a short example of using list boxes on selection screens:
PROGRAM z_NSR_test.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = name values = list.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
Regards,
Sairam
‎2007 Aug 24 8:30 AM
hi
just use follow syntax
Parameters: p_listb as listbox length 10.
and use function module to populate values
F4IF_INT_TABLE_VALUE_REQUEST
reward if u find use ful
regards
Nagesh.Paruchuri
‎2007 Aug 24 8:36 AM
dear vijay,
plz assure me what u want to do?
1) create the F4 search help against the plant selection
2) Set Drop Down in the Storage field
but in the both cases u have to fill a internal table against of the selection (plant)
plz confirm me if required.
give reward point.
Thanks
‎2007 Aug 24 10:09 AM
hi vikrant,
i need the drop down list dynamically filled depending on the user input in the selection screen , based on the plant filled by the user .
‎2007 Aug 24 10:06 AM
See the following program for an example:
REPORT zlocal_test_003.
TABLES sscrfields.
PARAMETERS p_one TYPE char10 AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND zone.
PARAMETERS p_two(20) TYPE c AS LISTBOX VISIBLE LENGTH 25.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
DATA w_flag TYPE c.
AT SELECTION-SCREEN OUTPUT.
IF w_flag = '1'.
CLEAR list[].
name = 'P_TWO'.
value-key = 'Plant1_Bin1 '. value-text = 'First Bin'. APPEND value TO list.
value-key = 'Plant1_Bin2'. value-text = 'Another Bin'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ELSEIF w_flag = '2'.
CLEAR list[].
name = 'P_TWO'.
value-key = 'Plant2_Bin45'. value-text = 'First Bin'. APPEND value TO list.
value-key = 'Plant2_Bin55'. value-text = 'Another Bin'. APPEND value TO list.
value-key = 'Plant2_Bin75'. value-text = 'Last Bin'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDIF.
CLEAR: w_flag.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'ZONE'.
IF p_one = 'PLANT1'.
w_flag = '1'.
ELSEIF p_one = 'PLANT2'.
w_flag = '2'.
ENDIF.
ENDCASE.
INITIALIZATION.
name = 'P_ONE'.
value-key = 'PLANT1'. value-text = 'First Option'. APPEND value TO list.
value-key = 'PLANT2'. value-text = 'Another Option'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
START-OF-SELECTION.
* Main Processing
Andrew
‎2007 Aug 24 10:21 AM
Hi
Use the function module :VRM_SET_VALUES
eg :
at the selection screen event :
read the plant value
create a internal table of type vrm_values, insert the required values into the internal table(list in this example) and call the function module.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'gs_cnvmbttables-customer' "#EC NOTEXT
values = list.
hope this helps,
If u still have any doubts, revert back to me, i will help with a detailed example.
Regards,
Prasant
reward if helpful