Skip to Content
0
Former Member
Aug 12, 2015 at 10:38 AM

Facing problem in creating list box in module pool

20 Views

Hello

I am facing problem in creating list box in module pool.

Please have a look.

The problem is when i am executing the program it's not showing the list in the list box not even the name in the list box.

Awaiting your response.

Thanks in Advance

*& Include MZS13TOP Module poo*

*& *

*&-------------------------------------------

*&---------------------------------------------------------------------*

*& Include MZS13TOP Module poo*

*& *

*&---------------------------------------------------------------------*

PROGRAM SAPMZS13.

TYPE-POOLS : VRM.

TABLES: MARA.

TYPES: BEGIN OF TY_MARA,

MATNR TYPE MARA-MATNR,

ERSDA TYPE MARA-ERSDA,

ERNAM TYPE MARA-ERNAM,

END OF TY_MARA.

DATA: LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

DATA: S_MATNR TYPE MARA-MATNR.

DATA: itab TYPE TABLE OF TY_MARA,

wa TYPE TY_MARA.

CONTROLS: TC TYPE TABLEVIEW USING SCREEN 100.

===============================================================

INCLUDE MZS13TOP . " global Data

* INCLUDE MZS13O01 . " PBO-Modules *

* INCLUDE MZS13I01 . " PAI-Modules *

* INCLUDE MZS13F01 . " FORM-Routines *

*&---------------------------------------------------------------------*

*& Module STATUS_0100 OUTPUT

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

MODULE STATUS_0100 OUTPUT.

* SET PF-STATUS 'xxxxxxxx'.

* SET TITLEBAR 'xxx'.

  1. ENDMODULE. " STATUS_0100 OUTPUT

*&---------------------------------------------------------------------*

*& Module USER_COMMAND_0100 INPUT

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

CALL SCREEN 110.

  1. ENDCASE.

  1. ENDMODULE. " USER_COMMAND_0100 INPUT

*&---------------------------------------------------------------------*

*& Module USER_COMMAND_0110 INPUT

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

MODULE USER_COMMAND_0110 INPUT.

VALUE-KEY = '1'.

VALUE-TEXT = 'MATNR'.

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'S_MATNR'

VALUES = LIST

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.

CASE S_MATNR.

WHEN '1'.

SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE ITAB WHERE MATNR = S_MATNR.

WHEN 'DISP'.

CALL SCREEN 100.

ENDCASE.

  1. ENDMODULE. " USER_COMMAND_0110 INPUT

*&---------------------------------------------------------------------*

*& Module STATUS_0110 OUTPUT

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

MODULE STATUS_0110 OUTPUT.

* SET PF-STATUS 'xxxxxxxx'.

* SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0110 OUTPUT


100:





PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

LOOP AT ITAB INTO WA WITH CONTROL TC.


ENDLOOP.

PROCESS AFTER INPUT.

LOOP AT ITAB.

ENDLOOP.



MODULE USER_COMMAND_0100.

110:

output:

110:

1

Attachments

100.jpg (65.5 kB)
110.jpg (78.4 kB)
110.jpg (7.9 kB)