Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ashwincap
Explorer
22,361

Introduction.


MDG controls the Master data management and it is complete only when the master data is replicated successfully to its receiving ERPs (SAP or Non SAP). Today, most of the data replication is happening via Service Interfaces (Web services). It is very common that we have customized structures and attributes to be distributed to the ERPs.

To accommodate custom attributes, we need to enhance the service Interface. To achieve this type of enhancement, usually we have PI as a middleware, which is easier. This is known as enhancement using Enterprise Service Repository.

In this blog post, I will share the solution I have come up with, when PI is not available as a middleware and system integration is achieved via Point to Point connection using SOAMAMGER technology. SAP provides a second option as enhancement using Backend Metadata repository.

Pre-requisite.


Experienced in ABAP and knowledge of T codes SPROXY, SRT_MONI. Knowledge of webservices is helpful. One should have good understanding of the end to end process flow (from source to the receiving ERP system) and XML structures.

Technical Solutions.


Source system: MDG

Target system: ERP, ECC

Integration technology: SOAMANGER point-to-point connection

Service Enhancement technique: Backend Metadata repository

Here we are trying to enhance standard Interface with additional custom attributes so that the custom data can be replicated to ERP. Steps performed in the source should be repeated in corresponding target ERP as well. The data type name should be same everywhere.

I will describe it as a 2-phase process.

Phase 1: Enhance the Interface in the source system and add the structures or attributes and complete the mapping.

Step 1: Go to Tcode: /nSPXNGENAPPL

Here we create an entry for the Namespace in which the enhancements will be created and

Assign it to Metadata Repository (MDR).

Usually the name space format is:

http://CompanyName/Xi/ReleventName

 

Entry is not saved in TR.

We need to capture or manually make an entry in other Environments


Step 2: Find the service to be enhanced.

Go to T code: SPROXY or you can also switch to ESR from SE80

Let us take an example of Business partner webservice to be enhanced at General level.

In the MDG system, Interface name is: BusinessPartnerSUITEBulkReplicateRequest_Out

In the ERP system, Interface name is: BusinessPartnerSUITEBulkReplicateRequest_In

Step 3: Find the Node which needs to be enhanced.

Again let's take “Common” node, as an example, to be enhanced with additional attributes or table type


Double click on Table type name and go to PROXY Editor


Click on Create Enhancement for create Data Type Structure


Choose Enhancement name and Name Space as per the Naming convention of the Organization. A wizard will appear that helps to complete the Data type enhancements.


Click on Continue.

Maintain Package and

Prefix name is for Internal Attribute name.


Click on Continue and save the changes in Transport Request.

Then Go to External View. Here we can add attributes to the structure enhancement.

Right Click and

Add Element: YAttribute_name or

Add Attribute: YAttribite_name2

You can also control the properties of the attribute as per your choice.

After save and Activate the structure and attributes will appear as below

 


 

Phase 1.1: Complete the data mapping for the customized attributes. This will help in replicating the values of the custom attributes in the XML message.

 

Step 1. Go to BADI: MDG_SE_BP_BULK_REPLRQ_OUT

Create Badi Implementation and complete the mapping for the attributes.

Here the data from the IN structure can be standard attribute or already enhanced custom attribute.


Step 2. After replication the Custom attribute appears in the XML message like below and can be checked in Tcode SRT_MONI

This can be visible in both Outbound System and Recieving System.


Phase 2: Enhance the Interface and add the structures or attributes in the target system

Interface: BusinessPartnerSUITEBulkReplicateRequest_In

Follow the same steps as described in Phase 1 above. The enhancement name and structure and attribute names should be exactly same as in the source system.

This will ensure that the values from XML are mapped properly in the Inbound structures of the BADI in the target system.

 

Phase 2.1: Go to BADI: MDG_SE_BP_BULK_REPLRQ_IN

Create Badi Implementation and complete the mapping for the attributes.

Here in the IN structure, you can find the custom attributes enhanced.

There is an additional X- Structure used for update. It should also be enhanced and mapping should be completed for both structures.

    1. The custom attribute be part of either Standard table or Custom defined table.

 

    1. If Custom attribute is part of Standard table like BUT000 or LFA1, then simply completing mapping will save values in the standard enhanced table with custom attribute.

 

    1. If Custom attribute is part of custom table like Y_table, then the saving logic needs to be called using a custom Function Module.



 

Conclusion


We have successfully enhanced the web service with custom attributes and complete the data replication from source to target system. This solution for the Webservice enhancement explained in this blog post has many advantages.

We can achieve the enhancement without dependency on any middleware, especially in case of Point-to-point connectivity. It's even easier and quicker.

The Backend system has the full flexibility and control of structure enhancements and properties.

In case of system upgrade, the enhancements can be adjusted as part of normal adjustments process.

If you have any questions, feel free to ask on our SAP Community, which is the official channel for consulting inquiries. 

I hope this blog post was helpful for you. If so, click on "like" or "share". I'm looking forward to your feedback and thoughts or clarification questions you may have in the comment section below. 


Helpful links: 

Visit your community topic page for SAP S/4HANA ***



 

8 Comments
shashankkasar
Participant
0 Kudos
Hi Ashwini,

Great post!

The SOA Service enhancement well explained.

Thank you.
rishabh_pandey2
Explorer
0 Kudos

Nice Post...

 

Thanks for sharing.

former_member233553
Active Participant
0 Kudos
Hi Ashwin,

 

I have extended Chart of Account proxy with custom attribute sub account type. But this attribute is standard field of SKA1 table. The data is not coming inside inbound BADI in runtime.

But Field data is populated in inbound XML message.

We are using core deployment of MDG. Not using any PI. Also I have mapped my custom namespace.

 

Please share your idea.
Erdal_Şimşek
Participant
0 Kudos
Hi Ashwin,

Nice blog. I want to use this scenario for material and I'm using SOAP webservice.

In the MDG system, Interface name is: ProductMDMBulkReplicateRequest_In.

Do you know which BADI is avaliable.?

 

Thank you,

 

Erdal
Mayank1
Newcomer
0 Kudos
Hi Ashwin,

Nice Article.

 

can anyone confirm:

After Standard Service Enhancement, does any object fall under Repair task?

 

Regards,

Mayank
athegde
Discoverer
0 Kudos
Hi,

Is it possible to receive standard structure data from source system into custom structure (the name remains same in both the systems) in the target system? I have a case where SAP MDG system is in higher release which provides more data than the receiver system which is SAP ERP system.

 

Regards,

Athreya
poonam_chawla
Explorer
0 Kudos
Hi Kumar & Ashwin,

I have similar requirement for cost center custom attribute replication and the inbound structure is not populated with the data.

Please share your inputs.
EAhammed
Discoverer
0 Kudos

I have extended for Product inbound service and what I observed, data needs to be passed from third party system in below pattern

EAhammed_0-1712218849813.png

Custom name space needs to be passed with the name space definition. 

#Productwebservice #WebserviceextensionProduct #ProductProxyStructure

Labels in this area