Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: call(), return()
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
-
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"});
-
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
Learn how to demonstrate the event performed on the screen.
5 min
This article is part of the Conditional scripts tutorial.