cancel
Showing results for 
Search instead for 
Did you mean: 

FPM Error message not working during Popup window

Former Member
0 Kudos

Hi,

I've created an application configuration of HRTMC_EMPLOYEE_PROFILE, and included my own Web Dynpro component on one of the tabs. This component allows a new record to be added via a popup window. Within the popup, I have a From and To date, and want to validate that the From date is not after the To date. When this occurs, I issue an error message to stop the processing. The following code is contained in the ONACTIONOK event handler for the OK button in the popup:


  lr_api = wd_this->wd_get_api( ).

* Navigate from <CONTEXT> to <EDIT_TRAINING> via lead selection
  lo_nd_edit_training = wd_context->get_child_node( name = wd_this->wdctx_edit_training ).
  lo_el_edit_training = lo_nd_edit_training->get_element( ).

* Get all declared attributes of edited record
  lo_el_edit_training->get_static_attributes(
    IMPORTING
      static_attributes = ls_edit_training ).

  IF ls_edit_training-begda > ls_edit_training-endda.

    CALL METHOD lr_api->get_message_manager
      RECEIVING
        message_manager = lo_message_manager.

*   Report message
    CALL METHOD lo_message_manager->report_t100_message
      EXPORTING
        msgid = 'HRTMC_BASIS'
        msgno = 100
        msgty = 'E'.
  ENDIF.

However this does not result in an error message, and processing returns to the parent screen. I can't see what is wrong, particularly as (as far as I can see!) everything is identical to a standard component HRTMC_TP_WORKEXP_EXTERNAL which has similar processing. I know that for checking mandatory fields in a popup, you have to call cl_wd_dynamic_tool=>check_mandatory_attr_on_view - is there something similar for issuing messages within a popup?

A second problem I have is that I can't see where the FPM tab descriptions are being set. Within the application configuration I have entered my own descriptions, but these are being overridden at runtime.

Thanks in advance,

Vindaloo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

FPM has its own message manager. Try to use that instead of the WDA message manager.

Former Member
0 Kudos

I've used the WD message manager because this is what the standard component HRTMC_TP_WORKEXP_EXTERNAL uses, and I want to replicate how it works. Also, can the FPM message manager add a message to a popup window? I though that it would try to add it to its own message area on the calling screen, which would be no good.

I've solved the second problem myself - the controller for the component FPM_OIF_COMPONENT calls the method GET_UIBBS_FOR_EVENT, which then calls method OVERRIDE_EVENT_OIF. This is implemented in the WD component HRTMC_TP_CONFIG_CONTROL, which has some hard-coding in it to override the tab texts based on the mainview ID. So I've changed the Mainview ID to Z values and my own configured texts are now being retained

(Edited to add:)

This is implemented through the use of an Application-Specific configuration controller, which is a separate WD component (HRTMC_TP_CONFIG_CONTROL) that implements the interface IF_FPM_OIF_CONF_EXIT. This component has been provided to the FPM application via the configuration editor for the component configuration, using the Change->Global settings button.

Hope this helps someone else!

Vindaloo

Edited by: Vindaloo on Jun 16, 2011 2:41 PM