Skip to Content

Wiring based on Business Objects in Floorplan Manager


In my previous blog post I compared the main data exchange possibilities to share data between UI Building Blocks (UIBBs) in the Floorplan Manager (FPM). The way of sharing data supported by the FPM Framework is called “Wiring”. There are a lot of good guides out there which show how wiring can be done. They usually utilize an example with a list which sends the selected column to another UIBB to show some detail data.

The problem with these examples is usually not the wiring mechanisms of the FPM or the way data is exchanged in general – moreover the way it is implemented.

Usually, the examples include a wire which goes via Lead selection from a certain List UIBB to a Form UIBB which shows the details of the record. The Wire connector contains an attribute of a single record described purely by an ABAP structure. This is misleading and is not the way large enterprise applications are implemented.

The problem with this approach is the fact that you are heading a dead end in most of the cases: What can the Form UIBB, which shows the detail data of the record do with the structure once there are some editable Input Fields showing the attributes of the structure?

Well, data can be written back to the structure and then what? How can the record be validated and saved on the database? If there is no function module to persist the data, you would need to use ABAP OO, and in the cases where we ourselves use the FPM in our own projects, there is always an ABAP OO Backend.

But you can’t call operations on structures. So either the Connector, to which the Form UIBB has access to, would have to persist the data afterwards or the Form UIBB would have to create its instance of the Business Object by itself in order to call something like a SAVE – Method.

Both solutions aren’t really a good idea in terms of maintainability and understandability. That’s why I wrote this blog post.


I set up a demo for this blog post in order to show the concepts which I used. The demo application comprises the following functionality:

  • Search flights (implemented by a Search UIBB)
  • Show number of results in the header area (OVP – Title)
  • Show a list of the results (implemented by a List UIBB)
  • Once the users selects an entry, a form UIBB shows the detail data

01 - Overview of the application.png

In order to make clear what the building blocks of the application are, I marked them for you. Of course, the OVP Floorplan title is not a Building block, rather a part of the header area of the OVP. For demo purposes, I also marked it since its information is also getting updated, hence, subject to the wiring mechanisms I will show you in detail.

02 - OVP-Floorplan, UIBBs and title of the application.png

Data sharing

Sharing selection criteria and the result list

There are two UIBBs involved in sharing the selection criteria and result list with each other. The header area of the OVP which shows the number of results is involved as well. All of them share one object with each other which has the responsibility of selecting all the data which fits to the selection criteria entered in the Search-Block.

The instance is typed as ZIF_FPM_DEMO_WIRE_FLIGHT_SEL. Please note that this is still an interface which describes only what an object needs to do – not how it is implemented.

The reason why this interface inherits ZIF_FPM_DEMO, which contains no methods and no attributes will be explained later on. There will be no further explanation here.


Wiring works based on this interface. Sharing the selection instance starts at the search UIBB. It fetches the selection criteria and pushes it to the data selection instance MO_CONTAINER of type ZIF_FPM_DEMO_WIRE.

METHOD if_fpm_guibb_search~process_event.
  CLEAR: et_messages, ev_result.
 lt_selopt            TYPE if_powl_easy_feeder=>typ_t_selection_parameter,
 ls_selopt            TYPE if_powl_easy_feeder=>typ_s_selection_parameter,
     lt_sel               TYPE rsdsselopt_t.
 <ls_sel>         TYPE rsdsselopt,
 <ls_selcrit>     TYPE fpmgb_s_search_criteria.
  DATA lo_cx_fpmgb TYPE REF TO cx_fpmgb.
  DATA ls_message TYPE fpmgb_search_s_t100_message.
  CASE io_event->mv_event_id.
    WHEN if_fpm_guibb_search=>fpm_execute_search.
          LOOP AT it_fpm_search_criteria ASSIGNING <ls_selcrit>.
 CLEAR ls_selopt.
 <ls_sel> = cl_fpm_guibb_search_conversion=>to_abap_select_option( <ls_selcrit> ).
 ls_selopt-attribute = <ls_selcrit>-search_attribute.
 ls_selopt-sign      = <ls_sel>-sign.
 ls_selopt-option    = <ls_sel>-option.
 ls_selopt-low       = <ls_sel>-low.
 ls_selopt-high      = <ls_sel>-high.
 APPEND ls_selopt TO lt_selopt.
        CATCH cx_fpmgb INTO lo_cx_fpmgb.
 ls_message-plaintext = lo_cx_fpmgb->get_text( ).
 ls_message-severity = if_fpm_message_manager=>gc_severity_error.
          APPEND ls_message TO et_messages.
 mo_container->set_selection_criteria( lt_selopt ).

If the instance does not yet exist, it is created at runtime during the wiring setup.

METHOD if_fpm_feeder_model~get_outport_data.
 try_get_container( ).
  CASE iv_port_identifier.
    WHEN zif_fpm_demo_wire_flight_sel=>gc_name.
      ro_data = mo_container.
METHOD try_get_container.
  CHECK mo_container IS INITIAL.
  IF mo_connector IS NOT INITIAL.
    mo_container ?= mo_connector->get_output( ).
    CREATE OBJECT mo_container TYPE zcl_fpm_demo_wire_flight_sel.

Targets are both the List – UI Building Block as well as an OVP Exit (which implements IF_FPM_OVP_CONF_EXIT) which is also implementing the Application Controller Interface (IF_FPM_APP_CONTROLLER) and the UIBB feeder model interface (IF_FPM_UIBB_MODEL). This way it can also serve as a target for wiring. This OVP Exit updates the application header title.

The list UIBB accesses the instance via the connector which has been passed by the FPM framework during wiring setup.

  DATA lo_datacontainer TYPE REF TO zif_fpm_demo_wire_flight_sel.
  CASE io_event->mv_event_id.
    WHEN if_fpm_guibb_search=>fpm_execute_search.
      lo_datacontainer ?= mo_connector->get_output( ).
      lo_datacontainer->apply_selection( ).
      mt_sflight = lo_datacontainer->get_list( ).

The OVP Exit receives the instance via its feeder model and hooks into the AFTER_PROCESS_EVENT-Method:

METHOD after_process_event .
  DATA lo_ovp TYPE REF TO if_fpm_cnr_ovp.
  lo_ovp ?= wd_this->mo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_ovp ).
  DATA lo_datacontainer TYPE REF TO zif_fpm_demo_wire_flight_sel.
  DATA lv_port_identifier TYPE fpm_model_port_identifier.
  DATA lv_title TYPE string.
  DATA lv_num TYPE i.
  DATA ls_content_area TYPE if_fpm_ovp=>ty_s_content_area.
  CHECK wd_this->mo_feeder_model IS NOT INITIAL.
 lv_port_identifier = zif_fpm_demo_wire_flight_sel=>gc_name.
 lo_datacontainer ?= wd_this->mo_feeder_model->get_outport_data( iv_port_type = 'LS' iv_port_identifier = lv_port_identifier ).
 ls_content_area = lo_ovp->get_current_content_area( ).
  CHECK: lo_datacontainer IS NOT INITIAL, lo_ovp IS NOT INITIAL.
  lv_num = lo_datacontainer->get_number_of_results( ).
  lv_title = lv_num.
  CONCATENATE 'Flight Search -' lv_title 'results' INTO lv_title SEPARATED BY space.
 ls_content_area-title = lv_title.
 lo_ovp->change_content_area_restricted( iv_content_area_id = ls_content_area-id iv_title = lv_title ).

03 - Wires of the application I.png

The wiring setup finalizes the implementation and makes clear what the data exchange directions are. The connector class which is used for that is ZCL_FPM_DEMO_FL_SEARCH_CONN. There will be two wires as both the flights result list as well as the OVP title need to be updated based on the flight results.

It contains an instance of type ZIF_FPM_DEMO_WIRE, the parent interface of the current business object’s interface.

05 - Wiring 01.PNG

05 - Wiring 02.PNG

Sharing the selected entry as a business object

The List UIBB which shows the flight results needs to setup another business object which does not contain a list of flights, rather the exact record, which has been selected by the user. The flight record is represented by an instance of type ZIF_FPM_DEMO_WIRE_SFLIGHT. It inherits from ZIF_FPM_DEMO as well as the previously introduced business object of type ZIF_FPM_DEMO_WIRE_FLIGHT_SEL.

04 - Wires of the application II.png

The business object currently only provides a Setter and a getter method to read the data structure or write a modified data structure back to the instance.


The wiring setup reuses the connector class ZCL_FPM_DEMO_FL_SEARCH_CONN as there is no special treatment needed for the exchange of the current business object.

As mentioned earlier, it contains an instance of type ZIF_FPM_DEMO_WIRE, the parent interface of both business object’s interfaces.

Now it is getting clear, what ZIF_FPM_DEMO_WIRE is used for. It is just a marker interface, which gives a hint, which business objects are shared across the application. As the connector references an instance of that type, it can be referencing both the selection as well as the flight record. There is no technical or functional requirement for that – the reason why I didn’t use a more generic REF TO OBJECT for the instance is the fact that I just wanted to make clear for someone who reads and needs to understand the code, what the intended context of the current connector is.

05 - Wiring 03.PNG

I didn’t implement any update operations for this demo, but it would be yet another method for the existing business object besides the SET_SFLIGHT( )-Method, for example SAVE( ).

Since the feeder has already access to the wired business object, it has also access to its public methods. The SAVE( )-method would implement the update operations and could be called directly from the form feeder which provides the UI operations for the flight details building block.

In contrast to a possible solution, where only a flat data structure was exchanged, this is a much more convenient way of accessing and modifying the data provided by the backend.

The nugget can be found here.

You must be Logged on to comment or reply to a post.
  • Hi Uwe, this is a great blog. Previously I’ve always shied away from wiring and used events as the wiring seemed to complex.

    A question though. I’ve tried to import the provided nugget using zsaplink version 0.1.5 alpha 2 but it shortdumps!

    I notice on the site there is a series of posts discussing this with people updating zsaplink to the latest daily build to get it to work; however I can’t update as it fails saying the CLAS plugin cannot be found. Weird. Is Saplink dead? The ADT update site doesn’t work either.

    • Dear Jason,

      this is strange. I would have expected the classes ZSAPLINK_OO and ZSAPLINK_CLASS to be part of the standard installation. I could provide you a transport request of the demo, if needed.

      Regards, Uwe

      • I’ll play around with saplink a bit more tomorrow. The version I have definitely doesn’t like your nugget file and seems to stuff up the handling of interfaces and nests them so the loaded source won’t activate. really looks like it needs some love. Seems that its dieing.  ;-(

      • Got it to work… Had to blow away everything to do with saplink and start again from the svn trunk versions.  😉 Required some code editing as well as saplink is doubling up the interface methods in each class. Great demo though!!  😉

  • Hi Uwe,

    Thanks for the detailed blog.

    I tried importing the nugget using SAP Link program . But it is dumping while importing a particular WDYN component  named  ZWDYN_FPM_DYNAMIC_CONTAIN

    The dump is  CX_WDY_MD_NOT_EXISTING .


    Moreover the imported classes are  giving syntax error while activating saying interface methods initialize already implemented (its getting conflict with IF_FPM_GUIBB~INITIALIZE and ilist interface IF_FPM_GUIBB_LIST~INITIALIZESaplinks_syntax_error.jpg )

      • Hi Uwe ,

        I am using the SAP LInks version 0.1.4 and I imported the daily nuggets file from your link but its still dumping  when importing  the Webdynpro component ZWDYN_FPM_DYNAMIC_CONTAIN