Hi All,
I'm trying to embed a FPM component in a WD for ABAP component. According to the FPM Cookbook it seems possible. But until now all my attemps failed.
I'm trying the following code :
data: l_view_controller_api type ref to if_wd_view_controller,
l_component_usage type ref to if_wd_component_usage,
component_name type string,
ls_conf_key type Wdy_config_key,
l_cmp_api type ref to if_wd_component,
l_cmp_usage_group type ref to if_wd_component_usage_group.
component_name = 'FPM_OIF_COMPONENT'.
ls_conf_key-config_id = 'ZJPM_FLOOR_PLAN_COPYID'.
l_cmp_api = wd_comp_controller->wd_get_api( ).
if l_cmp_api->has_cmp_usage_group( 'TESTGROUP' ) is initial.
l_cmp_usage_group = l_cmp_api->create_cmp_usage_group(
name = 'TESTGROUP'
used_component = component_name ).
endif.
l_component_usage = l_cmp_usage_group->add_component_usage(
name = 'MAIN_USAGE_1'
embedding_position = 'MAIN/CNT_FPM'
used_component = component_name ).
if l_component_usage->has_active_component( ) is initial.
l_component_usage->create_component( exporting component_name = component_name
configuration_id = ls_conf_key ).
endif.
l_view_controller_api = wd_this->wd_get_api( ).
l_view_controller_api->prepare_dynamic_navigation(
source_window_name = 'W_MAIN'
source_vusage_name = 'EMPTYVIEW_USAGE_1'
source_plug_name = 'OUT'
target_component_name = component_name
target_component_usage = 'MAIN_USAGE_1'
target_view_name = 'FPM_WINDOW'
target_plug_name = 'DEFAULT'
target_embedding_position = 'MAIN/CNT_FPM'
).
wd_this->fire_out_plg( ).
despite the same kind of code works with a non FPM WD Component, That one does not work with FPM Component. I got a dump :
Access via 'NULL' object reference not possible.
Do you have an idea of what i'm doing wrong?
Thanks a lot.