Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down list not working in screen

Former Member
0 Kudos

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






9 REPLIES 9

Former Member
0 Kudos

Hi,

Please add below parameter in F4IF_INT_TABLE_VALUE_REQUEST function module.

     dynpprog               = sy-cprog

     dynpnr                 = sy-dynnr

     dynprofield            = 'screen field'

Thanks,

Ashok.

0 Kudos

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.

0 Kudos

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.

VenkatRamesh_V
Active Contributor
0 Kudos

Hi Patrick,

Try with

FM: POPUP_WITH_TABLE_DISPLAY




Regards,

Venkat.

0 Kudos

Hi Venkat,

Not looking for a pop up, but thank you.

ayaz1
Explorer
0 Kudos

Hi Patrick,

Refer program "rsdemo_dropdown_listbox" for the dropdown list.

Hope this helps.


Thanks

A N

Former Member
0 Kudos

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

raphael_almeida
Active Contributor
0 Kudos

Hi Patrick,

Which sy-subrc is returned on exiting function?

Other point your SQL statement don't have filters, is it correct?!

0 Kudos

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?