Skip to Content

add UIBB in OVERRIDE_EVENT_OIF

Hi Friends,

I have a FPM with a coupla of Mainviews, Subviews and UIBB's.

When I start the application, in componentcontroller of webdynpro component I use OVERRIDE_EVENT_OIF to add a new UIBB.

It works for the first time. It's proceeding GET_DEFAULT_CONFIG, GET_DEFINITION and GET_DATA.

Now I have a button and when I press this button I come to the OVERRIDE_EVENT_OIF again.

There I remove the UIBB with io_oif->REMOVE_UIBB and I add a new one with io_oif->ADD_UIBB and

the same parameters.

But this time it only passes the GET_DATA method and it does not pass the GET_DEFAULT_CONFIG, GET_DEFINITION methodes.

It seems there is still something left.

Is there a way to go through the methods GET_DEFAULT_CONFIG, GET_DEFINITION again?

Thanks for help.

Rg. Joerg

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on May 22, 2013 at 07:54 AM

    Hello Jörg,

    FPM only creates one component instance per UIBB Instance key, which is defined by structure FPM_S_UIBB_INSTANCE_KEY. If you remove a component via IO_OIF->REMOVE_UIBB, it is only removed from the View assembly - the component isn't destroyed. After adding it again the same instance will be reused and therefore it will not be instanciated again.

    The best way to circumvent this behaviour depends on your basis release:

    • Starting with 7.03/7.31 SP5 there is the concept of dynamic configurations for (G)UIBBs in FPM. Basically this works by adding the interface IF_FPM_GUIBB_DYNAMIC_CONFIG to your feeder class and returning ABAP_TRUE from it's only method. Then at runtime it's possible to enforce the re-instantiation by raising the FPM event IF_FPM_CONSTANTS=>GC_EVENT-INVALIDATE_UIBB and passing the list of UIBBs to be reinstantiated as event parameter IF_FPM_CONSTANTS=>GC_EVENT-LIST_OF_INSTANCES (of type FPM_T_COMPONENT_INSTANCE_KEY).
    • For 7.02 ff. there is the option to provide a new instance ID when re-adding the UIBB. This way you will get a new instance of your UIBB and GET_DEFAULT_CONFIG and GET_DEFINITION will be called again (but be aware that the old instance won't be destroyed, so whenever you add a UIBB with a new instance ID memory consumption will increase)

    Please be aware that although you get a new UIBB instance only the WebDynpro component is reinstantiated. This will cause new calls to GET_DEFAULT_CONFIG and GET_DEFINITION. Nevertheless the feeder won't be reinstantiated as feeder instances are shared between all GUIBBs using the same class with the same parameter set (as long as wiring isn't used).

    Best regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Pradeep,
      this interface is meant to be implemented in feeder classes for Generic UIBBs (GUIBBs) such as the List UIBB or the form UIBB, where the WD component is provided by the FPM framework, while the application provides only a feeder class. If you are using a freestyle UIBB, you can re-instantiate it using the same mechanism (by raising event IF_FPM_CONSTANTS=>GC_EVENT-INVALIDATE_UIBB) but there is no need to implement this interface (as there is no such thing as a feeder class).

      This interface is only necessary to inform the framework that this feeder class is using a dynamic configuration (the interface's signature is quite small). The configuration editor then offers only very limited configuration options and at runtime FPM takes care that feeder method GET_DEFAULT_CONFIG is called at the appropriate point in time.

      Best regards,

      Christian

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.