Skip to Content
0
Former Member
Feb 27, 2006 at 09:42 AM

drop down list not working

1429 Views

hi friends..

i am making dropdown list on field t001w-werks in module pool ..following is code..

PROCESS BEFORE OUTPUT.

MODULE STATUS_1000.

*

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

MODULE USER_COMMAND_1000.

PROCESS ON VALUE-REQUEST.

FIELD t001w-werks MODULE create_dropdown_box.

************

REPORT ZDROP_DOWN.

tables : t001w.

data : begin of itab_t001w occurs 0,

werks like t001w-werks,

end of itab_t001w.

module STATUS_1000 output.

SET PF-STATUS 'MENU'.

SET TITLEBAR 'TIT'.

endmodule. " STATUS_1000 OUTPUT

module cancel input.

LEAVE PROGRAM.

endmodule. " cancel INPUT

module USER_COMMAND_1000 input.

CASE sy-ucomm.

WHEN 'SELECTED'.

MESSAGE i888(sabapdocu) WITH t001w-werks.

ENDCASE.

break-point.

endmodule. " USER_COMMAND_1000 INPUT

module create_dropdown_box input.

SELECT werks FROM t001w iNTO CORRESPONDING FIELDS OF TABLE itab_t001w.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WERKS'

VALUE_ORG = 'C'

tables

value_tab = itab_t001w

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

endmodule. " create_dropdown_box INPUT

Help Please