SAP Master Data Governance, SAP ERP

Enhance Standard Service Interface (Webservice) without PI

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 Enhacement 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.
  2. 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.
  3. If Custom attribute is part of custom table like Y_table, then the saving logic needs to be called using a custom Function Module.
Rating: 0 / 5 (0 votes)

Leave a Reply

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