cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Component Usage

Former Member
0 Kudos

Hi Friends.

We are dynamically embedding components into our application.

For that, we create a dynamic usage via:

CREATE_COMP_USAGE_OF_SAME_TYPE method of the interface IF_WD_COMPONENT_USAGE.

Now, how do we delete a usage that is created?

We need that as it seems to slow down our application.

Based on a config table, different usages need to be created, and then the earlier ones are not needed.

I found methods to delete/create components within that usage. But how to delete the usage altogether?

Any clues would be of great help.

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

Below code may help:

 DATA: lr_usage TYPE REF TO if_wd_component_usage.
  lr_usage =   wd_this->wd_cpuse_[your_usage_name]( ).
  IF lr_usage->has_active_component( ) IS NOT INITIAL.
    lr_usage->delete_component( ).
  ENDIF.

Raja T

Answers (0)