IBM® WebSphere Adapters deliver generic technology and business application adapters with wizards that quickly and easily service enable legacy applications, ERP, HR, CRM, and supply chain systems. WebSphere Adapter for SAP software is one such adapter that provides highly functional connectivity and valuable administration and monitoring functions. The SAP adapter supports all of the key SAP R/3 interfaces and offers bi-directional, real time integration between SAP R/3 and other systems, including e-commerce, customer relationship management, supply chain management, enterprise resource planning, and custom and legacy applications. On the inbound, the adapter supports Advanced Event Processing (AEP), BAPI, ALE, ALE pass through interfaces. On the outbound, it supports interfaces like the BAPI, AEP, QISS, ALE, ALE pass through, BAPI Work unit and BAPI Resultset.
SAP CRM uses business document (BDOC) technology for internal data distribution within the system. The external display of the interface information is in the form of an IDOC, XML, or ASCII file. SAP CRM contains a component called the External Interface Adapter (XIF) that allows you to interface between SAP CRM and external systems. The XIF Adapter manipulates and populates the outbound and inbound messages. There are two types of delivery possible with XIF adapter: SOAP/XML and ALE/IDOC.
WebSphere Adapter for SAP Software can handle IDOCs by leveraging the XIF adapter in SAP CRM to convert BDOC to IDOC. This provides an additional integration option for the SAP adapter to connect to SAP CRM and fetch the BDOC data indirectly.
This article assumes that you have a system ready with:
- IBM Integration Designer V7.5 and IBM Business Process Manager V7.5 Advanced Edition
- WebSphere Adapter for SAP Software V7.5
- Access to an SAP system with pre-configuration of IDoc/BAPI processing
- SAP CRM basics
- A basic understanding of IBM Integration Designer, Process Server, and WebSphere SAP Adapter. For more information on these topics, see the Resources section at the end of the article.
SAP CRM side configurations
This section describes the details required to configure an existing function module that passes the BDOC message to the ALE layer.
Setting up the BDOC
In this article, you will use the standard BDOC in CRM. The BDOC technology is used in the background. The external display of the interface information occurs via an IDoc, XML, or ASCII file. The CRM middleware and BDOC technology are used for the internal data transfer in the CRM system.
The following steps describe how the settings on SAP CRM need to be configured so that BDOCc can be consumed by adapter as an IDOC.
- Go to TCODE - BDFG in the SAP CRM system.
- Enter the Function Module as
CRMXIF_PARTNER_REL_SAVEand press Enter. The corresponding business object and relevant message types are displayed as shown in Figure 1.
Figure 1. Creating a Function Module
- Click on the Display button to see the generated ALE
interfaces as shown in Figure 2.
Figure 2. View of generated ALE Interface
- Go to tcode WE30 to view the IDOC that corresponds to the business partner MDOC. The IDOC used is "CRMXIF_PARTNER_SAVE_M03".
Note: A new BDOC or extended BDOC can be created. BDOCs are created in such a way that they need to have an ALE interface layer generated along with a custom IDOC to include the new attribute, in addition to the BDOC. You also need to create the Business Add-Ins (BADIs) implementation for the newly added attributes for the mapping
Setting up ALE
In this section, we describe how to configure the logical system, the RFC destination, the Partner profile, ALE ports, and the distribution model.
Logical system setup
- Start Transaction BD54.
- Enter a new logical system as shown in Figure 3.
- Ensure that an entry for the Logical System
CM1CLNT100 exists. This logical system must be
assigned to CRM Client 100 (see Transaction SCC4 - Client
Figure 3. Logical Systems
Create an RFC Destination setup
- Start Transaction SM59.
- Create a new RFC Destination of Type "T" (TCP/IP Connection) as shown in Figure 4.
Create an ALE Port
- Start Transaction WE21.
- Create a new ALE Port of type transactional "RFC".
Figure 4. TRFC ports
Create an ALE Partner Profile
- Start Transaction WE20.
- Create a partner profile of "SOWMYALS" of type LS (Logical System) as shown in Figure 5.
- Enter the message types
SYNCHfor the outbound.
Note: The message type "SYNCH" with IDOC type "SYNCHRON" are added to the partner profile as well.
Figure 5. Outbound Partner Profile
- Enter the message type
CRMXIF_PARTNER_SAVE_Mfor the inbound as shown in Figure 6.
Figure 6. Inbound Partner Profile
Create a Customer Distribution Model
- Start Transaction BD64.
- Create a distribution model as follows (see Figure 7):
- Sending System:
- Receiving System:
- Message Type(s):
- Sending System:
- Perform a Technical Consistency Check for the model in Transaction
BDM5. Switch off the cross-system checking when
performing this check.
Figure 7. Distribution Model
Setting up the External Interface Adapter (XIF)
SAP CRM contains a component called the External Interface Adapter (XIF), which allows you to interface between SAP CRM and the external systems.
Create a new site
Create a new site on the SAP CRM, administration console.
- Start Transaction SMOEAC > Administration Console.
- Create a new site ZSITE01 of the type External
Interface for the IDOCs as shown in Figure 8.
Figure 8. XIF Admin Console
- In the Site Attributes, enter the ALE Partner profile
SOWMYALScreated earlier, thereby creating a link between the XIF site and the ALE Partner profile.
Create a new subscription
In the same transaction SMOEAC, you need to create two new subscriptions as shown in Tables 1 and 2.
Table 1. Subscription 1 details
|Publication||All Business Partners (MESG)|
|Assign to Site||ZSITE01|
Table 2. Subscription 2 details
|Publication||All Business Partner Relationships (MESG)|
|Assign to Site||ZSITE01|
Assign a site ID to the interface type
- Start Transaction CRMXIF_C1.
- Enter two new entries in the table as shown in Figure 9.
Figure 9. Assign a Site ID
This table links the mBDoc type to the respective External Interface (XIF) Function Module.
In this section, we describe how we can test both Inbound and Outbound scenario's between SAP and SAP adapter to handle BDOC.
Running the interface for inbound testing
In this section, you will send the data in CRM created as a BDOC, convert it to IDOC via the XIF adapter so that it is ready to be consumed by WebSphere Adapter for SAP Software.
The steps mentioned for running the interface assume that you are using the SAP GUI for user interaction. You can also use the CRM Web GUI for running this interface. Although the menus and navigation paths are different in the Web GUI, you still get the same results. The Business Partner numbers mentioned here are specific to the system in which it was tested.
- Start Transaction BP.
- Create a business partner in the Role Ship-To Party () page as shown
in Figure 10. Enter the relevant data and press
Figure 10. Create a Business Partner
- Business Partner 11 is created in the role (Ship-To Party) as shown in
Figure 11. Sample Business Partner
- Go to SMW01 and see the MDOC created and its status
as shown in Figure 12. A green color indicates it has processed.
Figure 13 shows a BDOC message status.
Figure 12. BDOC message
Figure 13. BDOC message status
- In WE02, you can see the IDOC created that is consumed by the adapter,
as shown in Figure 14.
Figure 14. Display IDOC
Note: If the Mdocs are in the yellow status, then go to Transaction MW_MODE, set it to "On", and save it as shown in Figure 15.
Figure 15. Middleware Activation Mode
Running the interface for outbound testing
Follow the steps in this section to configure the adapter and to post an IDOC message to SAP CRM, which internally gets converted to a Business Partner BDOC message.
- Configure the adapter for the "CRMXIF_PARTNER_SAVE_M03" IDOC. Each time the adapter sends request to SAP to create business partner a new GUID needs to be generated.
- Add the message type CRMXIF_PARTNER_SAVE_M in the inbound parameter of WE20.
- Execute FM GUID_CREATE, copy the highlighted GUID, and pass in the input XML for the outbound call. The sample input XML is provided in the Download section of the article.
- Once the outbound call is successful from the adapter, you can see an IDOC and the corresponding BDOC.
- Go to Transaction SMW02 to view the Business Partner
BDOC message created from the adapter, as shown in Figure 16.
Figure 16. BDOC created by Adapter
In this article, you learned how data from CRM can be consumed or sent by WebSphere Adapter for SAP Software with minimal configuration on the CRM side. The conversion of BDOC to IDOC provides the same functional behavior as you had seen before with IDOC processing in addition to another representation called BDOC. This conversion gives you the flexibility to seamlessly connect to SAP CRM.
- WebSphere Adapter for SAP Software documentation
- IBM WebSphere Adapter for SAP Software samples
- SAP CRM documentation
- BDOC Information
- WebSphere Adapters product page
- WebSphere Adapters Information Center
- WebSphere Adapters product library
Dig deeper into WebSphere on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.