Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error in alv report

Former Member
0 Likes
752

hi expert i have created alv report ... it is giving runtime error .. in CALL FUNCTION 'REUSE_ALV_EVENTS_GET' how to solve this plz help ....

&----


*& Report ZALVTRIAL *

*& *

&----


*& *

*& *

&----


REPORT ZALVTRIAL .

tables : vbak,vbap.

type-pools: slis.

**********************************************

types : begin of scr1,

vbeln type VBELN_VA,

erdat type erdat,

ernam type ernam,

end of scr1.

data : i_vbak type standard table of scr1,

wa_vbak type scr1.

***********************************************

types : begin of scr2,

vbeln type VBELN_VA,

matnr type matnr,

posnr type posnr_va,

end of scr2.

data : i_vbap type standard table of scr2,

wa_vbap type scr2.

**********************************************

types : begin of scr_final,

vbeln type VBELN_VA,

erdat type erdat,

ernam type ernam,

matnr type matnr,

posnr type posnr_va,

end of scr_final.

data : i_final type standard table of scr_final,

wa_final type scr_final.

*********************************************

*

    • *********************************************************************

**START OF DATA DECLERATION FOR ALV

************************************************************************

*DATA FOR CATLOG

DATA: wa_fldcat TYPE slis_fieldcat_alv,

i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .

*DATA FOR EVENT

DATA : wa_event TYPE slis_alv_event,

i_event TYPE slis_t_event WITH HEADER LINE.

*DATA FOR HEADER

DATA: wa_head TYPE slis_listheader,

i_head TYPE slis_t_listheader WITH HEADER LINE.

*data for layout

DATA: wa_layout TYPE slis_layout_alv.

selection-screen: begin of block b1 with frame title text-001.

select-options: s_vbeln for vbak-vbeln .

SELECTION-SCREEN: END OF BLOCK B1.

***********************************************************

start-of-selection.

select vbeln erdat ernam

from vbak

into table i_vbak where vbeln in s_vbeln.

***********************************************

if sy-subrc <> 0.

leave list-processing.

else.

sort i_vbak by vbeln.

endif.

********************************************************

if i_vbak[] is not initial.

select vbeln matnr posnr

from vbap

into table i_vbap

for all entries in i_vbak

where vbeln = i_vbak-vbeln.

endif.

************************************************************

loop at i_vbak into wa_vbak.

wa_final-vbeln = wa_vbak-vbeln.

wa_final-erdat = wa_vbak-erdat .

wa_final-ernam = wa_vbak-ernam .

append wa_final to i_final.

endloop.

***********************************************************

if sy-subrc = 0.

loop at i_final into wa_final.

read table i_vbap into wa_vbap

with key vbeln = wa_vbak-vbeln binary search.

if sy-subrc = 0.

wa_final-matnr = wa_vbap-matnr.

wa_final-posnr = wa_vbap-posnr.

modify i_final from wa_final transporting matnr posnr.

endif.

clear : wa_vbap , wa_final.

endloop.

endif.

********************************************************

********************************************************

**WRITE:/1 sy-uline(63).

**

**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5

**ON

**,21'|',22 'Name' COLOR 4 ON,35'|',

    • 36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON

**,

**63'|'.

**

**WRITE:/1 sy-uline(63).

**

**

**LOOP AT i_final INTO wa_final.

    • WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22

    • wa_final-ernam,35'|',

    • 36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.

**endloop.

*******************************************************

*******************************************************

perform builtcatalog.

perform event.

perform listheader.

perform layout.

perform display.

*

&----


*& Form builtcatalog

&----


  • text

----


form builtcatalog.

wa_fldcat-col_pos = '1'.

wa_fldcat-fieldname = 'vbeln'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Sales Document'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '2'.

wa_fldcat-fieldname = 'erdat'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Date'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '3'.

wa_fldcat-fieldname = 'ernam'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Name'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '4'.

wa_fldcat-fieldname = 'matnr'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Material Number'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '5'.

wa_fldcat-fieldname = 'posnr'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Sales Document Item'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

endform. "builtcatalog

&----


*& Form event

&----


  • text

----


form event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

  • EXPORTING

  • I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = i_final[].

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 1

  • OTHERS = 2

.

IF sy-subrc = 0.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_top_of_page.

IF sy-subrc = 0.

wa_event-form = slis_ev_top_of_page.

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_pf_status_set .

IF sy-subrc = 0.

wa_event-form = slis_ev_pf_status_set .

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_user_command.

IF sy-subrc = 0.

wa_event-form = slis_ev_user_command .

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

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

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

ENDIF.

endform. "event

&----


*& Form

&----


  • text

----


form listheader.

wa_head-typ = 'H'.

wa_head-info = 'ALV PROGRAM AUTHOR jessy'

.

APPEND wa_head TO i_head.

endform. "listheader

&----


*& Form layout

&----


  • text

----


form layout.

wa_layout-zebra = 'X'.

wa_layout-f2code = 'DUB'.

endform. "layout

&----


*& Form display

&----


  • text

----


form display.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = ' sy-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 = wa_layout

IT_FIELDCAT = i_fldcat[]

  • 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

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = i_event[]

  • 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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
727
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'


EXPORTING 
I_LIST_TYPE = 0 
IMPORTING
ET_EVENTS = i_final[].-->  "Change this to i_event[]

EXCEPTIONS 
LIST_TYPE_WRONG = 1 
OTHERS = 2

Edited by: Sathar RA on Nov 13, 2008 10:08 AM

7 REPLIES 7
Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
727

Hi Jasprit

wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'vbeln'. "-----> write in upper case 
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.

wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'erdat'. "-----> write in upper case 
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Date'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.

wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'ernam'.  "-----> write in upper case 
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Name'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.

wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'matnr'.  "-----> write in upper case 
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Material Number'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.

wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'posnr'.  "-----> write in upper case 
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document Item'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.

Thanks & Regards

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
727


CONSTANTS:event_nam1(12)  TYPE c VALUE 'USER_COMMAND'.
CONSTANTS:event_nam2(13)    TYPE c VALUE 'TOP_OF_PAGE'.
CONSTANTS:eventform1(11)    TYPE c VALUE 'DISPLAY_TOP'.
CONSTANTS:eventform2(7)    TYPE c VALUE 'COMMAND'.


data:it_events        TYPE slis_t_event,
     wk_events           LIKE LINE OF it_events.


perform build_events.


 CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_background_id          = 'ALV_BACKGROUND'
      i_callback_program       = sy-repid
      is_layout                = wk_layout
      i_callback_pf_status_set = 'GUI_STAT'
      it_fieldcat              = it_fieldcat_alv[]
      it_events          	= it_events[]
    TABLES
      t_outtab                 = it_alv1[].




Form build events.
  MOVE event_nam2 TO wk_events-name.
  MOVE 'DISPLAY_TOP' TO wk_events-form.
  APPEND wk_events TO it_events.


  MOVE event_nam1 TO wk_events-name.
  MOVE 'COMMAND' TO wk_events-form.
  APPEND wk_events TO it_events.
endform.

form COMMAND USING syst-ucomm LIKE syst-ucomm
                                 selfield TYPE slis_selfield.

write ur code here

endform.



FORM gui_stat  USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'SERIAL'.
ENDFORM.                    "GUI_STAT


FORM top_of_page.

build ur header here....


endform.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
727

Follow the other post too

Read only

Former Member
0 Likes
728
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'


EXPORTING 
I_LIST_TYPE = 0 
IMPORTING
ET_EVENTS = i_final[].-->  "Change this to i_event[]

EXCEPTIONS 
LIST_TYPE_WRONG = 1 
OTHERS = 2

Edited by: Sathar RA on Nov 13, 2008 10:08 AM

Read only

Former Member
0 Likes
727

change these parts in u r program

DATA : WA_EVENT TYPE SLIS_ALV_EVENT,

I_EVENT TYPE SLIS_T_EVENT. " WITH HEADER LINE.

WA_FLDCAT-COL_POS = '1'.

WA_FLDCAT-FIELDNAME = 'VBELN'.

WA_FLDCAT-TABNAME = 'I_FINAL'.

WA_FLDCAT-REPTEXT_DDIC = 'Sales Document'.

APPEND WA_FLDCAT TO I_FLDCAT.

CLEAR WA_FLDCAT.

WA_FLDCAT-COL_POS = '2'.

WA_FLDCAT-FIELDNAME = 'ERDAT'.

WA_FLDCAT-TABNAME = 'I_FINAL'.

WA_FLDCAT-REPTEXT_DDIC = 'Date'.

APPEND WA_FLDCAT TO I_FLDCAT.

CLEAR WA_FLDCAT.

WA_FLDCAT-COL_POS = '3'.

WA_FLDCAT-FIELDNAME = 'ERNAM'.

WA_FLDCAT-TABNAME = 'I_FINAL'.

WA_FLDCAT-REPTEXT_DDIC = 'Name'.

APPEND WA_FLDCAT TO I_FLDCAT.

CLEAR WA_FLDCAT.

WA_FLDCAT-COL_POS = '4'.

WA_FLDCAT-FIELDNAME = 'MATNR'.

WA_FLDCAT-TABNAME = 'I_FINAL'.

WA_FLDCAT-REPTEXT_DDIC = 'Material Number'.

APPEND WA_FLDCAT TO I_FLDCAT.

CLEAR WA_FLDCAT.

WA_FLDCAT-COL_POS = '5'.

WA_FLDCAT-FIELDNAME = 'POSNR'.

WA_FLDCAT-TABNAME = 'I_FINAL'.

WA_FLDCAT-REPTEXT_DDIC = 'Sales Document Item'.

APPEND WA_FLDCAT TO I_FLDCAT.

CLEAR WA_FLDCAT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

IMPORTING

ET_EVENTS = I_EVENT.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = ' sy-repid '

IS_LAYOUT = WA_LAYOUT

IT_FIELDCAT = I_FLDCAT[]

TABLES

T_OUTTAB = I_FINAL[].

Read only

Former Member
0 Likes
727

thanks for suggestion .. points reawrded back to replies ... that solved query

Read only

Former Member
0 Likes
727

Hi,

The error has been corrected.

Copy the following code and execute. You won't get any runtime errors.

&----


*& Report ZALVTRIAL *

*& *

&----


*& *

*& *

&----


REPORT ZALVTRIAL .

tables : vbak,vbap.

type-pools: slis.

**********************************************

types : begin of scr1,

vbeln type VBELN_VA,

erdat type erdat,

ernam type ernam,

end of scr1.

data : i_vbak type standard table of scr1,

wa_vbak type scr1.

***********************************************

types : begin of scr2,

vbeln type VBELN_VA,

matnr type matnr,

posnr type posnr_va,

end of scr2.

data : i_vbap type standard table of scr2,

wa_vbap type scr2.

**********************************************

types : begin of scr_final,

vbeln type VBELN_VA,

erdat type erdat,

ernam type ernam,

matnr type matnr,

posnr type posnr_va,

end of scr_final.

data : i_final type standard table of scr_final,

wa_final type scr_final.

*********************************************

*

*********************************************************************

**START OF DATA DECLERATION FOR ALV

************************************************************************

*DATA FOR CATLOG

DATA: wa_fldcat TYPE slis_fieldcat_alv,

i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .

*DATA FOR EVENT

DATA : wa_event TYPE slis_alv_event,

i_event TYPE SLIS_T_EVENT." WITH HEADER LINE. "-----> correction done here

*DATA FOR HEADER

DATA: wa_head TYPE slis_listheader,

i_head TYPE slis_t_listheader WITH HEADER LINE.

*data for layout

DATA: wa_layout TYPE slis_layout_alv.

selection-screen: begin of block b1 with frame title text-001.

select-options: s_vbeln for vbak-vbeln .

SELECTION-SCREEN: END OF BLOCK B1.

***********************************************************

start-of-selection.

select vbeln erdat ernam

from vbak

into table i_vbak where vbeln in s_vbeln.

***********************************************

if sy-subrc = 0.

leave list-processing.

else.

sort i_vbak by vbeln.

endif.

********************************************************

if i_vbak[] is not initial.

select vbeln matnr posnr

from vbap

into table i_vbap

for all entries in i_vbak

where vbeln = i_vbak-vbeln.

endif.

************************************************************

loop at i_vbak into wa_vbak.

wa_final-vbeln = wa_vbak-vbeln.

wa_final-erdat = wa_vbak-erdat .

wa_final-ernam = wa_vbak-ernam .

append wa_final to i_final.

endloop.

***********************************************************

if sy-subrc = 0.

loop at i_final into wa_final.

read table i_vbap into wa_vbap

with key vbeln = wa_vbak-vbeln binary search.

if sy-subrc = 0.

wa_final-matnr = wa_vbap-matnr.

wa_final-posnr = wa_vbap-posnr.

modify i_final from wa_final transporting matnr posnr.

endif.

clear : wa_vbap , wa_final.

endloop.

endif.

********************************************************

********************************************************

**WRITE:/1 sy-uline(63).

**

**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5

**ON

**,21'|',22 'Name' COLOR 4 ON,35'|',

*36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON

**,

**63'|'.

**

**WRITE:/1 sy-uline(63).

**

**

**LOOP AT i_final INTO wa_final.

WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22

wa_final-ernam,35'|',

36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.

**endloop.

*******************************************************

*******************************************************

perform builtcatalog.

perform event.

perform listheader.

perform layout.

perform display.

*

*&----


**& Form builtcatalog

*&----


*

*

*text

*----


form builtcatalog.

wa_fldcat-col_pos = '1'.

wa_fldcat-fieldname = 'vbeln'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Sales Document'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '2'.

wa_fldcat-fieldname = 'erdat'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Date'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '3'.

wa_fldcat-fieldname = 'ernam'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Name'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '4'.

wa_fldcat-fieldname = 'matnr'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Material Number'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

wa_fldcat-col_pos = '5'.

wa_fldcat-fieldname = 'posnr'.

wa_fldcat-tabname = 'I_FINAL'.

wa_fldcat-reptext_ddic = 'Sales Document Item'.

APPEND wa_fldcat TO i_fldcat.

CLEAR wa_fldcat.

endform. "builtcatalog

*&----


**& Form event

*&----


*

*

*text

*----


form event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = i_event "-----> correction done here

EXCEPTIONS

LIST_TYPE_WRONG = 1

OTHERS = 2

.

IF sy-subrc = 0.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_top_of_page.

IF sy-subrc = 0.

wa_event-form = slis_ev_top_of_page.

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_pf_status_set .

IF sy-subrc = 0.

wa_event-form = slis_ev_pf_status_set .

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

READ TABLE i_event INTO wa_event

WITH KEY name = slis_ev_user_command.

IF sy-subrc = 0.

wa_event-form = slis_ev_user_command .

MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.

ENDIF.

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

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

ENDIF.

endform. "event

*&----


**& Form

*&----


*

*

*text

*----


form listheader.

wa_head-typ = 'H'.

wa_head-info = 'ALV PROGRAM AUTHOR jessy'

.

APPEND wa_head TO i_head.

endform. "listheader

*&----


**& Form layout

*&----


*

*

*text

*----


form layout.

wa_layout-zebra = 'X'.

wa_layout-f2code = 'DUB'.

endform. "layout

*&----


**& Form display

*&----


*

*text

*----


form display.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

*I_INTERFACE_CHECK = ' '

*I_BYPASSING_BUFFER = ' '

*I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = ' sy-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 = wa_layout

IT_FIELDCAT = i_fldcat[]

*

*IT_EXCLUDING =

*IT_SPECIAL_GROUPS =

*IT_SORT =

*IT_FILTER =

*IS_SEL_HIDE =

*I_DEFAULT = 'X'

*I_SAVE = ' '

*IS_VARIANT =

IT_EVENTS = i_event[] "-----> correction done here

*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

*IT_ALV_GRAPHICS =

*IT_HYPERLINK =

*IT_ADD_FIELDCAT =

*IT_EXCEPT_QINFO =

*I_HTML_HEIGHT_TOP =

*I_HTML_HEIGHT_END =

*IMPORTING

*E_EXIT_CAUSED_BY_CALLER =

*ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = i_final "-----> correction done here

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

-


You need to check the TYPE before passing the internal tables or workareas to the PARAMETERS of a Function Module.

Regards,

Ravi Kiran..