Application Development 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: 

Extended program check for event TOp-of-page

Former Member
0 Kudos

hi,

my code

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'.

READ TABLE ts_events INTO wa_events

WITH KEY name = slis_ev_top_of_page.

IF sy-subrc EQ 0.

MOVE 'TOP-OF-PAGE' TO wa_events-form.

MODIFY ts_events FROM wa_events INDEX sy-tabix.

ENDIF.

FORM top_of_page .

DATA: ts_list_top TYPE slis_t_listheader,

wa_line TYPE slis_listheader.

CLEAR wa_line.

wa_line-typ = 'H'.

wa_line-info = text-012.

APPEND wa_line TO ts_list_top.

END FORM .

When I run Extended Prog Check ,I am getting warning messages as

" FORM TOP_OF_PAGE not called directly

(check dynamic PERFORMs!!)

(The message can be hidden with "#EC CALLED) "

I want to eliminate this ...without giving #EC..

any help would be appreciate.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

you can create a PERFORM which will be never called, i.e.


IF 1 = 0. 
  PERFORM top_of_page. 
ENDIF.

Regards,

--

Przemysław

7 REPLIES 7

Former Member
0 Kudos

Hi,

you can create a PERFORM which will be never called, i.e.


IF 1 = 0. 
  PERFORM top_of_page. 
ENDIF.

Regards,

--

Przemysław

0 Kudos

IF 0 = 1.

PERFORM top_of_page.

PERFORM top_of_page_bdc.

ENDIF.

i

I am getting errror as " Statment not acessible"

kindly help

0 Kudos

So do something, which is not obvious to the system, i.e.


CLEAR sy-index.
IF sy-index EQ 1.
  PERFORM top_of_page.
ENDIF.

Regards,

--

Przemysław

0 Kudos

Thanks a lot..it solved the problem.

SImilar i have issues ..

In my code :

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield. "001- Ext Ck

CASE r_ucomm.

WHEN '&UPDATE'.

CLEAR ts_fieldcat_bdc.

REFRESH ts_fieldcat_bdc.

CALL SELECTION-SCREEN '1002' STARTING AT 40 40.

WHEN '&BACK' OR '&EXIT' OR '&CANC'.

LEAVE TO TRANSACTION 'ZCHR'.

WHEN OTHERS.

MESSAGE e005(zmesg) WITH text-023.

RAISE error.

ENDCASE.

Extended sytnax check error:

Field string RS_SELFIELD is not referenced statically in the program

The message can be hidden with "#EC *)

But if i comment it I am geting dump.

kindly help

0 Kudos

Hi,

Extended Check in unable to find dynamic calls - that is why you get all the messages.

It is sure, you can not comment it, because it is a part of the form interface.

You can ignore ExChk sugestions, or use this field in the same way,

which means never use.

Regards,

--

Przemysław

Former Member
0 Kudos

and by the way change

MOVE 'TOP-OF-PAGE' TO wa_events-form.

to

MOVE 'TOP_OF_PAGE' TO wa_events-form.

Regards,

--

Przemysław

Former Member
0 Kudos
...
*Dynamic Calls
  IF 1 = 0.
    PERFORM: pf_status_set USING gt_extab.
    PERFORM: user_command  USING sy-ucomm
                                 gs_selfield.
  ENDIF.
...

This removes the WARNING!!!