使用SAP XIF Adapter发送IDoc数据

In this blog, I will use File as external receiver.

Scenario overview

I make some changes on business partner / product master data in CRM.

The data in the mBDoc will be converted in XIF adapter into an IDoc which then is sent to File as external receivers.

(1) Create a new port in tcode WE21:

使用SAP XIF Adapter发送IDoc数据

Use EDI_GLOBAL_PATH as directly which will be written with generated IDoc.

使用SAP XIF Adapter发送IDoc数据

The physical path could be found by simply double click:

使用SAP XIF Adapter发送IDoc数据

Save the port as XIF_FILE.
(2) Create a new partner profile in tcode WE20:

使用SAP XIF Adapter发送IDoc数据

Add new outbound parameters:

使用SAP XIF Adapter发送IDoc数据

For receiver port, maintain XIF_FILE created in previous step.

使用SAP XIF Adapter发送IDoc数据

(3) Create a new site in tcode SMOEAC:

使用SAP XIF Adapter发送IDoc数据

Click Site attribute and maintain XIF_SYSTEM and type: LS – logical system.

使用SAP XIF Adapter发送IDoc数据

XIF_SYSTEM is an entry in tcode SALE:

使用SAP XIF Adapter发送IDoc数据

Add All Business Partner(MESG) as subscription:

使用SAP XIF Adapter发送IDoc数据

Save site as JERRY_FILE_SITE.

(4) Add a new entry below in tcode CRMXIF_C1

使用SAP XIF Adapter发送IDoc数据

(5) now use tcode BP, search a business partner and make changes on it and save.

使用SAP XIF Adapter发送IDoc数据

go to tcode SMW01, you should find a generated mBdoc:

使用SAP XIF Adapter发送IDoc数据
使用SAP XIF Adapter发送IDoc数据

Double confirm that this mBodc is generated by my previous change by checking partner id and guid:

使用SAP XIF Adapter发送IDoc数据

Now go to tcode BD87, find IDoc with status = 30 – IDoc ready for dispatch

使用SAP XIF Adapter发送IDoc数据

One IDoc found:

使用SAP XIF Adapter发送IDoc数据

Click Display IDoc button:

使用SAP XIF Adapter发送IDoc数据

We can ensure this IDoc is generated by our change in BP tcode via partner_no:

使用SAP XIF Adapter发送IDoc数据

(6) Click Process button to send it to File receiver:
使用SAP XIF Adapter发送IDoc数据

Status changes to 03:

使用SAP XIF Adapter发送IDoc数据

Go to tcode AL11, the generated file is there:

使用SAP XIF Adapter发送IDoc数据

If you are curious about the file content, you can see a downloaded version here.
As alternative you can also specify absolute path:

使用SAP XIF Adapter发送IDoc数据

Other business logic like Product has the same logic:

使用SAP XIF Adapter发送IDoc数据
使用SAP XIF Adapter发送IDoc数据
使用SAP XIF Adapter发送IDoc数据

Make changes on Web UI:

使用SAP XIF Adapter发送IDoc数据
使用SAP XIF Adapter发送IDoc数据

The IDoc for product change is generated successfully:

使用SAP XIF Adapter发送IDoc数据

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
使用SAP XIF Adapter发送IDoc数据