Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member93896
Active Contributor

(Update April 2014:  Added example implementation for getting messages for context details when using web-based solutions)




Hello Friends,


you might find that the generic messages of BI-IP that are created when you execute planning functions and sequences are to substantial and not understandable for the end user. Therefore you require some functionality to filter or modify the messages that are presented to the planning users. For example you want to differentiate between an unsuccesful validation function and a "real error".

Standard Solution


Currently there is no standard functionality available to address this issue.

Custom Solution


The suggested solution works very similar to the one described in my blog on suppressing messages in BI queries which you can find How To Suppress Messages Generated by BW Queries.

The BI-IP messages are read by the front-end using function module RSPLFR_SERVICE_LOG_READ. To filter or modify these messages you can implement you own logic in the implicit enhancement spot at the end of this function module.
FUNCTION rsplfr_service_log_read.
...
     APPEND ls_log TO e_t_log.
  ENDLOOP.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$

*$*$-Start: (2 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  Z_ENHANCE_MESSAGE_FILTER.    "active version
* You can filter the messages here. For example:
  delete e_t_log where id = 'RSPLF' and number = '113'.

ENDENHANCEMENT.
*$*$-End:   (2 )--------------------------------------------------------------------------------$*$*
ENDFUNCTION.

Enhancements are modification free. 🙂 If you want to know more about enhancement options and how to implement them, please check the online documentation at http://help.sap.com/saphelp_nw70/helpdata/EN/a0/47e94086087e7fe10000000a1550b0/frameset.htm.

Update: For BW release 7.30 or higher, please implement SAP Note 1983009 (http://service.sap.com/sap/support/notes/1983009) and apply your filter logic to both E_T_MSG and E_T_LOG (which one is used depends on the type of user interface).

Update: When using web-based user interfaces, the context information for planning functions is not shown, for example when reference data is missing. You can use the following enhancement code to display these messages.
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  Z_ENHANCE_MESSAGE_CONTEXT    "active version

  IF e_t_msg IS REQUESTED.
    CLEAR e_t_msg.

    LOOP AT lt_msg_handle INTO ls_msg_handle.
      CLEAR ls_log.
      CALL FUNCTION 'BAL_LOG_MSG_READ'
        EXPORTING
          i_s_msg_handle = ls_msg_handle
        IMPORTING
          e_s_msg        = ls_msg
        EXCEPTIONS
          OTHERS         = 0.

      IF lines( ls_msg-params-t_par ) > 0.
        READ TABLE ls_msg-params-t_par INTO ls_par WITH KEY parname = 'FUNCNR'.
        l_funcnr = ls_par-parvalue.
        IF sy-subrc = 0 AND ls_logdetail-funcnr <> l_funcnr.
          CLEAR ls_msg.
          MESSAGE i301(rsplf) INTO ls_log2-message.
          ls_msg-msgty = sy-msgty.
          ls_msg-msgid = sy-msgid.
          ls_msg-msgno = sy-msgno.
          ls_msg-msgv1 = sy-msgv1.
          ls_msg-msgv2 = sy-msgv2.
          ls_msg-msgv3 = sy-msgv3.
          ls_msg-msgv4 = sy-msgv4.
          APPEND ls_msg TO e_t_msg.

          READ TABLE gts_logdetail INTO ls_logdetail WITH KEY funcnr = l_funcnr.
          IF sy-subrc = 0.
            PERFORM convert_charsel USING ls_logdetail-t_charsel CHANGING lt_showsel.
            LOOP AT lt_showsel INTO ls_showsel.
              CLEAR ls_msg.
              IF ls_showsel-high IS INITIAL.
                MESSAGE i302(rsplf) WITH ls_showsel-txtsh ls_showsel-low INTO ls_log2-message.
              ELSE.
                MESSAGE i303(rsplf) WITH ls_showsel-txtsh ls_showsel-low ls_showsel-high INTO ls_log2-message.
              ENDIF.
              ls_msg-msgty = sy-msgty.
              ls_msg-msgid = sy-msgid.
              ls_msg-msgno = sy-msgno.
              ls_msg-msgv1 = sy-msgv1.
              ls_msg-msgv2 = sy-msgv2.
              ls_msg-msgv3 = sy-msgv3.
              ls_msg-msgv4 = sy-msgv4.
              APPEND ls_msg TO e_t_msg.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
      APPEND ls_msg TO e_t_msg.
    ENDLOOP.
   
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*
ENDFUNCTION.

Best,
Marc Bernard
@marcfbe
28 Comments