‎2008 May 02 9:40 AM
Hi All,
i am providing a drop down box for a selection field for an executable program by using VRM_SET values.But its not displaying the drop down box.Plz let me know the solution.
FORM drop_down.
TYPES : BEGIN OF l_s_help,
werks TYPE werks_d,
pspid TYPE ps_pspid,
descr(80) TYPE c,
END OF l_s_help.
DATA : l_t_template TYPE TABLE OF vrm_value .
DATA : l_r_template TYPE vrm_value.
DATA : l_t_help TYPE TABLE OF l_s_help.
DATA : l_r_help TYPE l_s_help.
SELECT werks pspid descr FROM /rb04/yt3_plant INTO TABLE l_t_help.
LOOP AT l_t_help INTO l_r_help.
MOVE l_r_help-descr TO l_r_template-key.
APPEND l_r_template TO l_t_template.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'PRD_TEMP'
values = l_t_template
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. " drop_down
‎2008 Jul 02 8:25 AM
report zss1.
&----
*& Form drop_down
&----
text
----
FORM drop_down.
type-pools : vrm.
TYPES : BEGIN OF l_s_help,
werks TYPE werks_d,
pspid TYPE ps_pspid,
descr(80) TYPE c,
END OF l_s_help.
DATA : l_t_template TYPE TABLE OF vrm_value .
DATA : l_r_template TYPE vrm_value.
DATA : l_t_help TYPE TABLE OF l_s_help.
DATA : l_r_help TYPE l_s_help.
SELECT werks pspid FROM projs INTO TABLE l_t_help up to 10 rows.
LOOP AT l_t_help INTO l_r_help.
*MOVE l_r_help-descr TO l_r_template-key.
APPEND l_r_template TO l_t_template.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'PRD_TEMP'
VALUES = l_t_template
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. " drop_down
regards
Aniruddh
‎2008 Jul 02 9:57 AM
Hi,
Declare the parameter like this:
parmeters: PRD_TEMP type <actualtype> as listbox visible length 10.
Then call the routine 'DROP_DOWN' in INITIALIZATION event of the report.
regards,
Mouli.