cancel
Showing results for 
Search instead for 
Did you mean: 

component usage from web dynpro configuration LSO_CREATE_COURSE_OIF

Former Member
0 Kudos

Hi all,

second question :

- I want to use a certain component in another component. The development guide gives following code to do this :

data: lo_usage type ref to if_Wd_component_usage,

ls_conf_key type WDy_config_key.

lo_usage = wd_this->wd_cpuse_fpm_usage( ).

if lo_usage->has_active_component( ) = abap_true.

lo_usage->delete_component( ).

endif.

ls_conf_key-config_id = u201CID configuration of FPM componentu201D.

  • recreate component using new configuration ID

try.

call method lo_usage->create_component

EXPORTING

component_name = 'FPM_OIF_COMPONENT'

configuration_id = ls_conf_key.

catch cx_Web Dynpro_runtime_api .

the part in bold (fpm_usage) needs to be adapted with the usage. But how can I determine the usage for the web dynpro ?

thanks in advance !

kind regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In general if you use one component in another component , you define a component usage.

An example of it is ALV inside your WDA.

USAGE name is ALV and component is salv_wd_table.

initialization of used component would be like this

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

  lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.

The pattern is like this

wd_this->wd_cpuse_{name of the component usage}

I am not sure if this is what you are looking for. If you want to know the used component info based on the usage then you can use the method GET_COMPONENT_USAGE_INFO which will return the component name.

Answers (0)