Data Type Enhancements for ABAP Proxy Interfaces

Data Type Enhancements in SAP Process Integration (PI)/Process Orchestration (PO) facilitates modification of input/output data structures of a standard Service Interface or Proxies Interfaces provided with SAP standard applications. Although you can use Data Type Enhancements to append structures to input or output structures of any ABAP proxy (Standard or custom), standard use of the Data Type Enhancements are to add additional data fields to SAP standard ABAP Proxy Interfaces.

 

Data Type Enhancements Scenario:

Lets assume a scenario where you have a Proxy outbound scenario where you send airline booking information to PI/PO middleware after booking is created in SAP. This Service Interface to send booking information is already provided by SAP, but what if you need to send additional information in the same message? For example a string field with additional notes about the booking.

Editing a standerd SAP object is not allowed in most cases but even if it is allowed, it is not the industry standard best practice. SAP has provided Modification Frameworks or tools to modify standard ABAP objects such as BADIs, DDIC append structures, User Exists etc. Similarly, if you have a requirement to add additional fields to a SAP standard ABAP Proxy Interface’s input or output, you can make use of Data Type Enhancements.

 

Data Type Enhancements Example:

With SAP standard content we have received the Service Interface “FlightBookingOrderConfirmation_Out” and a corresponding ABAP Proxy Interface.

Lets add an additional string field called “Notes” to this Proxy Interface.

service-interface-original-data-type-enhancement-pi-po
Original Service Interface in PI/PO

 

consumer-view-abap-sproxy-data-type-enhancement-pi-po
Service Consumer (ABAP Proxy Interface) view in SPROXY

 

We will enhance below Data Type “FlightBookingOrderConfirmation” which is the underline data structure of the Service Interface (Proxy Interface) “FlightBookingOrderConfirmation_Out”.

message-type-original-data-type-enhancement-pi-po
Original Message Type Structure

 

Step by Steps Guide on How to Create Data Type Enhancements

 

Step 1: Create Data Type Enhancement Object in Enterprise Resource Repository (ESR).

Set the name of the Data Type Enhancement.

Then, assign the name of the standard Data Type you would like to modify. In this example we are adding a additional fields to previously identified Data Type “FlightBookingOrderConfirmation”.

create-new-data-type-enhancement-pi-po
Create new Data Type Enhancement and assign Original Data Type

 

Add the additional data fields as required. As per this example, we are adding a new data structure with one string field called “Notes”.

configure-data-type-enhancement-pi-po
Configure the structure of the Data Type Enhancement

Save and activate.

 

additional-fields-added-data-type-enhancement-pi-po
Message Type with additional fields from Data Type Enhancement

 

Step 2: Import Data Type Enhancement Created in ESR to SAP using Transaction SPROXY.

Go to transaction SPROXY and click create new object.

data-type-enhancement-create-sproxy-ABAP-pi-po
Create new Data Type Enhancement object in SPROXY

 

Select the object type as “Data Type Enhancement”.

select-data-type-enhancement-sproxy-pi-po
Select object type Data Type Enhancement

 

Select the source of the object. We are importing the Data Type Enhancement from ESR.

source-esr-sproxy-import-data-type-enhancement-pi-po
Select source as ESR in SPROXY transaction

 

Navigate through the Software Component hierarchy to select the object.

select-data-type-enhancement-sproxy-pi-po
select created Data Type Enhancement from tree view

 

Click continue and provide package detail, transport detail in the next screen.

Note that you cannot import Data Type Enhancements created under standard sap namespaces such as “sap.com”.

 

Step 3: Verify if Proxy Class Data Structures are Changed as Expected.

Go to the Service Consumer and verify if the additional fields included by the Data Type Enhancement are available in the parameters.

proxy-data-type-enhancement-pi-po
Additional fields included to the Service Proxy object by Data Type Enhancement

 

Step 4: Execute Proxy Service Interface.

test-proxy-interface-sproxy-pi-po
Test proxy Interface and include values to additional fields added by Data Type Enhancement

Check out my post on Proxy Outbound Interface configuration, for step by step Proxy Generation example.

If you have any questions about Data Type Enhancement steps, please leave a comment below.

Add a Comment

Your email address will not be published. Required fields are marked *