例子代码,供参考:
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  | 
						  DATA: lo_usage    TYPE REF TO if_wd_component_usage,         ls_conf_key TYPE wdy_config_key.   lo_usage = wd_this->wd_cpuse_fpm( ).   IF lo_usage->has_active_component( ) = abap_true.     lo_usage->delete_component( ).   ENDIF.   ls_conf_key-config_id = ' ZAAP_DEMO_TEST2'. * recreate component using new configuration ID   TRY.       CALL METHOD lo_usage->create_component         EXPORTING           component_name   = 'FPM_OVP_COMPONENT' "''           configuration_id = ls_conf_key.     CATCH cx_wd_runtime_api .   ENDTRY.  | 
					


        
    					
发表评论