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

Includes in global Class

Hi all,

I have a global class (created in SE24 - Class builder) and need to use constants and types in its methods, that are defined in an include.

In functional development we just put a "INCLUDE includename." in the function group top-include.

Where can I put that include in the global class?

I tried the "local types" source file, but it doesnt accept the constant definitions inside my include.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2005 at 11:03 AM

    Hi,

    Create a type pool with your types and constants and enter its name in the property screen of the class.

    Svetlin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2005 at 01:04 PM

    Hello,

    you can add an include to a class.

    Press button (Local) Types (CTRL+F5).

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 14, 2005 at 01:23 PM

    hi, Frank Besler

    If you want to add global (constant)value and type definantion, you can add them in the LXXXXTOP file, the XXXX is the function group name.

    if you don't want all of the defination added only one file, you can create a file, named LXXXXFYYY, XXXX is still function group, YYY is the random string you set.

    and add the 'include LXXXXFYYY' into the SAPLXXXX. (XXXX is still function group name). SAPLXXXX is the main program for the function group, you can find its name in the 'Attributes' tab 'Program name' fields in se37.

    click the SAPLXXXX, you can see a example like this:

    *******************************************************************
    *   System-defined Include-files.                                 *
    *******************************************************************
      INCLUDE LATSVTOP.      " Global Data
      INCLUDE LATSVUXX.      " Function Modules
    
    *******************************************************************
    *   User-defined Include-files (if necessary).                    *
    *******************************************************************
    * INCLUDE LATSVF...      " Subprograms
    * INCLUDE LATSVO...      " PBO-Modules
    * INCLUDE LATSVI...      " PAI-Modules
    
    * add your include file here
    include LATSVF01.
    

    Please aware the your include file name can't be set random, you must follow the rule, otherwise the compile will failed.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.