I have an issue related to list box.i have 2 list box in selection scren
in p_bst_ty there is one drop down list which is populated with values like 1C 1F 1Z etc.
suppose user select 1C then all the object id corresponding to 1C object shud be selected from table HRP100.
i am not using F4 help .p_bst_id list should be populated in the same manner as p_bst_ty is populated.
can anybody help.
In p_bst_ty i am populating object types from table T777O ...user can select any object type from the drop down list.
Now based on this Object id ..data should come in the 2nd one p_bst_id from table HRP1000.
like if i select 1C as object type then all the object id which belong to object type 1C should come to the drop down list of the 2nd list (p_bst_id).
Depending on the value which you get from the first list... Select the value from the database table and then pass that internal table to the function module 'F4IF_INT_TABLE_VALUE_REQUEST'.
gv_repid = sy-repid.
IF not p_bst_ty IS INITIAL.
SELECT f2 FROM HRP1000
INTO TABLE gt_f4table
WHERE field1 = p_bst_ty.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
retfield = your field
dynpprog = gv_repid
dynpnr = sy-dynnr
window_title = text-002
value_org = 'S'
value_tab = gt_f4table
return_tab = gt_matnr_returned.
IF sy-subrc EQ 0.
IF NOT gt_matnr_returned IS INITIAL.
READ TABLE gt_matnr_returned INTO gs_matnr_returned INDEX 1.
p_matnr = gs_matnr_returned-fieldval.