cancel
Showing results for 
Search instead for 
Did you mean: 

Howto replace an embedded FPM-Instance within a Web DynPro Application?

Former Member
0 Kudos

Hi,

I have to build a Web DynPro application that displays an Navigation menu on the left side. On the right side within a UIViewContainer an embedded FPM Instance should be displayed depending on which entry I pressed on the Navigation menu. (Similiar to the Cockpit)

For Test purposes I have 2 buttons in the navigation menu. One to add the fpm and one to remove the fpm.

When I start the WD Application I first hit the addfpm button. And a new FPM Application is displayed within the UIViewElementContainer. When I hit the delfpm button the FPM will disappear. When I will the addfpm button again I get

a dump[1]

I have absolutely no idea why I get this dump.

Do I have to reset the FPM application remove removing it? Or is it possible to load a new FPM configuration in the FPM without removing it first?

Here are the Methods that I use to remove/add the FPM-Instance:

method ONACTIONADDFPM .

DATA: L_VIEW_CONTROLLER_API TYPE REF TO IF_WD_VIEW_CONTROLLER.

DATA: L_COMPONENT_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

DATA: lf_conf_key TYPE WDY_CONFIG_KEY.

L_VIEW_CONTROLLER_API = wd_this->WD_GET_API( ).

"Wenn die Komponente-Usage noch nicht vorhanden ist dann erstelle Sie:

L_COMPONENT_USAGE = wd_this->WD_CPUSE_FPM( ).

IF L_COMPONENT_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

lf_conf_key-CONFIG_ID = '/PLMU/WDC_MAT_OIF_CFG'.

L_COMPONENT_USAGE->CREATE_COMPONENT( EXPORTING COMPONENT_NAME = 'FPM_OIF_COMPONENT'

CONFIGURATION_ID = lf_conf_key ).

"Komponente mit der View verknüpfen:

L_VIEW_CONTROLLER_API->PREPARE_DYNAMIC_NAVIGATION(

SOURCE_WINDOW_NAME = 'WINDOW'

SOURCE_VUSAGE_NAME = 'MAIN_USAGE_0' "MAIN_USAGE1/UIVIEW_VCA_1'

SOURCE_PLUG_NAME = 'TO_FPM'

TARGET_COMPONENT_NAME = 'FPM_OIF_COMPONENT'

TARGET_COMPONENT_USAGE = 'FPM'

TARGET_VIEW_NAME = 'FPM_WINDOW'

TARGET_PLUG_NAME = 'DEFAULT'

TARGET_EMBEDDING_POSITION = 'MAIN/FPMVIEW' "'MAIN_USAGE_0/UIVIEW_VCA_1'

).

WD_THIS->FIRE_TO_FPM_PLG( ).

ENDIF.

endmethod.

And then remove the FPM using this button action:

method ONACTIONDELFPM .

DATA: L_VIEW_CONTROLLER_API TYPE REF TO IF_WD_VIEW_CONTROLLER.

DATA: L_COMPONENT_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

L_VIEW_CONTROLLER_API = wd_this->WD_GET_API( ).

"Wenn die Komponente-Usage vorhanden ist dann lösche sie:

L_COMPONENT_USAGE = wd_this->WD_CPUSE_FPM( ).

"

DATA: lo_event TYPE REF TO cl_fpm_event.

lo_event = cl_fpm_event=>create_by_id( iv_event_id = cl_fpm_event=>GC_EVENT_CLOSE ).

DATA: iwci_fpm TYPE REF TO IWCI_FPM_OIF_COMPONENT.

iwci_fpm = wd_this->WD_CPIFC_FPM( ).

CALL METHOD IWCI_FPM->CLOSE_DIALOG

EXPORTING

IO_EVENT = lo_event

IV_EVENT_FAILED = ABAP_FALSE

.

IF L_COMPONENT_USAGE->HAS_ACTIVE_COMPONENT( ) IS NOT INITIAL.

L_COMPONENT_USAGE->DELETE_COMPONENT( ).

"FPM Ref holen und Exit-Event schicken:

DATA: lo_fpm TYPE REF TO IF_FPM.

lo_fpm = cl_fpm_factory=>get_instance( ).

  • CHECK NOT lo_fpm IS INITIAL.

  • DATA: lf_event TYPE FPM_EVENT_ID.

  • lf_event = cl_fpm_event=>GC_EVENT_CLOSE.

  • lo_fpm->RAISE_EVENT_BY_ID( lf_event ).

ENDIF.

endmethod.

The dump says:

Access via 'NULL' object reference not possible.

The ABAP call hierarchy was:

Method: /PLMU/IWCI_WDI_FRW_OIF~OVERRIDE_EVENT of program /1BCWDY/0O2TST5VUWTCOBML1BE7==CP

Method: /PLMU/IF_FRW_CALLBACK_PROXY~OVERRIDE_EVENT of program /PLMU/CL_FRW_F_CALLBACK_PROXY=CP

Method: OVERRIDE_EVENT of program /PLMU/CL_FRW_CALLBACK_PROXY===CP

Method: OVERRIDE_EVENT_OIF of program /PLMU/CL_FRW_APPL_CNTRL_ASSISTCP

Method: OVERRIDE_EVENT_OIF of program /1BCWDY/0O2TST5VUWTCNOS8226Y==CP

Method: IWCI_IF_FPM_OIF_CONF_EXIT~OVERRIDE_EVENT_OIF of program /1BCWDY/0O2TST5VUWTCNOS8226Y==CP

Method: GET_UIBBS_FOR_EVENT of program /1BCWDY/0O2TST5VUWTCNAR83UZE==CP

Method: IWCI_IF_FPM_FLOORPLAN_COMP~GET_UIBBS_FOR_EVENT of program /1BCWDY/0O2TST5VUWTCNAR83UZE==CP

Method: IF_FPM_FLOORPLAN~GET_UIBBS_FOR_EVENT of program CL_FPM_OIF_INTERNAL===========CP

Method: GET_NEXT_UIBBS of program CL_FPM========================CP

Thanks

Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

In general you should be really cautious about embedding FPM within other components. The FPM framework pretty much makes the assumption that it is the top level component. It isn't really supported to embed FPM within other components. If you want this kind of supporting navigation, SAP would really recommend the usage of the NetWeaver Portal or the NetWeaver Business Client.

ChrisPaine
Active Contributor
0 Kudos

I'd strongly agree with Thomas here.

And I'd also extend on his idea of using the NWBC or Portal to show this info.

In the portal you could reasonably easily have 2 iViews on a page, and have the navigation panel iView (your custom WDA) launch different FPM applications in the other iView just by doing portal navigation (launch new page, pass FPM application dynamically, if needs be, or navigation to a page which has nav app and FPM app statically configured. This way you'd be running the FPM as it was designed (as the top level application) and not have to worry about the issues in trying to make it do something it wasn't designed to do.

I'm assuming that there is some specially logic in your nav panel app that you can't replicate in standard portal/NWBC navigation.

Former Member
0 Kudos

Chris yes you are right, there is some special logic in the nav app,

that I can't do with NWBC.

If I would use a Portal to display the FPM within an Iframe.

What happends when I replace the FPM in the Iframe with a new

FPM/URl. Will the old FPM in the Iframe just disappear or will

the FPM shutdown and release all the acquired locks?

I already did a simliar thing where I just used URLs

to display an FPM application within an IView/IFrame.

But when I replace the URL of the IView/IFrame with a new URL/FPM,

the old FPM only just disappered but no locks where released.

So displaying the same FPM again, gives me a message that the Object is already

locked.

Thanks

Sebastian

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>But when I replace the URL of the IView/IFrame with a new URL/FPM,

the old FPM only just disappered but no locks where released.

Make sure you are using the correct iView type. There is a special iView for Web Dynpro ABAP. You never want to run Web Dynpro ABAP within an iFrame or a URL iView for just this reason - there is no session management when the application closes. However if you use the correct iView type and you perform your navigation using Portal APIs, everything should be clean.

Former Member
0 Kudos

Sounds like the NetWeaver Portal is the solution to my problem. - It's to bad that we don't have the portal installed and we have no license for this.

I think doing this without the portal all in W4DA is not possible, right?

Thanks

Sebastian

Former Member
0 Kudos

Hi Sebasitan, II know this is a very old thread, Did you utlimately achieve this?, I also have a similar requirement where I need to embed my FPM application into custom application. I cannot achieve this with NWBC as I am building a custom KIOSK application where I need to have inplace navigation.

Regards,

Raghavendra

Former Member
0 Kudos

Solved it...thanks

0 Kudos

Hey Hi ,

How did you resolve this issue.

Answers (0)