Skip to Content

SE80 sometimes checks an include, sometimes not. Why?

Jan 18 at 11:15 AM


avatar image

Ì 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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Jörg Krause 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.

10 |10000 characters needed characters left characters exceeded
Jacques Nomssi Jan 18 at 11:42 AM

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Of course this works fine. But I have the CTRL+F2 "in my blood" and I am wondering why this works in prog A and not in prog B


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

Well Said :-).


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

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


Nic Teunckens 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 ...

*& 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 ...

10 |10000 characters needed characters left characters exceeded
Horst Keller
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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Here are the two examples. In each program, for testing, I do the following:

- double click the first include

- press CTRL+F2

In program A I get an error:

*& Report  ZDV03_DEMO_DYNPRO
report  zp_pp48_label_maintain message-id zm_pp48.

include zp_pp48_label_maintain_mac.

include zp_pp48_label_maintain_if01. "lif_report

include zp_pp48_label_maintain_cd01. "lcl_model
include zp_pp48_label_maintain_cd02. "lcl_main
include zp_pp48_label_maintain_cd04. "lcl_alv
include zp_pp48_label_maintain_cd03. "lcl_alv_labels
include zp_pp48_label_maintain_cd05. "lcl_stralv
include zp_pp48_label_maintain_cd06. "lcl_stralv_label
include zp_pp48_label_maintain_cd07. "lcl_alv_fields
include zp_pp48_label_maintain_cd08. "lcl_alv_values
include zp_pp48_label_maintain_cd09. "lcl_dp_materials

include zp_pp48_label_maintain_top.

include zpp_pp48_label_maintain_ci01. "lcl_model
include zpp_pp48_label_maintain_ci02. "lcl_main
include zpp_pp48_label_maintain_ci03. "lcl_alv_labels
include zpp_pp48_label_maintain_ci04. "lcl_alv
include zpp_pp48_label_maintain_ci05. "lcl_stralv
include zpp_pp48_label_maintain_ci06. "lcl_stralv_label
include zpp_pp48_label_maintain_ci07. "lcl_alv_fields
include zpp_pp48_label_maintain_ci08. "lcl_alv_values
include zpp_pp48_label_maintain_ci09. "lcl_dp_materials

include zpp_pp48_label_maintain_m01.

In program B it works:

report  zp_cs01_confirm.

include zp_cs01_confirm_mac.

include zp_cs01_confirm_types.

class lcl_con_selscr_1000 definition deferred.
include zp_cs01_confirm_cd01.  " lcl_model
include zp_cs01_confirm_cd02.  " lcl_con_main
include zp_cs01_confirm_cd03.  " lcl_con_selscr_1000
include zp_cs01_confirm_cd04.  " lcl_con_dyndoc
include zp_cs01_confirm_cd05.  " lcl_con_stralv
include zp_cs01_confirm_cd06.  " lcl_con_stralv_h1
include zp_cs01_confirm_cd07.  " lcl_con_toolbar
include zp_cs01_confirm_cd08.  " lcl_con_alv
include zp_cs01_confirm_cd09.  " lcl_con_opers
include zp_cs01_confirm_cd10.  " lcl_con_time_conf
include zp_cs01_confirm_cd11.  " lcl_con_time_conf_exist

include zp_cs01_confirm_data.

include zp_cs01_confirm_evt.

include zp_cs01_confirm_ci01.  " lcl_model
include zp_cs01_confirm_ci02.  " lcl_con_main
include zp_cs01_confirm_ci03.  " lcl_con_selscr_1000
include zp_cs01_confirm_ci04.  " lcl_con_dyndoc
include zp_cs01_confirm_ci05.  " lcl_con_stralv
include zp_cs01_confirm_ci06.  " lcl_con_stralv_h1
include zp_cs01_confirm_ci07.  " lcl_con_toolbar
include zp_cs01_confirm_ci08.  " lcl_con_alv
include zp_cs01_confirm_ci09.  " lcl_con_opers
include zp_cs01_confirm_ci10.  " lcl_con_time_conf
include zp_cs01_confirm_ci11.  " lcl_con_time_conf_exist

include zp_cs01_confirm_mod.   " modules

I do non see a structural difference... strange



May be the second program when created initially structured in the same program (without includes ) and then over a period of time shifted to INCLUDES.Could be a reason ?



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