Show TOC

 Creating StructuresLocate this document in the navigation structure

  1. Open the Repository Browser and navigate to the package in which you want to create the new structure.
  2. In the context menu of the package, choose Create → Dictionary Object → Structure.

    A dialog box appears.

  3. In the new dialog box, enter the name of the structure and choose  with the quick info text Continue.

    The maintenance screen for structures appears.

  4. Enter an explanatory short text in the Short text field.

    You can find the structure at a later time using this short text, for example.

Perform the following steps for all the components you want to insert in the structure.

You can also include structures, tables or views instead of individual components. This procedure is described in Inserting an Include .

  1. On the Components tab page, enter a name in the Components column.

    If you want to insert the structure as an include in a transparent table at a later time, the component names must not be longer than 16 characters.

  2. Specify the attributes of the component. To do this, perform one of the following:
    • If you want to add components by entering the data type and length directly, choose Predefined type. You can now enter values for fields Data Type, Length, Decimal Pl., and Short description.

      If you have defined a data type with a decimal floating point in field Data Type, you must specify the output style. To do this, double-click on the appropriate field on the Data Type column. In the new dialog box, select one of the possible output styles.

      For more information, see Output Styles .

    • In the Typing column, you can select between the following options:
      • Type - Refers to elementary types which are types of fixed or variable length that are neither structured, nor a table type or a reference type. The predefined ABAP types are elementary.
      • Type Ref To - If the type defined in the ABAP Dictionary or the predefined type is a reference type, choose this option. For more information, see Reference Type .
      • Type … Boxed - Components of a structure or a class which are not stored at the place where they are defined, but are managed by an internal reference. Component of a structure or a class which is not stored at the place of definition but is instead deep, that is, it is administrated by an internal reference. Boxed components support initial value sharing and are therefore dynamic data objects. They are declared with the BOXED addition when defining substructures using TYPES or when declaring structured attributes of classes or interfaces using DATA. For more information, see the ABAP Keyword Documentation under TYPES - BOXED.
    • In the Component type field, enter the name of the type whose attributes must be used in the component. You can enter any type (data element, structure or table type) here. You can enter a reference type in the Component Type field. If you enter a class, interface, or generic reference (OBJECT or DATA) in the Component Type field, the Typing field is automatically set to TYPE REF TO. If you enter ANY, the Typing field is set to Type. If you enter a reference type already defined in the dictionary as a reference type, a blue arrow appears in the Data Type column.

      You can combine components with direct type definition and components that are defined by referencing an existing type as you like.

  3. On the Currency/quantity fields tab page, you must specify the reference field and reference table for components of type CURR (currency) and QUAN (quantity).
  4. Maintain the foreign keys of the structure.

    Proceed as when maintaining the foreign keys of a table (see Creating Foreign Keys ).

  5. Choose Search Help if you want to assign a search help to a structure field that points to a data element. Enter the name of a search help in the dialog box that appears. See Attaching a Search Help to a Table or Structure Field .
  6. Once you have defined all the components of the structure, choose  with the quick info text Save.

    You are asked to assign the structure to a package. You can change the package later by choosing Goto → Object directory entry.

  7. Choose an enhancement category. For more information, see Structure Enhancements .
  8. Choose  with the quick info text Activate.

The structure is now activated. The runtime object of the structure is created. The system writes a log at activation. It can be displayed with Utilities → Activation log. If errors occur when you activate the structure, the system displays automatically the activation log.

Additional Options

  • Recording documentation:

    You can create information about using the structure by choosing Goto → Documentation. This documentation is also output when the structure is printed.

  • Specifying the activation type:

    The activation type defines whether the structure can be activated directly from the ABAP Dictionary, or whether the runtime object of the structure must be generated first with a C program. You must define an activation type for structures of the runtime environment. You can define the activation type by choosing Extras Activation type.