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.
SAP Versions used in the illustration:
- SAP S4 HANA Fashion 1709
- SAP PO 7.5
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.
Before you can start building Proxy interfaces, you need to make sure Proxy connectivity between the SAP back-end system and SAP PI/PO is established.
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.
We will enhance below Data Type “FlightBookingOrderConfirmation” which is the underline data structure of the Service Interface (Proxy Interface) “FlightBookingOrderConfirmation_Out”.
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”.
Add the additional data fields as required. As per this example, we are adding a new data structure with one string field called “Notes”.
Save and activate.
Step 2: Import Data Type Enhancement Created in ESR to SAP using Transaction SPROXY.
Go to transaction SPROXY and click create new object.
Select the object type as “Data Type Enhancement”.
Select the source of the object. We are importing the Data Type Enhancement from ESR.
Navigate through the Software Component hierarchy to select the object.
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.
Step 4: Execute Proxy Service Interface.
Check out my post on Proxy Outbound Interface configuration, for step by step Proxy Generation example. You can also read how to configure Proxy connection between SAP back-end system and SAP PI/PO here.
If you have any questions about Data Type Enhancement steps, please leave a comment below.
Hi …We are using external definition to use for our structure so in this case data type enhancements can not work right if not what is the best approach to add the additional fields to standard SAP structure ….,
In external definition XSD structure
Hi Simha,
Are you trying to enhance a SAP standard proxy structure?
Cheers!
Great article. is it possible to extend datatype with a table type wihout using ESR?
Hi Adel,
Extension should take place from ESR.
Cheers!
Great article. is it possible to enhance a data type with a table type in the backend , so without using ESR?
Hi Fernando,
I can see that you have created the DTE in the standard SWCV. what if there is an upgrade to the SWCV and it has to be replaced by a new version. wont the DTE be erased/Deleted in this case.
Hello Vinod,
Create your Data Type Enhancement in a custom SWCV. Then you can add fields to the structure without modifying the standard content.
Cheers!
Isuru
Hi Isuru,
If we have to create Data Type Enhancement in a custom SWCV, then do we need to import the standard SWCV into our custom SWCV under “basis objects”?. If yes, then could you please tell me how to import standard SWCV in to our custom one.
Correct, you need to import the standard SWCV to your custom SWCV as a dependent SWCV. Then you can extend the necessary objects/
Hi Isuru Fernando,
How do I modify my standard mapping program?
For e.g., if I am working of SF integration using SOAP Axis Adapter, I need to add few fields in standard content… Is it possible? How do I do it?
Regards,
Rashmi
Hello Rashmi,
Create your Data Type Enhancement in a custom SWCV. Then you can add fields to the structure without modifying the standard content.
Cheers!
Isuru
How can I change the ABAP type of the already existing proxy generated data element
From example from CHAR40 to CHAR120
Hello Anusha,
Is the data element a part of a standard proxy structure?
Cheers!
Isuru
Hi
Hi Isuru Fernando,
We have enhanced the standard data type in PI and used the same in back ends from ERS.
After that we could see new custom fields in both the systems ans also in both inbound and outbound proxies.
But from inbound proxy the custom field values not appearing in inbound interface howver in payload I could see the custom fields with values. .. please provide your suggestions, thanks in advance.
ECC:(Outbound)–> PurchaseOrderERPRequest_Out_V1
SRM:(inbound)PurchaseOrderERPRequest_In_V1
Best regards:
Anil
Hi Isuru, love this site you’ve got here. Thank you for sharing your expertise with us.
I have a question. What if after creating and using the enhanced data type, standard SAP now (after several years) comes with the same field in the later releases? Now, we wish to “remove” or “deactivate” this enhanced data type; how can we achieve that?
nope, different namespace
Hi Isuru, very good article,
One question, I have a problem when activate the Data Type Enhacemente in SPROXY show a message like this,
Structure ZXX_DT_ENH_NAME1 activated with errors for dependend object (Details->DDIC log) , but I can see nothig wrong. Do you have any idea ?
hi, how do you make the attrbiutes visible in the enterprise service builder to be able to map them? I can’t see the extended attributes.
Hi Isuru,
Thanks for the valuable document. I just want to know how to test this interface after enhancement?
Could you please explain it?
Thanks,
Praveen Kumar.
Hi Isuru,
I am very new for this concept of data type ehncement and your blog is very help ful.
One small question in ESR when we need to do data type enhancement . I see option of create MDR proxy should I select this create option and proceed for data type enhancement.
I appreciate your support on this.
Thanks,
Neha.
Hi Ishuru,
I have tried to edit the standard SAPAPPL/Global2 and used the enhance data type is it correct to edit the Standard package.
When i have made the Copy of this package and kept it in the new software component.
Please suggest
Thank you,
regards
anonymous
Hi Isuru,
I am trying to assign the original datatype object to the datatype enhancement object but it is giving me a message saying “Object to be assigned does not fulfill the permitted conditions”. Can you please suggest what I can do in this case?
Thank you,
Vishwa
Hi Isuru,
I am trying to assign the original datatype object to the datatype enhancement object but it is giving me a message saying “Object to be assigned does not fulfill the permitted conditions”. Can you please suggest what I can do in this case?
Thank you,
Vishwa