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: 

how to use dropdown list in module pool

Former Member
0 Kudos

Hi guys,

I have provided a dropdown list in my screen in my module pool program.

How should I insert values in the dropdown list.

Regards

Mac

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi mac ,

please try using FM VRM_SET_VALUES.

thanks

7 REPLIES 7

Former Member
0 Kudos

hi mac ,

please try using FM VRM_SET_VALUES.

thanks

former_member418469
Participant
0 Kudos

hi,

Search the forum for function module F4IF_INT_TABLE_VALUE_REQUEST or use where used list in R/3.

If you are using listbox try to search for function modue VRM_SET_VALUES.

0 Kudos

If you are using listbox try to search for function modue VRM_SET_VALUES

So you say i cannot use F4IF_INT_TABLE_VALUE_REQUEST to achieve a dropdown list ?

Former Member
0 Kudos

Hi Mac,

Take reference of following code.


TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
            values  TYPE VRM_VALUES,
             value   LIKE LINE OF values.
 
PROCESS BEFORE OUTPUT
MODULE list_fill_100
 
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3  FROM tab WHERE condition.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
 
CALL FUNCTION 'VRM_SET_VALUES'
       EXPORTING
            id     = 'i/o screen field' 
            values = values.
 
ENDMODULE. 

Regards,

Pravin

Former Member
0 Kudos

Hi,

Just read out given below code & use in your code as per requirement.

DATA: name5 TYPE vrm_id,

list5 TYPE vrm_values WITH HEADER LINE,

list_wa5 TYPE vrm_values.

REFRESH list5.

list5-key = '1'.

list5-text = 'Single BMC'.

APPEND list5.

list5-key = '2'.

list5-text = 'Group Of BMC'.

APPEND list5.

CLEAR list5.

name5 = 'SELECTION'. "Field Name of module pool screen

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name5

values = list5[].

I hope it will help you a lot.

Regards,

Narendra

Former Member
0 Kudos

You can use both the FM's : F4IF_INT_TABLE_VALUE_REQUEST

VRM_SET_VALUES

Do a where used list search or google you can find the ways to use it.

Edited by: Mishra.Manas on Apr 22, 2010 2:32 PM

Former Member
0 Kudos

HI,

Check this code.


PROCESS AFTER INPUT
PROCESS ON VALUE-REQUEST.
  FIELD ZDEPT-DEPTNO MODULE create_dropdown.
 
*** DOUBLE CLICK ON CREATE_DROPDOWN
 
MODULE create_dropdown INPUT.
 
  SELECT EMPNAME
                DEPTNAME
                FROM YDEPT
                INTO CORRESPONDING FIELDS OF TABLE itab_details.
 
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield        = 'DEPTNO'
            value_org       = 'S'
       TABLES
            value_tab       = itab_details
       EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
  IF sy-subrc  0.
    ...
  ENDIF.
ENDMODULE.
 
HERE IN PAI DOUBLE CLICK THE MODULE THEN WRITE THE ABOVE CODE IT SHOULD WORK.
YDEPT IS THE TABLE I CREATED TO STORE DEPARTMENT NUMBERS.
ZDEPT IS THE STRUCTURE OF THE TABLE.
 
IF YOU ARE STILL UNCLEAR
PLEASE CHECK
'DEMO_DROPDOWN_LIST_BOX' PROGRAM IN SE51 AND SCREEN NUMBER IS 100 

Regards and Best wishes.