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

Statement is not accessible

Former Member
0 Kudos
307

gettin error "Statement is not Accessible " at the below bold line

x_events-name = slis_ev_top_of_page.

x_events-form = 'TOP_OF_PAGE'.

APPEND x_events TO it_events.

  • To display Date and time on which report is running

&----


*& Form top_of_page

&----


  • text

----


FORM top_of_page.

DATA: wrk_date(10) TYPE c.

CONCATENATE ' Date and time on which report is running :' sy-datum INTO wrk_date.

CLEAR ls_line.

ls_line-typ = 'S'.

ls_line-info = sy-datum.

APPEND ls_line TO i_list_top_of_page.

CLEAR ls_line.

ls_line-typ = 'S'.

ls_line-info = SY-UZEIT.

APPEND ls_line TO i_list_top_of_page.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = i_list_top_of_page.

REFRESH i_list_top_of_page.

ENDFORM. "top_of_page

*END OF -Date and time on which report is running

  • 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 = 'HTML_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 = fieldcatalog[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'A'

  • IS_VARIANT =

it_events = 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 = int_final

  • EXCEPTIONS

  • PROGRAM_ERROR = 1v

  • 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.

3 REPLIES 3
Read only

former_member206377
Active Contributor
0 Kudos
252

Please use 'Code' tags

Read only

0 Kudos
252

Hi Ajay,

Please check the nesting.

There is some piece of code after endForm. Which is giving the problem.

Regrads,

Komal

Read only

Former Member
0 Kudos
252

statements after endforms are not accessible

so keep all your form__endforms after all executable lines...

do this..
do this...

form abc
endform..

form xyz.
endform...

like this...