abapdotabapdeveloper-tools
来源资料待手动核验
Feature toggle for ABAP
Feature toggle for ABAP (aka Feature Flags)
A software engineering technique that turns system functionalities on and off during runtime, with no downtimes, and deploying new codes.
ZFEAT_TOGGLE;DATA gc_feature_toggle TYPE zcore_feature_toggle.
DATA go_feature_toggle TYPE REF TO zif_core_feature_toggle.
DATA gv_is_active TYPE c.
CREATE OBJECT go_feature_toggle TYPE zcl_core_feature_toggle.
gv_is_active = go_feature_toggle->is_active( gc_feature_toggle ).
IF gv_is_active = abap_true
...
ENDIF.
Main class implementation is ZCL_CORE_FEATURE_TOGGLE.
Find use methods below aside of its documentation.
Check whether the feature toggle is activated. The return is a boolean value of the current status of a given feature toggle.
Example: Z_TEST_FEATURE_TOGGLE.
See source code here.