Application Development and Automation 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: 
Read only

Drop down not working.. Module pool

Former Member
0 Likes
2,394

Hello,

a simple one but irritating why it is not working please can any one help me..Drop down or f4 nothing is working..

TYPES : BEGIN OF TY_Tab,

        TYP(8) TYPE C,

       END OF TY_TRD.

*DATA : T_Tab TYPE TABLE OF TY_Tab,

*       W_Tab TYPE TY_Tab.


W_TAB-TYP = 'FIRST'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.

W_TAB-TYP = 'SECOND'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

*       DDIC_STRUCTURE         = ' '

       retfield               = 'TYP'

*       PVALKEY                = ' '

*     dynpprog               = sy-repid

*     dynpnr                 = sy-dynnr

      dynprofield            = 'ZTABLE-ZTYP'

*       STEPL                  = 0

*       WINDOW_TITLE           =

*       VALUE                  = ' '

         value_org              = 'S'

*       MULTIPLE_CHOICE        = ' '

*       DISPLAY                = ' '

*       CALLBACK_PROGRAM       = ' '

*       CALLBACK_FORM          = ' '

*       CALLBACK_METHOD        =

*       MARK_TAB               =

*     IMPORTING

*       USER_RESET             =

     TABLES

       value_tab              = T_TAB

*       FIELD_TAB              =

*       RETURN_TAB             =

*       DYNPFLD_MAPPING        =

EXCEPTIONS

     parameter_error = 1

     no_values_found = 2

     OTHERS          = 3.

   IF sy-subrc NE 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   ENDIF.

1 ACCEPTED SOLUTION
Read only

former_member193737
Participant
0 Likes
2,364

HI

to have a drop down u need to use FM VRM_SET_VALUES

for model programme use

DEMO_DROPD0WN_LIST_BOX

DEMO_DYNPRO_DROPDOWN_LISTBOX

10 REPLIES 10
Read only

former_member193737
Participant
0 Likes
2,365

HI

to have a drop down u need to use FM VRM_SET_VALUES

for model programme use

DEMO_DROPD0WN_LIST_BOX

DEMO_DYNPRO_DROPDOWN_LISTBOX

Read only

0 Likes
2,364

We can even use 'F4IF_INT_TABLE_VALUE_REQUEST, leave about drop down.. even F4 is not working.. for those two entries..

Read only

0 Likes
2,364

This message was moderated.

Read only

former_member196651
Contributor
0 Likes
2,364

Hi,

Provide the screen number as well as the program name. I think this should work.

TYPES : BEGIN OF TY_Tab,

        TYP(8) TYPE C,

       END OF TY_TRD.

*DATA : T_Tab TYPE TABLE OF TY_Tab,

*       W_Tab TYPE TY_Tab.


W_TAB-TYP = 'FIRST'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.

W_TAB-TYP = 'SECOND'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

*       DDIC_STRUCTURE         = ' '

       retfield               = 'TYP'

*       PVALKEY                = ' '

       dynpprog               = sy-repid

      dynpnr                 = sy-dynnr

      dynprofield            = 'ZTABLE-ZTYP'

*       STEPL                  = 0

*       WINDOW_TITLE           =

*       VALUE                  = ' '

         value_org              = 'S'

*       MULTIPLE_CHOICE        = ' '

*       DISPLAY                = ' '

*       CALLBACK_PROGRAM       = ' '

*       CALLBACK_FORM          = ' '

*       CALLBACK_METHOD        =

*       MARK_TAB               =

*     IMPORTING

*       USER_RESET             =

     TABLES

       value_tab              = T_TAB

*       FIELD_TAB              =

*       RETURN_TAB             =

*       DYNPFLD_MAPPING        =

EXCEPTIONS

     parameter_error = 1

     no_values_found = 2

     OTHERS          = 3.

   IF sy-subrc NE 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   ENDIF.

Regards,

Abijith

Read only

0 Likes
2,364

Even tried that.. still not working..

Read only

Former Member
0 Likes
2,364

I can successfully get  my desired drop down by coding through VRM_SET_VALUES , but why i cannot use F4IF_INT_TABLE_VALUE_REQUEST.

Read only

0 Likes
2,364

have  u coded that inside 'process on value request' event in flow logic

Read only

sivaganesh_krishnan
Contributor
0 Likes
2,364

Hi,

Try coding it inside POV of the field you want the search help.

Check out this code.

   W_TAB-TYP = 'FIRST'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.

W_TAB-TYP = 'SECOND'.

APPEND W_TAB TO T_TAB.

CLEAR W_TAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

      EXPORTING

        retfield               = 'FIELD'

       dynprofield            = 'FIELD'

          value_org              = 'S'

      TABLES

        value_tab              = T_TAB

        RETURN_TAB             = t_rtn

EXCEPTIONS

      parameter_error = 1

      no_values_found = 2

      OTHERS          = 3.

    IF sy-subrc NE 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

Read only

0 Likes
2,364

Hi

Use a data element - char08 instead using type c

TYPES : BEGIN OF TY_Tab,      

TYP(8) TYPE C, to  TYP type CHAR08

       END OF TY_TRD.

*DATA : T_Tab TYPE TABLE OF TY_Tab,

*       W_Tab TYPE TY_Tab.

Thanks ANd Regards

Mohit Kumar

Read only

former_member196651
Contributor
0 Likes
2,364

Hi,

I haven't seen any call to any type of screen in your given piece of code. So assuming that u are using a report I had changed you program as follows.

TYPES : BEGIN OF ty_tab,

           typ TYPE char10,

         END OF ty_tab.

DATA : t_tab TYPE TABLE OF ty_tab,

        w_tab TYPE ty_tab.

PARAMETERS typ TYPE ztable-ztyp.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR typ.

   w_tab-typ = 'FIRST'.

   APPEND w_tab TO t_tab.

   CLEAR w_tab.

   w_tab-typ = 'SECOND'.

   APPEND w_tab TO t_tab.

   CLEAR w_tab.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

        EXPORTING

*       DDIC_STRUCTURE         = ' '

          retfield               = 'TYP'

*       PVALKEY                = ' '

        dynpprog               = sy-repid

        dynpnr                 = sy-dynnr

         dynprofield            = 'ZTABLE-ZTYP'

*       STEPL                  = 0

*       WINDOW_TITLE           =

*       VALUE                  = ' '

            value_org              = 'S'

*       MULTIPLE_CHOICE        = ' '

*       DISPLAY                = ' '

*       CALLBACK_PROGRAM       = ' '

*       CALLBACK_FORM          = ' '

*       CALLBACK_METHOD        =

*       MARK_TAB               =

*     IMPORTING

*       USER_RESET             =

        TABLES

          value_tab              = t_tab

*       FIELD_TAB              =

*       RETURN_TAB             =

*       DYNPFLD_MAPPING        =

   EXCEPTIONS

        parameter_error = 1

        no_values_found = 2

        OTHERS          = 3.

   IF sy-subrc NE 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   ENDIF.

START-OF-SELECTION.

   WRITE typ.


This worked for me. Please have a look at the following screen shots.


If this works for selection screen, then it should work for module pool also.


Regards,

Abijith