Skip to Content
0
Jan 09, 2008 at 08:13 AM

Runtime Error while Displaying End of Page in ALV

19 Views

Hi,

This is the Code i have written.. The top of page is printing when i comment the end of page in the program (BOLD FORMAT)..But when Uncomment the End of page Code this is going to Short dump..and the Runtime Error is..

A PERFORM was used to call the routine "END_OF_LIST" of the program "ZPROGRAM

".

This routine contains exactly 0 formal parameters, but the current

call contains 1 actual parameters.

*&----


*

*& Form DISPLAY_ALV_VBAP

*&----


*

FORM DISPLAY_ALV_VBAP .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE1'

I_CALLBACK_HTML_END_OF_LIST = 'END_OF_LIST'

I_GRID_TITLE = 'THIS IS LAST'

IS_LAYOUT = WA_LAYO

IT_FIELDCAT = I_FIELDCAT

TABLES

T_OUTTAB = IT_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. " DISPLAY_ALV_VBAP

&----


*& Form top_of_page1

&----


  • text

----


FORM TOP_OF_PAGE1.

DATA:IT_LISTHEAD2 TYPE SLIS_T_LISTHEADER.

DATA:WA_LISTHEAD2 TYPE SLIS_LISTHEADER.

WA_LISTHEAD2-TYP = 'H'.

WA_LISTHEAD2-INFO = 'THIS IS TOP OF PAGE FOR SECOND LIST'.

APPEND WA_LISTHEAD2 TO IT_LISTHEAD2.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEAD2

I_LOGO = 'ENJOYSAP_LOGO'.

ENDFORM. "top_of_page1

&----


*& Form end_of_list

&----


  • text

----


FORM END_OF_LIST.

DATA:IT_LISTHEAD1 TYPE SLIS_T_LISTHEADER.

DATA:WA_LISTHEAD1 TYPE SLIS_LISTHEADER.

WA_LISTHEAD1-TYP = 'H'.

WA_LISTHEAD1-INFO = 'THIS IS END OF PAGE FOR SECOND LIST'.

APPEND WA_LISTHEAD1 TO IT_LISTHEAD1.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEAD1

I_LOGO = 'ENJOYSAP_LOGO'

I_END_OF_LIST_GRID = 'X'

.

ENDFORM.