Skip to Content
With new SAP applications we get many standard ABAP proxy interfaces.
These of course may not always suit all our needs for at least a few reasons:

– they may include too many fields

– they may not include some additional fields that we need to pass along with the standard message

To enable developers to add some additional fields to standard SAP messages
SAP developed a concept of Data Type Enhancements which I will try to show in this weblog.

Scenario:

With many new SAP application we can maintain a Business Partner (via transaction BP).
In standard when we activate the necassary function modules we can create a proxy output
out of every change done to the business partner. The message that is used is called: BusinessPartner
and it comes along with a Software Component called SAP ABA (which can be downloaded from http://service.sap.com/swdc).
I will try to extend the standard structure so it will include one additional field which I will fill during the Business Parter update.

Step 1

– at first we need to create a new Enhanced Data Type (in our own Software Component)
that will have the SAP standard Data Type as a reference.

– then we need to create our own structure (in the Enhancement Definition tab)
that will be added to the SAP’s Data Type

image

– when we finish creating our new data type we can see the whole structure in the Enhanced Data Type tab

image

Step 2

The next steps will be performed from the SAP Application system (ERP, AII etc.)

– at first we need to generate the Enhanced Data Type (from our own Software Component) via transaction SPROXY

image

– the new structure will be created as an append structure to the original SAP’s structure.
This will allow us to use it later on in the standard proxy output.

image

To send a business partner via a proxy we need to make one of the function modules that allows to send it active.
We can do it via transaction – CRMC_BUT_CALL_FU. Let’s add module ZBUPA_OUTBOUND_MAIN over there.

Event – BPOUT
Object – BUPA Business Partner
Func.Name – ZBUPA_OUTBOUND_MAIN
Call – X

image

– now we can copy standard FM BUPA_OUTBOUND_MAIN to ZBUPA_OUTBOUND_MAIN
and add a few lines that will fill the new field NEWHEADER with some constant value (for test purposes).
You can add the code just before the function call ABA_BUPA_CALL_PROXY (which sends the message to the XI server).

Step 3

The last step is to change one of your Business Partners via Transaction BP.
If you succeed you should see a similar output in transaction SXI_MONITOR
on the SAP Application system (and also XI if you configured the routing properly).

image

I hope this blog showed you that it’s quite easy to extend a SAP standard proxy message
as very often you don’t need to build your own proxies for sending standard data
from your SAP Application system – all you need to do is to enhance the already provided solutions a little bit.

To report this post you need to login first.

15 Comments

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

  1. Ralf Zimmerningkat
    Greate work!!!
    I would like to alter also the mapping!
    is it right that  the component ABA_BUPA_CALL_PROXY has to be changed in order to call my own client proxy or is there any other way
    to change te mapping??

    regards
    Ralf

    (0) 
  2. B Krishnan
    Hi Michal,

    Our scenario is CRM->XI->Webservice.  For processing the customer details, we have planned to use the BUPA_OUTBOUND_MAIN functional module.  I have few queries which I have listed here:-

    1.  We are unable to import BUPA_OUTBOUND_MAIN into XI as it is not remote enabled.

    2.  How is BUPA_OUTBOUND_MAIN triggered such that it calls XI and how is the transformation done to the receiver structure.

    3.  We found that within BUPA_OUTBOUND_MAIN there is some proxy code.  To enable proxy, we need to first import the BUPA_OUTBOUND_MAIN in XI and generate proxy in SPROXY.  We are not able to import this function module to XI.  In that case, how does this proxy identifies XI proxy structure of BUPA_OUTBOUND_MAIN.

    4.  Can you please suggest a design as how to achieve the scenario CRM–>XI–>Webservice using BUPA_OUTBOUND_MAIN function module.

    Thanks.

    Krishnan

    (0) 
    1. Michal Krawczyk Post author
      Hi,

      you can send business partner via proxy or via IDOC there is on need to use function module
      and it’s not advisable for many reasons.

      just use IDOC or abap proxy

      Regards,
      michal

      (0) 
      1. B Krishnan
        Hi Michal,

        If we need to use standard ABAP proxy, what is the approach.

        BUPA_OUTBOUND_MAIN has got some proxy codes within it.  When CRM triggers this BUPA_OUTBOUND_MAIN, how is the data passed to XI.  In XI how do we create the sender structure for BUPA_OUTBOUND_MAIN.

        Thanks in advance.

        Krishnan

        (0) 
          1. B Krishnan
            Hi Michal,

            We have uploaded the XI Content for CRM Business Partner into the Integration Repository. We are able to find the Message Type –> “ABABusiness Partner” and the MessageInterface–> “ABABusinessPartnerOut”.  These objects are under the namespace “http://sap.com/xi/ABA” under the imported software component “SAP ABA 7.00”.  What do I need to do further.

            Do I need to add the Message Type and the Message Interface into my software component and do my own message mapping and interface mapping.

            The standard proxy method within the BUPA_OUTBOUND_MAIN is calling CALL METHOD lo_ababusiness_partner_out->execute_asynchronous.  Inside this method, the Message Type and Message Interface are under the namespace ‘http://sap.com/xi/ABA‘.  In that case, how will it understand my namespace and invoke the Message Interface.

            Please advise.

            Krishnan

            (0) 
            1. Michal Krawczyk Post author
              Hi,

              answered on the forum
              use IDOC if you don’t know how to proceed
              it might be easier for you

              BTW
              please ask on the forum and not here

              Regards,
              michal

              (0) 
  3. Amitabha Samajpati

    Hello Michal,

    Thanks for Sharing this wonderful Blog! It taught me the use of Data Type enhancements. We implemented this in a POC scenario, where custom fields have been incorporated in the BP structure, and they need to be sent out to PI. There, instead of writing a custom function for BUPA_OUTBOUND_MAIN, we enhanced the standard function module ABA_BUPA_MAP_DDIC_TO_PROXY. This FM does the work of mapping the table structure into proxy structure. and we implemented an implicit enhancement point to populate the values of the custom BP fields into the enhanced data types. In this comment thread, I have seen a few questions about creating a custom version of BUPA_OUTBOUND_MAIN, so thought of sharing this idea. Hope it helps somebody like me. 🙂

    (0) 
  4. Terry Barker

    Thanks, Michal. This blog has helped me avoid modifying the SAP-delivered data type for the HCM-SuccessFactors Integration. I would like to add a few points of clarification for others who, like me, may not have a lot of PI experience.

    1. You have to create your new software component and software component version in the SLD, then import it into the IR by clicking on the “Create Object” button on on the toolbar (just below the application menu), opening up the Work Areas branch of the tree, and selecting “Software Component Version.” Then select the “Import from SLD” radio button, click Display, and select your new SWCV from the list.

    2. You then have to add a namespace to your SWCV by right-clicking on it, selecting New, opening the “Work Areas” branch of the tree, and selecting Namespace..

    3. In order to get the SAP-delivered data type to show up in the input help of the “Data Type Enhancement” input field of your new Data Type Enhancement, you have to first go to the Details tab on your SWCV and add the SAP SWCV in the “Underlying Software Component Versions” section. I hope these clarifications save others from the hours of frustrating trial-and-error I went through.

    Cheers,

    TerryB

    (0) 
      1. Terry Barker

        Ask your Basis friends to check the RFC connection between your ECC system and your PI system. Also make sure you activated the PI objects.

        Cheers,

        TerryB

        (0) 
        1. Praveen Tirumareddy

          hi Terry,

          Thanks for the update.

          Yes objects were activated. The mistake i was doing was i kept the same name space as the original ones which restricted the details to reflect.

          thanks and regards,

          Praveen t

          (0) 
  5. Arkesh Sharma

    Hi Michal,

    Thank you for the wonderful blog! 🙂

    I could see that in DT enhancement, the new custom field gets added towards the end of the standard structure. Is it possible to add the custom field somewhere in the middle of the standard structure where we want it?

    Regards,

    Arkesh

    (0) 

Leave a Reply