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: 
lei_su
Advisor
Advisor
0 Kudos
The Message Monitoring app is the next-generation message monitor of SAP Application Interface Framework, based on SAP Fiori, bringing you an ultimate experience. It will be a frequently asked question how to navigate to the Message Monitoring app from another app for a certain interface or message. In this blog post you can find the answer.

For more information regarding this new feature, see New Message Monitoring features with SAP S/4HANA Cloud 2008 shipment.

Forward Navigation to a certain interface in the Message Monitoring


In order to navigate to a certain interface in the Message Monitoring from another app, you have to call the Intent-Based Navigation: Use Semantic Object ‘AIFMessage’ and Semantic Action ‘startMessageMonitoring’, and the following mandatory or optional parameters.









































Parameter Name Parameter Value Comment
NS your namespace Mandatory
IFNAME your interface name Mandatory
IFVER your interface version Mandatory
STATUS E, S, W, I, C

Optional

(Only one status supported)
FROM

any DateTime of type Edm.DateTimeOffset

(e.g. 2020-11-01T00:00:00Z)
Optional
TO

any DateTime of type Edm.DateTimeOffset

(e.g. 2020-11-14T23:59:59Z)
Optional


Here is a sample code for navigating to a certain interface in the Message Monitoring app from the frontend:












// navigate to message monitoring app to check AIF interface /AIFT CUST_WS_I 00001 in a specified time range

var oIntent = {

    target: {

        semanticObject: "AIFMessage",

        action: "startMessageMonitoring"

    },

    params: {

        "NS""/AIFT",

        "IFNAME""CUST_WS_I",

        "IFVER""00001"

    }

};

oIntent.params.FROM = "2020-11-01T00:00:00Z"// replaced by a variable containing the FROM date in your case

oIntent.params.TO = "2020-11-14T23:59:59Z"// replaced by a variable containing the TO date in your case

var oCrossAppNav = sap.ushell.Container.getService("CrossApplicationNavigation");

if (oCrossAppNav) {

    oCrossAppNav.toExternal(oIntent);

}






Here is a sample code for navigating to a certain interface in the Message Monitoring app from the backend:












* navigate to message monitoring app to check error messages in AIF interface /AIFT CUST_WS_I 00001

DATA:

lt_parameters  TYPE tihttpnvp,

ls_parameter   LIKE LINE OF lt_parameters.



ls_parameter-name = 'NS'.

ls_parameter-value = '/AIFT'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'IFNAME'.

ls_parameter-value = 'CUST_WS_I'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'IFVER'.

ls_parameter-value = '00001'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'STATUS'.

ls_parameter-value = 'E'.

APPEND ls_parameter TO lt_parameters.


cl_lsapi_manager=>navigate_to_intent(

 object = 'AIFMessage'

 action = 'startMessageMonitoring'

 parameters = lt_parameters

 navigation_mode = 0 ).






Forward Navigation to a certain message in the Message Monitoring


In order to directly navigate to a certain message’s detail in the Message Monitoring from another app, you have to call the Intent-Based Navigation: Use Semantic Object ‘AIFMessage’ and Semantic Action ‘startMessageMonitoring’, and the following parameters. This forward navigation to a certain message's detail is available only in 2102 delivery of SAP S/4HANA Cloud or later.


























Parameter Name Parameter Value
NS your namespace
IFNAME your interface name
IFVER your interface version
MSGGUID your message guid


Here is a sample code for navigating to a certain message's detail in the Message Monitoring app from the frontend:












// navigate to message monitoring app to check a certain message in interface /AIFT CUST_WS_I 00001

var oIntent = {

    target: {

        semanticObject: "AIFMessage",

        action: "startMessageMonitoring"

    },

    params: {

        "NS""/AIFT",

        "IFNAME""CUST_WS_I",

        "IFVER""00001"

    }

};

oIntent.params.MSGGUID = "00505695007C1EDAA6E511728E81DCB1"// replaced by a variable containing the MSGGUID in your case

var oCrossAppNav = sap.ushell.Container.getService("CrossApplicationNavigation");

if (oCrossAppNav) {

    oCrossAppNav.toExternal(oIntent);

}






Here is a sample code for navigating to a certain message's detail in the Message Monitoring app from the backend:









* navigate to message monitoring app to check a certain message in interface /AIFT CUST_WS_I 00001

DATA:

lt_parameters  TYPE tihttpnvp,

ls_parameter   LIKE LINE OF lt_parameters.



ls_parameter-name = 'NS'.

ls_parameter-value = '/AIFT'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'IFNAME'.

ls_parameter-value = 'CUST_WS_I'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'IFVER'.

ls_parameter-value = '00001'.

APPEND ls_parameter TO lt_parameters.


ls_parameter-name = 'MSGGUID'.

ls_parameter-value = '00505695007C1EDAA6E511728E81DCB1'. " replaced by a variable containing the MSGGUID in your case

APPEND ls_parameter TO lt_parameters.


cl_lsapi_manager=>navigate_to_intent(

 object = 'AIFMessage'

 action = 'startMessageMonitoring'

 parameters = lt_parameters

 navigation_mode = 0 ).


Using these sample codes, you can try out for yourself how to navigate to the Message Monitoring app from another app. This greatly improves the way you use and experience SAP Application Interface Framework and its Message Monitoring capabilities.

When you have tried out the new feature, feel free to share your feedback and thoughts in the comments.