欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

使用SAP XIF Adapter发送IDoc数据 SAPSAP云平台SAP Cloud PlatformCRMABAP 

程序员文章站 2022-06-13 23:42:16
...

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数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

The physical path could be found by simply double click:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Add new outbound parameters:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

For receiver port, maintain XIF_FILE created in previous step.

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

(3) Create a new site in tcode SMOEAC:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

XIF_SYSTEM is an entry in tcode SALE:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Add All Business Partner(MESG) as subscription:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Save site as JERRY_FILE_SITE.

(4) Add a new entry below in tcode CRMXIF_C1

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

One IDoc found:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Click Display IDoc button:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

(6) Click Process button to send it to File receiver:

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Status changes to 03:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Go to tcode AL11, the generated file is there:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

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数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Other business logic like Product has the same logic:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

Make changes on Web UI:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

The IDoc for product change is generated successfully:

 

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP 

 

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

使用SAP XIF Adapter发送IDoc数据
            
    
    
        SAPSAP云平台SAP Cloud PlatformCRMABAP