Friday 17 September 2021

Example of Integration between SAP and Salesforce with BOOMI

In this article, just offer a quick overview&example of how material master data has been transferred from SAP to Salesforce through BOOMI, also trace the process flow which could help to do issue analysis.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

1. Collect material details and generate outbound Idoc


SAP already provides a standard program named RBDSEMAT with the standard message type ‘MATMAS’ along with accordingly basic type like ‘MATMAS_BAPI’. Of course, we need to customize all of this and lots of work involved~ Check this overview file about configuring SAP for Inbound and Outbound Processing.

As material keeps changing at various tables by different transactions, we using a change pointer to trigger the Idoc send out like this blog. Besides, many other ways to trigger Idoc like by program/output process/ event, etc.

Outbound IDOC by customized triggering Events

In short, we generate and send an outbound Idoc which contains all the details of material from SAP like below:

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

To precisely trace the Idoc processing and when the SAP system passes it to the external system (here is BOOMI), we’d better catch a glimpse logs of Idoc status ’03’ (as IDoc could be sending out immediately or asynchronous with batch collected in an interval).

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

2. Inbound IDoc monitoring at BOOMI


Let’s focus on the BOOMI side. Go to ‘Documents’ in Manage Tab, we can filter by specific time range started from the log time of Idoc 03 status. It’ll be a more accurate filter using tracked field Idoc number if you know it. Be aware of the time zone, as the SAP system could use a different time zone compared with the BOOMI system.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

For this example, we can get the process log with the name ‘[SAP] —> [Outbound BATCH IDOC Route] Outbound IDOC’ against that IDoc from SAP. The action-type is ‘Listen’ which functions like IDOC inbound monitor.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Following the below steps with clicking ‘Load Execution’ will switch to the ‘Execution’ list from the documents list.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Then let’s check the process details by clicking the Gear button.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

For this example, there’re two major steps which are actually master template of all inbound IDoc processing:

1. Start-SAP SAP Prod/QA Deployment Connector
2. [SAP] —> [Outbound BATCH IDOC Route] (SUB-PROC) Outbound IDOC

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Step 1 defines the type and operation for the connection.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

The details listener setting is a little similar to SM59 which can be maintained like below:

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

3. Inbound processing flow in BOOMI


Click step 2 ‘[SAP] —> [Outbound BATCH IDOC Route] Outbound IDOC’ from the above process we can see the details of how BOOMI deals with the inbound Idoc.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Each step has its own configuration and supports custom scripting like below to decode Idoc type. BOOMI experts will deal with this using language like Groovy.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Here is the key sub-step ‘Outbound IDOC Route’, which controls the process routing which process branch should go against various IDOC types. In this example, there’s a specific process route design for the material master. By this route setting, step 2 from the main process can dynamically switch to different routes to deal with different inbound Idocs types.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Find the process in the ‘Process Library’ or filter globally, we can get the sub-process flow to deal with Idoc specifically.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Here the product queue step is the connector type that links to another operation.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

As the process can be reused freely and imbedded in another process, the whole flow could be extremely complex with a large number of sub-tasks at various levels that work together like an air-plain assembly line.

By open the component of the ‘Maps’ icon we can set the data structure mapping between SAP and BOOMI. SAP data structure comes from Idoc segments (include Idoc number, material number, etc.) shown on the left side mapping to the inbound structure on the right side.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Functions in the middle support custom code to deal with data conversion using JAVAscript like below:

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Finally, we get updated material at SFDC with Idoc number and changed timestamp.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Tips. Check the IDoc file in XML format


If some error happens during the processing caused by incorrect data, maybe couldn’t get all error descriptions clearly and accordingly no matter at BOOMI or SFDC. And if we don’t have the Idoc number yet, it’ll be quite helpful if we can get the Idoc details.

At the ‘Execution’ entry list, click ‘View document’ for the first step (Start) SAP.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Then we can get details of IDoc in XML format including the number and basic/message type.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

No comments:

Post a Comment