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

SAP WebClient UI和business switch相关的逻辑介绍 SAPCloudCDS viewSAP云平台SAP成都研究院 

程序员文章站 2022-06-13 17:35:36
...

Do you know the meaning of these two checkboxes in F2 popup?

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

Let’s first learn some prerequisite knowledge: In Webclient UI workbench the poweful functionality is provided to ensure that the given feature is only available, if the bound business switch is in active status. For example you can open component BP_HEAD and find many view are added to overview area with a related business switch.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

The same logic for navigation link and component usage:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

in this blog we have discussed the ui configuration logic and know the customer configuration precedes the sap configuration. After the correct configuration is determined and IF it is sap configuration, framework will load the configuration xml data with the logic below:

(1) if pre_proc_active_config_s is X ( we will discuss how this flag is initialized later ) framework will first try to load configuration data from tableBSP_DL_XMLST_PR( Processed Standard Configuration for switch related handling ), if nothing found, then try BSP_DL_XMLSTRX2instead ( Storagetable for delivered XML layout descriptions ).

For customer configuration, the configuration data is always loaded from table BSP_DL_XMLSTRX2.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

In order to verify the described process above, I create a simple component with one overview page which contains only one assignment block which are bound to a business switch. The switch is set as deactivated.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

Then I launch the UI. Since it is the first time the UI is accessed, it is apprarently that no entry for ZSWITCH in table BSP_DL_XMLST_PR, so data is fetched from BSP_DL_XMLSTRX2 instead. BSP_DL_XMLSTRX2 stores configuration data which does not take switch handling into consideration. After that, framework will try switch handling centrally in method DO_SWITCH_REL_HANDLING_RT:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

In this method, you can find the processor for each type of switch related handling. In my example ( overview page) it is CL_BSP_DLC_LIST_BASED:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

The switch handling is done by the processor method PROCESS_CONFIG_XML:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

The assignment block view is considered as inactive due to the deactivated switch, however it is put to , so the ev_changed is set to X ( the checkbox Changed by Switch processing in F2 )

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

Finally the switch processing result is persisted to table BSP_DL_XMLSTRX2. So when the UI is reopened next time, the stored entry will be fetched instead.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

When is pre_proc_active_config_s set to X

it is controlled by CL_BSP_DLC_CONFIGURATION2=>SWITCH_PROC_ACTIVE_CONFIG_S but could be deactivated via user parameter BSP_DLC_SWITCH_PROC.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

CL_BSP_DLC_CONFIGURATION2=>SWITCH_PROC_ACTIVE_CONFIG_S will by default only be set to X if current system is set up as customer system.

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

You could also set value VDTVRT to the user parameter, then UI framework will raise a notification message for you once the switch related handling is detected:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

The corresponding logic could be found in method below:

 

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院 

 

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

SAP WebClient UI和business switch相关的逻辑介绍
            
    
    
        SAPCloudCDS viewSAP云平台SAP成都研究院