If the function call ends with an "exception", no error message is shown to the user. To capture the exception use variable.exception
rfcresult = call("BAPI_USER_GET_DETAIL", {"in.USERNAME":"&V[_user]", "out.LOGONDATA":"z_logondata", "table.PARAMETER":"z_parameters"});
if(rfcresult.exception){
return('E: '+rfcresult.exception);
}
Please refer to below link on how to call a function module:
http://www.guixt.com/forum/index.php?topic=45.msg49#msg49