Monday, December 20, 2010

PROCESS BEFORE OUTPUT.
MODULE values_into_dropdown.
FIELD g_bukrs.

PROCESS AFTER INPUT.
FIELD g_bukrs.


  • Logic to fill Dropdown field with values.

ROGRAM  sapmztest_dropdown.
DATA: g_bukrs TYPE t001-bukrs.
*&---------------------------------------------------------------------*
*&      Module  VALUES_INTO_DROPDOWN  OUTPUT
*&---------------------------------------------------------------------*
MODULE values_into_dropdown OUTPUT.
TYPE-POOLS:vrm.
DATA:
field     TYPE  vrm_id,
it_values TYPE  vrm_values,
wa_values LIKE LINE OF it_values.
DATA: t001 TYPE t001 OCCURS 0 WITH HEADER LINE.
IF it_values[] Is INITIAL.
SELECT * FROM t001 INTO TABLE t001 UP TO 10 ROWS.
LOOP AT t001.
wa_values-key  = t001-bukrs.
wa_values-text = t001-butxt.
APPEND wa_values TO it_values.
CLEAR  wa_values.
ENDLOOP.
ENDIF.
field = 'G_BUKRS'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID     = FIELD
values = it_values.

ENDMODULE.                 " VALUES_INTO_DROPDOWN  OUTPUT  

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.