Skip to Content
0
Former Member
Jul 11, 2007 at 05:16 AM

ALV

23 Views

Hi,

this is Sandeep,

I am trying to do an example on ALV’s by using FIELDCATALOG and GRIDLAYOUT… I am getting message as <u>“program terminated, short dump is being formatted”...</u>Below I mentioned that code...Please help on this how can solve that issue....

Thanks,

Sandeep.

TYPE-POOLS:SLIS.

data it_fieldcat type slis_fieldcat_alv occurs 0 with header line.

data gs_layout type slis_layout_alv.

data v_repid like sy-repid.

DATA:BEGIN OF ITAB OCCURS 0,

MATNR LIKE MARA-MATNR,

ERSDA LIKE MARA-ERSDA,

ERNAM LIKE MARA-ERNAM,

MTART LIKE MARA-MTART,

WERKS LIKE MARC-WERKS,

PSTAT LIKE MARC-PSTAT,

EKGRP LIKE MARC-EKGRP,

END OF Itab.

START-OF-SELECTION.

v_repid = sy-repid.

SELECT MARAMATNR MARAERSDA MARAERNAM MARAMTART MARCWERKS MARCPSTAT MARC~EKGRP

INTO CORRESPONDING FIELDS OF TABLE ITAB

FROM MARA INNER JOIN MARC

ON MARAMATNR = MARCMATNR.

PERFORM field_catalog.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = v_repid

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IT_FIELDCAT = it_fieldcat[]

IS_LAYOUT = gs_layout

TABLES

T_OUTTAB = ITAB.

&----


*& Form field_catalog

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM field_catalog .

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = v_repid

I_INTERNAL_TABNAME = 'ITAB'

I_INCLNAME = v_repid

CHANGING

CT_FIELDCAT = IT_FIELDCAT[].

ENDFORM. " field_catalog