Skip to Content
0
Former Member
Apr 15, 2007 at 09:19 PM

ALV Grid display

16 Views

hi there,

this is my first time with ALV reports. with the code below...I dont get the data in the grid display. the grid is blank and when i use back i c normal list with output.

Plz some one tell me what am i missing.

thanks.

tables: mara.

DATA: ITAB TYPE STANDARD TABLE OF MARA,

WA LIKE LINE OF ITAB.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

select-options:sel1 for mara-matnr.

SELECTION-SCREEN END OF BLOCK B1.

WRITE:/ 'WELCOME'.

loop at itab into wa.

write: wa-matnr,wa-ersda,wa-ernam,wa-mtart.

endloop.

SELECT MATNR ERSDA ERNAM MTART

INTO CORRESPONDING FIELDS OF TABLE ITAB

FROM MARA

WHERE MATNR IN SEL1.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'zsc11'

I_STRUCTURE_NAME = 'itab'

I_DEFAULT = 'X'

TABLES

T_OUTTAB = itab.

IF SY-SUBRC <> 0.

write: 'sy-subrc:', sy-subrc.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.