Lazy Loading in Floorplan Manager

FPM provides different processing modes for the collapsed UIBB in FPM application and this is an application wide setup.

0.png

Proc Mode:

Participate- The collapsed uibb feeder class called during the event loop.

Defer participation/Lazy Loading- The collapsed UIBB feeder class doesn’t gets called during any other events , but only when the collapsed uibb is expanded.


The lazy loading set up works for the UIBB unless until the uibb  is not set as any source in wiring. If  the uibb configuration is set as wire source then it participates in the event loop irrespective of the proc. mode.


The below example tries to explain the lazy loading of the collapsed uibb in fpm ovp application. The step as 1. creating a form uibb with feeder class in  an ovp application. 2. Dynamically collapsing the uibb . 3- Testing the lazy Loading .

Feeder class of teh form uibb with implemented interfaces.

1

Put down the code in GET_DEFINITION & GET_DATA method.

23

Put a break point in the very first of the GET_DATA method. 

4

Create an application controller class and implement the interfaces. activate all methods.

9

Create an OVP application and assign the application controller class.

56

Create a form uibb configuration( rendering type – with panel).

7

Assign the feeder class and add some fields to uibb.

8

Put some code in the OVERRIDE_EVENT_OVP method to collapse the uibb when application is first launched.

10


    DATAlr_event TYPE REF TO cl_fpm_event,
                  lr_fpm   TYPE REF TO if_fpm,
                  lt_uibb  TYPE if_fpm_ovp=>ty_t_uibb.
    lr_fpm cl_fpm_factory=>get_instance).
    lr_event  io_ovp->get_event).
    CASE lr_event->mv_event_id .
      WHEN ‘FPM_START’.
        io_ovp->get_uibbs(
         EXPORTING
            iv_content_area ‘PAGE_1’
          IMPORTING
            et_uibb         =  lt_uibb  ).
        READ TABLE lt_uibb  ASSIGNING FIELDSYMBOL(<fs_uibb>)
             WITH KEY config_id ‘ZCC_FLIGHT_FORM’.
        IF sysubrc IS INITIAL.
          <fs_uibb>collapsed abap_true.
          io_ovp->change_uibb(
            EXPORTING
              is_uibb  =  <fs_uibb> ).
        ENDIF.
      WHEN OTHERS.
    ENDCASE.


11

12

TEST THE APPLICATION.

13

The feeder class is called and the event triggered is FPM_START.

14

Initially it is collapsed and expand the uibb.

15

again the feeder class is called.

16

17

Here we have the UIBB with data.

18

in above case though the uibb is collapsed the uibb feeder class is called during the initial launch of application. Now change the Proc Mode for the collapsed uibb.

19

Set it as Defer participation/lazy loading and SAVE the settings. 

20

Test the application.

21

The UI displayed without calling the feeder class( already we have set a breakpoint in GET_DATA method of the feeder class, break point doesn’t trigger). This is FPM lazy loading of the collapsed uibb. Expand the uibb.

22

here the debugger is triggered.

232425



 

One comment

Leave a Reply