Skip to Content
0
Former Member
Mar 08, 2007 at 10:13 AM

run time error

15 Views

hi everone

am comipling d code but am getting runtime errors plzz help

vijay

REPORT ZX4 .

TABLES:LFA1,KNA1,MARA.

SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR,

KUNNR FOR KNA1-KUNNR,

MATNR FOR MARA-MATNR.

*DATA ITAB TYPE STANDARD TABLE OF KNA1 WITH HEADER LINE.

*DATA JTAB TYPE STANDARD TABLE OF LFA1 WITH HEADER LINE.

*DATA ATAB TYPE STANDARD TABLE OF VBRP WITH HEADER LINE.

DATA:BEGIN OF ITAB OCCURS 1,

KUNNR LIKE KNA1-KUNNR,

LAND1 LIKE KNA1-LAND1,

NAME1 LIKE KNA1-NAME1,

ORT01 LIKE KNA1-ORT01,

END OF ITAB.

DATA:BEGIN OF JTAB OCCURS 1,

LIFNR LIKE LFA1-LIFNR,

LAND1 LIKE LFA1-LAND1,

NAME1 LIKE LFA1-NAME1,

END OF JTAB.

DATA:BEGIN OF ATAB OCCURS 1 ,

MATNR LIKE MARA-MATNR,

MBRSH LIKE MARA-MBRSH,

MTART LIKE MARA-MTART,

MEINS LIKE MARA-MEINS,

END OF ATAB.

TYPE-POOLs SLIS.

DATA:REPID LIKE SY-REPID,

KNA1_B TYPE SLIS_T_FIELDCAT_ALV,

LAYOUT_B TYPE SLIS_LAYOUT_ALV,

EVENTS TYPE SLIS_T_EVENT.

REPID = SY-REPID.

SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1 INTO TABLE ITAB

UP TO 20 ROWS WHERE KUNNR IN KUNNR.

SELECT LIFNR LAND1 NAME1 ORT01 FROM LFA1 INTO TABLE JTAB

UP TO 20 ROWS WHERE LIFNR IN LIFNR.

SELECT MATNR VBELN FBUDA PSTYV FROM VBRP INTO TABLE ATAB

UP TO 20 ROWS WHERE VBELN IN MATNR.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

I_CALLBACK_PROGRAM = REPID.

PERFORM APPENDBLOCK TABLES ITAB USING 'ITAB'.

PERFORM APPENDBLOCK TABLES ITAB USING 'JTAB'.

PERFORM APPENDBLOCK TABLES ITAB USING 'ATAB'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

FORM APPENDBLOCK TABLES KTAB USING ITAB.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = REPID

I_INTERNAL_TABNAME = JTAB

I_INCLNAME = REPID

CHANGING

CT_FIELDCAT = KNA1_B.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = LAYOUT_B

IT_FIELDCAT = KNA1_B

I_TABNAME = JTAB

IT_EVENTS = EVENTS

TABLES

T_OUTTAB = KTAB.

ENDFORM.