Skip to Content

SE80 sometimes checks an include, sometimes not. Why?

Ì usually use lots of includes in my programs. Now sometimes, when I press the syntax check button in SE80 while editing an include, the check runs automatically for the master program.

But in some cases (depends on the program I am working with), I get the error "REPORT/PROGRAM statement missing, or program type is INCLUDE."

To be clear:
Program A consists of 20 includes. When I edit one of those includes and press "Check", a syntax check is performed correctly for the main program.

Program B consists also of 20 includes. When I try the same thing, I get "REPORT/PROGRAM statement missing, or program type is INCLUDE."

Is there anything I can do? For prog B, this is very annoying

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 18 at 11:42 AM

    I have get used to press Ctrl + F7 (Check Master program) instead of Ctrl + F2.

    Add comment
    10|10000 characters needed characters exceeded

    • " But I have the CTRL+F2 "in my blood" "

      Well Said :-).

      Jacques,

      CTRL+F7 - That's a news to me.

      Seems lot many short cuts and options I am still not aware of.Thanks for sharing.

      K.Kiran.

  • Jan 18 at 12:16 PM

    I can duplicate something of the same when you Create a new Report with a TOP-Include, but in the TOP-Include, you Move the "REPORT"-Statement to the Main Program ...

    In this way : your MAIN program will be something like this :

    *&---------------------------------------------------------------------*
    *& Include ZTMP_PRGR_CHECKINCLUDE3TOP                        Report ZTMP_PRGR_CHECKINCLUDE3
    *&
    *&---------------------------------------------------------------------*
    *REPORT ZTMP_PRGR_CHECKINCLUDE3. "Remove or Comment this Statement
    

    Your TOP-Include will be something like this ...

    *&---------------------------------------------------------------------*
    *& Report  ZTMP_PRGR_CHECKINCLUDE3
    *&
    *&---------------------------------------------------------------------*
    *& Created Report with TOP Include, REMOVED the REPORT-Statement
    *& from TOP and put it in the MAIN program => Run SyntaxCheck
    *&---------------------------------------------------------------------*
    REPORT ztmp_prgr_checkinclude3. "Copied over from TOP-include
    INCLUDE ztmp_prgr_checkinclude3top              .    " global Data
    * INCLUDE ZTMP_PRGR_CHECKINCLUDE3O01              .  " PBO-Modules
    * INCLUDE ZTMP_PRGR_CHECKINCLUDE3I01              .  " PAI-Modules
    * INCLUDE ZTMP_PRGR_CHECKINCLUDE3F01              .  " FORM-Routines
    

    When in this TOP-Include, the Regular SyntaxCheck with throw the Error, the Check on the Master Program won't ...

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 18 at 11:48 AM

    I'd say, you need a top include. The compiler incorporates a top include into the syntax check for an individual include program. This enables meaningful syntax checks to be made on individual include programs.

    Add comment
    10|10000 characters needed characters exceeded

    • Indeed - program B has been copied from a template that was already split into includes, whilst A has been copied from a program without includes and has later been split. I rely on SAP development that this will be resolved in some future release...

  • Jan 19 at 06:50 AM

    Thanks to Kiran K I now understand how this happens: When a program is being created with includes from scratch, CTRL+F2 will work in the includes, when not, you have to use CTRL+F7.

    Add comment
    10|10000 characters needed characters exceeded