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

SAP cross distribution chain status在Fiori应用中的draft handling SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

程序员文章站 2022-06-14 21:41:35
...

The explanation why draft handling is necessary in Fiori application could be found from Fiori Design Guideline.

In this blog, I will use the update of field “cross distribution chain status” in S4 Product master Fiori application as example. This field could be found from Fiori UI:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

There is corresponding field in old SAPGUI transaction MM03:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The value is stored in table MARA, field MSTAE. The available list of status value could be maintained in this customizing:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

When end user clicks edit button and chooses a given value from dialog and press enter key:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The draft instance of this product will automatically be persisted in the backend.

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

At this time ( product is still in edit mode ), we can find out the lock is still acquired via tcode SM12. Also the draft uuid would be found:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

How to find the database table which stores the draft data of Cross distribution chain status? In tcode BOBX, open BO I_PRODUCTWD and double click node I_PRODUCTSALESWD, you can find out table name PROD_SALES.

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

Query this table with the draft uuid found from SM12 against field PARENTDRAFTUUID, and you can find one corresponding entry for draft instance in Fiori UI.

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The parent entry could be found in PROD_ROOT:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

When user clicks save button in Fiori UI, an HTTP post will be sent to backend:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The method COPY_DRAFT_TO_ACTIVE_DOCUMENT of class configured in BOBX is called, to merge the data in draft table to MARA, this is called activation.

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The persistence to MARA is done by function module MATERIAL_MAINTAIN_DARK:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

The value to be persisted is maintained in table parameter amara_ueb:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

Meanwhile once activation is done successfully, the draft entry will be removed automatically. In summary, the draft handling process could be described in the following graphs:

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

Figure1: user input is stored in draft table PROD_SALES

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

Figure2: user clicks save button

 

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院 

 

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

SAP cross distribution chain status在Fiori应用中的draft handling
            
    
    
        SAPCRMSAP云平台SAP Cloud PlatformSAP成都研究院