Liquid UI - Documentation - 23.15 Get exception detail of a function module call

23.15 Get exception detail of a function module call


Prerequisites


Purpose

Learn how to display the exception occurred during the function module call. You can capture the exception occurred during the function module call using the variable.exception when no error message is displayed. We will walk you through the following steps.

  • Call a function
  • Display RFC exception message

//Create this file inside your script folder for customizing SAP Easy Access screen: SAPLSMTR_NAVIGATION.E0100.sjs
//Now let's start adding the content to the above file

  1. Call BAPI_USER_GET_DETAIL function module to verify the user logon details.
     rfcresult = call("BAPI_USER_GET_DETAIL", {"in.USERNAME":"&V[_user]", "out.LOGONDATA":"z_logondata", "table.PARAMETER":"z_parameters"});
    
     
  2. Add a condition to check the rfcresult.exception raised during a function module call. You will see a status message displaying the exception message.
    if(rfcresult.exception){
       message('E: '+rfcresult.exception);
    } 
     

Note: To know more about how to call a function module, click here.


Next Steps

Display event performed using eventid option and _eventid system variable
Learn how to demonstrate the event performed on the screen.

5 min

This article is part of the Conditional scripts tutorial.


Can't find the answers you're looking for?