Show TOC

Procedure documentationEnhancing Data Types (CCTS/Freely-Modeled) Locate this document in the navigation structure

 

If necessary, SAP applications can allow customers to enhance application source code without making modifications and thus meet customer-specific requirements that are not provided for in the standard shipment. The applications can use Business Add-Ins (BAdIs) for this purpose. Furthermore, customers can define data type enhancements for data types for the classification freely-modeled data type or aggregated data type in the ES Repository. If the service interfaces developed there are to be used for exchanging messages, customers can use these enhancements to transfer additional data with a message, which they can then access by using a BAdI, for example.

Prerequisites

Customers or partners have to create data type enhancements in a separate software component version and a separate namespace. This software component version must be based on the SAP software component version in which the data type to be enhanced is defined.

More information: Defining Additional Software Dependencies.

Note Note

The ES Builder does not recognize changes to software component versions that have already been imported. Therefore, if you want to define dependencies between imported software component versions at a later date, you have to import the superordinate software component versions into the ES Builder again. You will not lose objects that have already been created.

End of the note.

Procedure

  1. Create a data type enhancement.

  2. Assign the data type enhancement a data type of classification freely-modeled data type or aggregated data type from an underlying software component version. These data types are shown in the navigation tree of your software component version, in the Basis Objects branch.

  3. The ES Builder automatically enters the namespace of your data type enhancement in the XML Namespace field. You can enter a different XML namespace in this field if you want. The XML namespace avoids naming conflicts between customer fields and fields that are added later by SAP.

  4. Enter the fields and attributes that you want to add at the top level on the Enhancement Definition tab page. The functions that are available in the XSD editor are also available here, but with the following restrictions:

    • You can add elements and structures at the top hierarchy level as subelements of the root element.

    • You can define attributes for the root element or its inserted elements.

    • You can create elements and attributes at the top hierarchy level as optional fields only. You can create all other elements and attributes as often as you like.

    • You can define your own facets for newly inserted elements or attributes in the Details column. This is not possible for SAP data type fields.

      Note Note

      The same restrictions apply for data type enhancements of aggregated data types as for aggregated data types themselves; therefore, you can only reference core data types and other aggregated data types.

      End of the note.

    You can look at the XSD representation on the XSD Definition tab page.

Result

The enhanced data type is displayed on the Enhanced Data Type tab page.

More Information

Using Data Type Enhancements in ABAP

To use a data type enhancement, you must use ABAP proxy generation to create proxy objects for the data type enhancement in the application system. (Make sure you use the customer-specific software component version.) ABAP proxy generation maps data type enhancements to APPEND structures in the ABAP Dictionary.

Note Note

ABAP proxy generation does not create any generic BAdIs in the application system for accessing the APPEND structures.

End of the note.
Using Data Type Enhancements in Java

There is no enhancement concept in Java. Nevertheless, you can regenerate proxies for service interfaces that reference data type enhancements.

The generation function recognizes the elements and attributes of the enhancement, but does not handle them separately. The generated objects do not contain any information about which classes or attributes originate from the data type enhancement. There are, therefore, no separate Java objects for enhancements.

Java proxy generation can only generate proxy objects from service interfaces. If more than one data type enhancement exists for a data type, the generation function simply creates proxy objects for all data type enhancements.

Java proxy generation is part of the SAP NetWeaver Developer Studio.