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

Compiling INCLUDE progam

Former Member
0 Likes
2,545

I am new to ABAP programming. When I compile an INCLUDE program, sometimes I get the following message:

"REPORT/PROGRAM Statement Missing, or program type is I (INCLUDE)".

But sometimes, when I compile it acts just like a normal program and gives either a regular compilation error or "The program is syntactically correct" message.

I am not able to understand, when do I get which one. Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,245

Hello Raju,

U should not compile Include program(type I). But you can compile with the combination of executable program(Type 1) at a time.

I hope you are cmpiling Include without the main program..thats the reason sometimes you are getting the other error. So try to execute with the main program.

Reward the helpful answers

Thanks

Eswar

14 REPLIES 14
Read only

Former Member
0 Likes
2,245

Hi,

If you are in an include always do CTRL + F7 which means checking the main program..

That way all the includes in the main program will be compiled..If there is no syntax errors then actiavate the programs (CTRL + F3)..

Thanks,

Naren

Read only

Former Member
0 Likes
2,246

Hello Raju,

U should not compile Include program(type I). But you can compile with the combination of executable program(Type 1) at a time.

I hope you are cmpiling Include without the main program..thats the reason sometimes you are getting the other error. So try to execute with the main program.

Reward the helpful answers

Thanks

Eswar

Read only

Former Member
0 Likes
2,245

Hi Raju,

Welcome to SDN.

The best is always go to main program to compile the include changes.

Regards,

Ferry Lianto

Read only

0 Likes
2,245

Many thanks for all the replies. May be I should have given this info also; did n't think it was necessary. The INCLUDEs that I am coding are part of a BW ODS object start routine. So, when I compile the start routine, (Which is the main program), if there is an error in one of the INCLUDEs, then it simply says ... "The include xxx not found". Also sometimes these INCLUDES can get really big. So, I would like to compile them individually for sytax check. And like I had mentioned, I was able to do it. I am wondering, if there is a setting, that I am missing,that will let me do this.

Read only

0 Likes
2,245

Hi Raju,

In Debugging you can clearly point out in which INCLUDE its giving error.

We can not compile the includes separately.

Regards,

Azaz.

Read only

0 Likes
2,245

I may sound stubborn. But (I swear!) I was able to do the compilations of INCLUDE programs indivudually, where it used to give messages like "program sytactically correct". And I am not able to do it today. I do not know what I am doing different this time.

Also, when I try to compile the INLCUDE, I get a message at the bottom saying "There is no main program for INCLUDE xxx".

Read only

0 Likes
2,245

I believe that if you hit the Check button (CtrlF2) you will get the 'Report is an Include' message. If you hit the activate button (CtrlF3) it will compile and activate with a 'Success' type message.

Read only

0 Likes
2,245

Activate simply says "Object(s) Activated". It does not give "Program Syntactically Correct".

Read only

0 Likes
2,245

You can always do a Syntax check on an INCLUDE Program. To quote SAP help, such a check does not normally ensure that statements of your include program fit logically into the source code of the programs from which it is called. For the syntax check to produce valid results, you must check the program in which the include occurs.

~Suresh

Read only

0 Likes
2,245

Hi Suresh,

You had mentioned, "You can always do a Syntax check on an INCLUDE Program. "

Can you please tell me, how do I do that?

I understand your point that, even if the INCLUDE is syntactically right, it may not be right logically.

Read only

Former Member
0 Likes
2,245
Read only

abdul_hakim
Active Contributor
0 Likes
2,245

Hi

You should not compile the include programs..

bcoz there are not complete by itself...

Cheers,

Abdul Hakim

Mark all useful answers...

Read only

0 Likes
2,245

Hi Raju,

If you are only trying to check the syntax of the include you could even check it with the Ctrl+F3

which would anyways check the sytax of the code and if it's is right it would activate the code.

Cheers

Read only

0 Likes
2,245

Iam not sure, if one or all of you are saying this. But here is what I had figured out. My main program is actually generated by BW, using the start routine. Sometimes, for some reason (which I need to investigate) that main program is disappearing. In these instances, when I try to compile the INCLUDE, I am egtting the warning that I was mentioned about. It gives me this warning, even if there are syntax errors. But when I compile the INCLUDE, with the this main program existing, I get either syntax errors or the message "program syntactically correct". So, it seems to boil down to whether this INLCUDE is part of a MAIN program or not. And I seem to be able to compile my INCLUDE individually, only when it's part of a main program.