cancel
Showing results for 
Search instead for 
Did you mean: 

Reuse FPM configuration in another webdynpro component

Former Member
0 Kudos

Hello,

I would like to define the navigations and buttons in one component configuration . And then use this in another webdynpro component. As the buttons/navigation is applicable to multiple requirements. So I would like to reuse it.

I tried to do this using the developer's guide (7.0 , EhP2). But I am getting a dump

'The current application triggered a termination with a short dump ' .

Not sure if I am doing some thing wrong. Any ideas in this regard would be helpful.

'

method Web DynproDOINIT .
data: lo_usage type ref to if_Web Dynpro_component_usage,
ls_conf_key type Web Dynproy_config_key.
lo_usage = Web Dynpro_this->Web Dynpro_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.
(C) SAP AG Floorplan Manager ABAP - Developeru2019s Guide 185
Preliminary Version
call method lo_usage->create_component
EXPORTING
component_name = 'FPM_OIF_COMPONENT'
configuration_id = ls_conf_key.
catch cx_Web Dynpro_runtime_api .
endtry.

Thanks alot

Saujanya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

>

>

> I would like to define the navigations and buttons in one component configuration . And then use this in another webdynpro component. As the buttons/navigation is applicable to multiple requirements. So I would like to reuse it.

>

> I tried to do this using the developer's guide (7.0 , EhP2). But I am getting a dump

> 'The current application triggered a termination with a short dump ' .

>

> Not sure if I am doing some thing wrong. Any ideas in this regard would be helpful.

>

>

> '

>

method Web DynproDOINIT .
> data: lo_usage type ref to if_Web Dynpro_component_usage,
> ls_conf_key type Web Dynproy_config_key.
> lo_usage = Web Dynpro_this->Web Dynpro_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.
> (C) SAP AG Floorplan Manager ABAP - Developeru2019s Guide 185
> Preliminary Version
> call method lo_usage->create_component
> EXPORTING
> component_name = 'FPM_OIF_COMPONENT'
> configuration_id = ls_conf_key.
> catch cx_Web Dynpro_runtime_api .
> endtry.

>

> Thanks alot

> Saujanya

if your actual coding is like as it is above then it will give dump. For example

ls_conf_key-config_id = u201CID configuration of FPM componentu201D.

You need to replace the u201CID configuration of FPM componentu201D with the actual component configuration id.

Former Member
0 Kudos

Hi

Thanks alot for your reply.

But I did replace the config id with a valid component configuration id . But it still dumps.

Any ideas in this regard which you can share will be helpful.

Best Regards

Saujanya

Former Member
0 Kudos

Please post the exact place where you get the dump in source code. Use transaction ST22 to get the location of the source.

Former Member
0 Kudos

Hi,

The dump occurs in the constructor of the class 'CL_FPM' and the error message shown

METHOD constructor.

* Make sure this constructor is called exactly once - otherwise GET_INSTANCE will fail.
  IF NOT go_instance IS INITIAL.
    MESSAGE x106(apb_fpm_core).
  ENDIF.
  go_instance = me.
  mo_floorplan = io_floorplan.

This error message points to 'Only 1 floorplan instance is allowed per work area'.

Not sure at runtime we can create a FPM component instance in another application.

Am I doing some thing wrong ? Any ideas in this regard would be really helpful.

Thanks alot

Saujanya

Former Member
0 Kudos

Again, i have to admit that the dump is correct. I am not sure what you are trying to do here. Are you trying to create a instance of FPM_OIF_COMPONENT while you are already running a floorplan (FPM_OIF_COMPONENT) application. If that is true then you may have to reevaluate your design and alter it.

Former Member
0 Kudos

Hi,

Thanks alot for your reply.

Yeah, I am trying to create a FPM instance at run time . As I mentioned in my thread earlier , I would like a create a FPM component which contains all the buttons in the configuration . And I would like to call this instance at runtime in another form component.

The idea is to reuse the buttons component in my forms components . I read this in the tutorial guide, but not sure if that was possible.

Did I understood something different from what was mentioned in the tutorial ?

Isnt it possible to create a fpm instance at runtime in another webdynpro component ? Any ideas in this regard would be helpful.

Thanks alot

Saujanya

Former Member
0 Kudos

Hi ,

Any ideas in this regard . It would be helpful if you can let us know.

Thanks

Saujanya

Former Member
0 Kudos

At this moment only one fpm instance can exists, in 7.3 you have api parameters which can support your case.

Former Member
0 Kudos

Thanks for your clarification.

It answered my question.

Best Regards

Saujanya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

It would be great if anyone can share their ideas /experience in this regard.

Thanks alot

Best Regards

Saujanya