BizTalk vs SAP under the hood– Integration and Configuration

In many situations the BizTalk specialist needs to speak with the specialist of SAP system, this for many reasons, and without a good knowledge could become impossible understand each other.

Many of these procedure settings could depending from the SAP version but for the most cases are all similar.

I think that a BizTalk specialist needs to know only the most important aspects, for example the most important term, transaction, all the commands in SAP are called transaction, a SAP interface is simple.
in SAP exist thousand of transactions, the most important for us are, SALE, SM59, WE20,WE21,WE02.

Execute the SAP gui or SAP logon application, normally in SAP exist many environments, test TSX , production PRDX and so on.
Double click and enter in the correct ambient


enter username and password


The execution of transaction is contextual to the SAP interface, the next screen is the SAP easy access,  from this interface you can execute all transactions.


To expose an IDOC, SAP needs to open a port, normally  called RFC Destination, a RFC destination is a name used to identify the remote system,  the RFC destination includes information such as the host name and the connection type. 

Execute the transaction SALE if you want use the SAP guide, for some persons is more user friendly, and click  on create RFC connection, I’m sorry I live in Italy and this SAP system is in Italian language but I think that is not a big problem.




To be more smart  you execute transaction SM59 and select TCP/IP Connection, and then create

In a new SAP system version you could see the screen



in a old version this, but is the same thing, in the most important step I’ll use new and old system screen version so we can have more details to understand better the SAP procedure



Now we can create the TCP/IP connection



Fill in the RFC destination name.  E.g. enter BTSRFC etc.
Choose T for TCP/IP as the Connection Type, also, fill in the Description and Click on the Save button.

in a new version SAP you can make the more operation in this screen in a old version , for example SAP 4.3 R3 you must:

Fill in the RFC destination name. E.g. enter BIZTALK1 etc. Choose T for TCP/IP as the Connection Type. Also, fill in the Description. Click on the Save button.



Click on the Registration button. Enter BIZTALK# for the Program ID. Use the name that corresponds to the RFC destination.
For example, use Program ID BIZTALK1 for the RFC destination BIZTALK1 and Program ID BIZTALK2 for RFC destination BIZTALK2. This name is case sensitive. Click on the Save button.


The Program ID is the name that the COM4ABAP Server will use to register itself with the SAP gateway. By registering with the SAP gateway, the COM4ABAP notifies the SAP system and allows the SAP system to make RFC calls to it.

To test RFC destination port we have many ways, the commons are press button Test Connection, in this case you test the SAP connection but in internal environment, see below

old version


new version, is the same



But to be ensure that SAP can communicate with the BizTalk SAP Adapter, start the COM4ABAP RFC Server on the participant’s machine.
Make sure that the Program ID in the COM4ABAP Server corresponds to the one created for the RFC destination in SAP.
The Host name should correspond to the SAP Destination defined in the SAP DCOM Connector.
Type in sapgw00 for the Service. This entry corresponds to the default SAP gateway on the SAP system. Test the Connection and make sure that the connection is successful.

Here is the snapshot of the COM4ABAP server.



At this point we must create a port, execute the transaction WE21

Old and new SAP system versions are very similar

Create a Transactional RFC Port that points to the RFC Destination. Click on Transactional RFC and click on the create button.


Click on the own port name and type in BIZTALK# and press enter. Note that there is a limit of 10 characters. For each student in the lab, enter BIZTALK1, BIZTALK2, etc.


Choose SAP Release 4.x for the correct version of the IDOC record types. Fill in an appropriate Description and choose the RFC destination created above and click Save.

After you save this, it should look like the following.



The same in a new SAP version



Now we are in the most important point, how SAP work… how SAP send an IDOC.

We must create a Partner Profile, the Partner Profile is maintained for every business partner with which business documents are exchanged. The Partner Profile consists of the types of documents that will be sent to the partner and received from the partner.
It also contains the settings such as the person responsible for handling errors for the communication with the partner.
All of these data will be stored in the first header record of any IDOC sent.
The partner association , Partner Profile and Port make all the rest.


Go to Partner Profiles through this menu from transaction SALE or directly from transaction WE20

I cannot show the data because are confidential so I use dummy data or erase all of theme and I will use the SAP customer entity.

Click on Partner type XX (customer) and click on new to add a customer to the partner profile.



Se below to understand better what SAP make



At this point we can create a SAP  port on BizTalk, this is another interesting argument, how create SAP port, generate IDOC schemas and other many things, maybe in a next post.

At this time and for this post I assumed that you have a good BizTalk skill, so

I will go with my memory, from the project , add new item, add generated item , add adapter metadata


Select WCF SAP and click configure URI, to be easy and smart I will map all the important fields with SAP setting configuration




set username and password


after this press connect, search the IDOC category (normally the IDCOO name), do you remember, the Partner Profile configuration and import the IDOC schemas.

After the creation you will se a new file usually named WcfReceivePort_SAPBinding_Custom.bindinginfo.xml

we can use this file to import the binding configuration in BizTalk Admin console and create the receive location.

Another important aspect for a BizTalk developer is to test his flow with SAP.

To test the communication with SAP and BizTalk we can sending a IDOC customer or the IDOC type you choose.

To make this we must execute a transaction, for example for the customer is the XD02

Enter a Customer code, and modify a field and press save button in SAP console.

the first think is to understand if SAP sent the IDOC to BizTalk, to make this we must execute the transaction WE02



enter you search parameter and press the clock


Finally to conclude this post and to understand completely how SAP work…

Double click on the IDOC, now you can see the record structure and the data, in the first and most important record, the header you will find all data to send the IDOC to the correct SAP port, see below





That’ all,in a next post I would to speak about the BizTalk aspects

Related blog posts