‎2008 Aug 07 1:28 PM
hi
how can i get dropdown box for in put/out put feald in modulepool program
‎2008 Aug 07 1:39 PM
sreekanth chowdary,
See the follwoing example program in SE38.
DEMO_DYNPRO_DROPDOWN_LISTBOX.
See the following links for more clarity
http://www.saptechies.com/in-a-modulepool-how-to-set-drop-down-list/
Regards,
MAHI.
‎2008 Aug 07 1:42 PM
Hi,
You have to define a text field, and in the properties there is a dropdown option. you have to specify it as 'listbox'.
If you want to pass values to it, you can use the function module 'VRM_SET_VALUES'.
-Pavan
‎2008 Aug 07 1:48 PM
Extention of my previous rly.
Use the following code to add values in drop down box
*----------------------------------------------------------------------*
* TYPE-POOLS *
*----------------------------------------------------------------------*
TYPE-POOLS:
vrm. " Value Request Manager
Data:
* To hold quarter details, these details are used to display in list box of
* the parameter called Quarter in the selection screen.
t_quarters TYPE vrm_values.
Parameters:
p_quat TYPE char20
AS LISTBOX VISIBLE LENGTH 30
LOWER CASE OBLIGATORY.
*----------------------------------------------------------------------*
* AT SELECTION-SCREEN ON VALUE-REQUEST *
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_quat.
PERFORM fill_quarters.
PERFORM display_quarters.
*&---------------------------------------------------------------------*
*& Form fill_quarters
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM fill_quarters .
DATA:
* Field string to fill quarters in the year
lfs_quarters TYPE LINE OF vrm_values.
REFRESH t_quarters.
lfs_quarters-key = '1'.
lfs_quarters-text = text-qu1.
APPEND lfs_quarters TO t_quarters.
lfs_quarters-key = '2'.
lfs_quarters-text = text-qu2.
APPEND lfs_quarters TO t_quarters.
lfs_quarters-key = '3'.
lfs_quarters-text = text-qu3.
APPEND lfs_quarters TO t_quarters.
lfs_quarters-key = '4'.
lfs_quarters-text = text-qu4.
APPEND lfs_quarters TO t_quarters.
ENDFORM. " fill_quarters
*&---------------------------------------------------------------------*
*& Form display_quarters
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM display_quarters .
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_QUAT'
values = t_quarters[]
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " display_quartersRegards,
Mahi.
‎2008 Aug 08 7:05 AM
Hi,
Assign function code to IO field.
and use the function module VRM_SET_VALUES.
‎2008 Aug 08 11:21 AM
‎2008 Aug 08 11:31 AM
Hi
In Dialog programming select the i/o field and in the Attributes check on the Dropdown checkbox (F2 key for attributes).
Hope it helps.
Murthy