Skip to Content
author's profile photo Former Member
Former Member

Syntax Check & Includes

I have a problem with a big report (around 8000 lines of code) which I segmented into several Includes for ease of finding the routines.

When I enter one of the Includes and start the syntax check I get the message

"Report-/Program-Anweisung fehlt, oder Programmtyp ist Include?"

Yes the program-type is Include but with other programs the syntax check inside

an Include works fine.

Another problem that occurs from time to time is the following:

when I'm inside one of the Include programs and double click on a subroutine the

system says "Object not found". But the routine surely exists. When I make syntax check of the Main Program (or better: the wrapping Segment) the cceck is ok and the program too is working ok.

But this problem does not occur all the time. Sometimes it works sometomes it does'nt.

Has someone an idea what I can do?

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Posted on Dec 08, 2003 at 08:47 PM

    I have seen similar problems in the past with large programs that are broken up by includes. I'm not sure what release you are on, but if you are on 46C or higher, you might want to look at structuring your logic in OO classes. I have grown to like using Global Classes for my application logic, even for screen and report programs. This is especially nice if you are working with Controls (Trees and ALV grids), since I think you have better visibility to the call back routines.

    There was an excellent session from the American SAP TechED this year (Session ABAP256) that might help you get started.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2004 at 08:12 PM

    Another good tip is: show the object list on left side of screen (view program from within SE80, or you can also get the object list from within SE38 using "Display Object List" button).

    When you have the object list, right click on the top-most program (the type 1 program) and do all your syntax checking and activation from that menu. This always activates and checks ALL components of the program for you.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2004 at 03:57 PM

    Hello Axel

    You have 2 options (I always use option 1):

    1) The first line of your main program is the REPORT statement. If you change this so the first line is an TOP include (like you have in module pools) and in this TOP include the first line is the REPORT statement - This solves the problem !

    2) In the editor you have a function "Check Main Program". In 40b you execute this function with ctrl66. In 46c you execute this function with ctrlF7.

    Best regards

    Thomas Madsen Nielsen

    Add comment
    10|10000 characters needed characters exceeded