SAP CRM BSP repository 如何判断switch的状态

176 阅读1分钟

Created by Jerry Wang on Dec 05, 2014

在UI component workbench里可以为很多artifact设置business switch,在runtime render UI view时,framework会从design time repository里取出这些artifact对应的switch信息,并统一做switch 状态的evaluation. 使用如下report 进行测试:
clipboard1
可使用tcode STRANS 打开上图82行的simple transformation查看source code, 可发现switch状态的evaluation是通过external ABAP class实现的,具体实现class为CL_WEBCUIF_SWITCH, 方法为IS_ACTIVE.
clipboard2
可通过查看callstack的方法来观察simple transformation如何call ABAP class:
clipboard3