09-09-2014 7:50 PM
Hi Experts,
I my trying to create a drop down list in a module pool. The list will have three fields in it. Here is my code:
**Global Data
TYPES: BEGIN OF ty_loading_area,
werks TYPE zvpar_pts_carga-werks,
lgort TYPE zvpar_pts_carga-lgort,
pt_carga TYPE zvpar_pts_carga-pt_carga,
END OF ty_loading_area.
DATA it_loading_area TYPE STANDARD TABLE OF ty_loading_area.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
PROCESS ON VALUE-REQUEST.
FIELD ZVPAR_STC MODULE create_dropdown_box.
*&---------------------------------------------------------------------*
*& Include ZVPAR_VOTO_POV
*&---------------------------------------------------------------------*
MODULE create_dropdown_box INPUT.
SELECT werks lgort pt_carga
FROM zvpar_pts_carga
INTO CORRESPONDING FIELDS OF TABLE it_loading_area.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
value_org = 'S'
TABLES
value_tab = it_loading_area
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
...
ENDIF.
ENDMODULE. "create_dropdown_box INPUT
Please let me know if you need more information.
Thanks,
Patrick
09-09-2014 8:09 PM
Hi,
Please add below parameter in F4IF_INT_TABLE_VALUE_REQUEST function module.
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'screen field'
Thanks,
Ashok.
09-10-2014 1:20 PM
Hi Ashok,
Didn't work, I am looking for a drop down list that look like this
Is there something i am missing in the Layout painter maybe? or some other configuration? When i put the drop down list code in the PBO include, I get a pop up with the correct information. But i do not want a pop up i need a drop down list liked pictured above.
09-10-2014 2:09 PM
Hi Patrick,
Instead of F4IF_INT_TABLE_VALUE_REQUEST use VRM_SET_VALUES function module.
refer below url.
SAPTechnical.COM - Tips - List Box on the Selection Screen
Thanks,
Ashok.
09-10-2014 7:08 AM
09-10-2014 1:22 PM
09-10-2014 1:31 PM
Hi Patrick,
Refer program "rsdemo_dropdown_listbox" for the dropdown list.
Hope this helps.
Thanks
A N
09-10-2014 1:31 PM
Hi,
Try the below code may be it solve your issue.
data : begin of ifmtp occurs 0,
form_type like zch-process,
end of ifmtp.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'Parting'.
APPEND ifmtp.
ifmtp-form_type = 'Checking'.
APPEND ifmtp.
ifmtp-form_type = 'Sample'.
APPEND ifmtp.
ifmtp-form_type = 'Repair'.
APPEND ifmtp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
Regards,
Mukesh
09-10-2014 2:07 PM
Hi Patrick,
Which sy-subrc is returned on exiting function?
Other point your SQL statement don't have filters, is it correct?!
09-10-2014 3:14 PM
Rapheal,
The sy_subrc is 0, and my SQL does not need any filter i am calling the entire table. I did however try and pass only two fields to the drop down list and it worked. I can only pass one or two fields. I need to display 3 fields. Why can i see 2 fields in the drop down list but not 3 fields?