Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, August 6, 2008

Data Type Enhancements Developing Message Interfaces

Use

SAP applications enable 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, if customers use applications that exchange messages by using XI, they can define data type enhancements for Integration Repository data types. Customers can use these enhancements to send additional data with a message and can access this data by using BAdIs, 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.

See also: Defining Additional Software Dependencies

The Integration 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 Integration Builder again. You will not lose objects that have already been created.

Features

You can make the following enhancements to a data type:

· 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.

Activities

...

1. Create a data type enhancement.

2. Assign a data type from a subordinate software component version to the data type enhancement. These data types are shown in the navigation tree of your software component version, in the Basis Objects branch.

3. The Integration 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 restrictions described above. 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.

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.

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

Using Data Type Enhancements in Java

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

...

1. Navigate to your customer-specific software component version in the Integration Builder.

2. In Basis Objects, select the message interface that references the data type enhancement. You can generate proxies for this message interface in the usual manner. Data type enhancements of the same and subordinate software component versions are recognized.

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 message 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.

No comments:

Archives