Skip to Content

Sometimes during my work as SAP integration consultant I did the following question. Why create a mapping when you use the same source and target messages and you don’t need to make mapping conversions?

In some occasions our sceneries have the same messages in the target and source sides, these messages are mapped so that each node of a message is mapped to the same node of the equivalent message, and we don’t need any conversion. The source and target messages are identical.

In SAP PI the traditional way of making thinks sais that you need to create a target and source message, make a message mapping between both, create an inbound and outbound interfaces associated with the corresponding messages, create an interface mapping, etc. And I think, it’s really necessary to create mappings when it doesn’t add anything to the scenario?

So I tried to create a scenario without mappings.  In advance it sounds as not possible if I think in the normal approach of scenario construction. But in practice it’s possible and it offers better performance, because we are saving a step in the normal flow of execution.

(The mapping tool generates Java source code from the graphical mapping description, which is then compiled and packed in a JAR file that the Integration Engine executes at runtime. )

I’ve found  paragraph in help.sap that support this approach:

Mapping is an essential part of SAP Exchange Infrastructure. At design time mappings can be saved in the Integration Repository and then selected for a business process at configuration time (see:Defining Interface Determinations). The Integration Engine executes the mappings saved in the Integration Directory at runtime, following receiver identification. If no mapping is required for a connection then the IntegrationEngine skips the mapping step.

(http://help.sap.com/saphelp_nw04/helpdata/en/d9/cea942ad920c31e10000000a1550b0/frameset.htm)

The escenario that I made as example is the next:

In the traditional approach

/wp-content/uploads/2013/06/traditional_approach_227167.jpg

In the test

/wp-content/uploads/2013/06/new_approach_227237.jpg

The same interface acts as Inbound and outbound. I define it as inbound because the logic of this scenary. ( You need to define it as inbound or outbound depending on the ABAP proxy you need, in this scenario I need an Inbound ABAP proxy )

An external system launches a request, and it’s executed in SAP ECC, the ABAP Proxy calls an RFC who extracts certain information and return the response to the external system.

My scenary.

In the Integration Repository. I create two data types and to messages based on the DT, called MT_Request and MT_Response and only one interface with the attributes as inbound and synchronous.I don’t create any Mapping Objects.

In the Integration Directory. I create an scenario, with a business system (SAP System)  and a business service (external system) asociated.

Asociated to the business service I made a SOAP Sender Communication channel. I inform in it as asociated interface the unique interface that i’ve defined in the scenario. (This interface is defined as inbound but acts as inbound and outbound ) .

In the configuration objects:

Sender and receiver agreement are configured as a normal scenario.

In the Receiver Determination I leave the Interface Mapping box empty.

recDetermination.jpg

The same in the Interface Detemination

ifDetermination.jpg

After configuring the scenario I generate the corresponding wsdl that I will use to call the interface as Web Service. I select Tools > Define Web Service, and I inform the unique interface defined in my scenario.

defineWS.jpg

Now I’m going to create the ABAP proxy. I go to sproxy, select the interface, and Create proxy.

/wp-content/uploads/2013/06/proxy_227252.jpg

Now I use the wsdl to generate a proyect in SOAP UI, and I test the scenary.  In works fine!!

/wp-content/uploads/2013/06/ok_227253.jpg

Now I want to analyce the advantages of this scenario in comparison with the traditional one.  From my point of view the advantages are:

 

  • You don’t need create mapping objetct. You only need one data type, one message and one interface.  You don’t need replicate this objects (this scenary makes sense only when the target and source messages are identical, and you don’t need to make any conversión in SAP PI).
  • And the most important, the performance of this scenary is better. It has sense because it’s been avoided mapping steps that aren’t necesary.

The performance improvement is better the larger the message is. For example for messages larger than 4 Mb the traditional scenario takes over 40% more time than the no mapping scenario.

I made this example in PI 7.0 and PI 7.3 (java only) and in both it works fine.

At the end I apologice for my homespun english. I hope this example may be userfull.

Cheers.

Fernando Vignolo.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Samiullah Qureshi

    You are right Fernando. I always use this approach when my outbound and inbound interfaces are using same message type/external message then I don’t create any mapping.

    It will help PI skipping mapping step during pipeline processing. Hence, performance will be enhanced somewhat. 🙂

    (0) 
  2. Jörg Thiesmann

    This is “Fat client” approach vs. “Fat server” approach. You move performance requirements to another machine.

    By the way, you can also build interfaces without using Service Interfaces. That should increase performance even more, but it can give you a hard time to justify why you use PI for that at all.

    (0) 
    1. Fernando Vignolo Pena Post author

      I think you don’t understand the idea. I don’t suggest to make mapping actions before or afther the PI processing.In this aproach I don’t move performance requirements I remove unnecesary steps. The mapping is not performend in the source or target, simply it doesn’t apply. 

      It’s important to understand that sometimes the mapping is necesary but in some ocasions it doesn’t provides anythink. At least I found some scenarios with this characteristics.

      (0) 
      1. Jörg Thiesmann

        In my experience most of the systems have different data structure. So this structure needs to be mapped somewhere. If you don’t do this in PI then you need to do it on some client.

        I have also seen implementations where they had just 1:1-mappings in PI. In these cases your blog is helpful to remove this redundancies. I was already one step ahead, sorry.

        (0) 
  3. bhanurajesh kukkala

    Hi Fernando

    I have the same requirement from SOAP to PROXY (synchronous scenario) and mapping is not required . when i tried to create with above requirement i am getting error ” Exception caught by adapter framework: com.sap.aii.af.sdk.xi.srt.BubbleException: HTTP Response Received. Status Code = 500 [null “null”] .. i am not sure why we are getting this error , even i tried google and got some inputs but did not worked .

    But we are able to connect to SAP ECC with mapping objects and getting the response as well ..

    So it would be helpful for me if some one can help me here .

    Thanks

    Rajesh

    (0) 

Leave a Reply