Skip to Content
0
Former Member
Feb 11, 2007 at 06:31 PM

error in ALV report.

20 Views

Hi friends,

This is the code intended for ALV interactive

But its going to short dump.

Please trace the error in it.

REPORT ZTEST_ALV .

TYPE-POOLS : SLIS.

DATA: VT_FIELDCAT TYPE slis_t_fieldcat_alv.

DATA: VT_FIELDCAT1 TYPE slis_t_fieldcat_alv.

DATA : BEGIN OF ITAB OCCURS 0,

P1 TYPE I VALUE 2,

P3 TYPE I VALUE 3,

END OF ITAB.

APPEND ITAB.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB'

I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = SY-REPID

CHANGING

CT_FIELDCAT = VT_FIELDCAT.

.

IF SY-SUBRC <> 0.

ENDIF.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_USER_COMMAND = 'DISP_DETAIL'

IT_FIELDCAT = vt_fieldcat

TABLES

T_OUTTAB = ITAB.

IF SY-SUBRC <> 0.

ENDIF.

FORM DISP_DETAIL USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

IF ucomm = '&IC1'.

READ TABLE ITAB INDEX selfield-tabindex.

IF sy-subrc = 0.

DATA : ITAB1 LIKE ITAB OCCURS 0 WITH HEADER LINE.

LOOP AT ITAB .

MOVE 6 TO ITAB1-P1.

MOVE 6 TO ITAB-P3.

APPEND ITAB1.

ENDLOOP.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB1'

I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = SY-REPID

CHANGING

CT_FIELDCAT = VT_FIELDCAT1.

.

IF SY-SUBRC <> 0.

ENDIF.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = SY-REPID

it_fieldcat = VT_FIELDCAT1

TABLES

t_outtab = ITAB1.

ENDIF.

ENDIF.

ENDFORM.