Skip to Content
0
Former Member
Jul 12, 2007 at 09:43 AM

my program is going to short dump

13 Views

hi

i have written the following code for alv report ..but it is going to short dump

i could not trace error ..please help me..

&----


*& Report YHARI_ALV_REP

*&

&----


*&

*&

&----


REPORT YHARI_ALV_REP NO STANDARD PAGE HEADING .

TYPE-POOLS : SLIS.

TABLES : VBAK , VBAP .

DATA : BEGIN OF I_VBAP OCCURS 100,

VBELN LIKE VBAK-VBELN ,

POSNR LIKE VBAP-POSNR ,

MATNR LIKE VBAP-MATNR ,

MATKL LIKE VBAP-MATKL ,

ARKTX LIKE VBAP-ARKTX ,

END OF I_VBAP.

DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.

PERFORM GET_DATA.

PERFORM BUID_FIELDCAT.

PERFORM DISP_DATA.

&----


*& Form GET_DATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM GET_DATA .

SELECT VBELN POSNR MATNR MATKL ARKTX

INTO TABLE I_VBAP

FROM VBAP

WHERE VBELN IN S_VBELN.

ENDFORM. " GET_DATA

&----


*& Form BUID_FIELDCAT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM BUID_FIELDCAT .

DATA : L_REPID LIKE SY-REPID.

L_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = L_REPID

I_INTERNAL_TABNAME = 'I_VBAP'

I_STRUCTURE_NAME = L_REPID

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_INCLNAME =

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = IT_FIELDCAT[]

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

ENDFORM. " BUID_FIELDCAT

&----


*& Form DISP_DATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM DISP_DATA .

DATA : L1_REPID LIKE SY-REPID.

L1_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = L1_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = IT_FIELDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = I_VBAP

EXCEPTIONS

PROGRAM_ERROR = 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.

ENDFORM. " DISP_DATA