on 10-18-2004 7:34 AM
<b>Hi All
When trying to execute the function
we should get either the BAPI results (RECORD) if there is a record or it shall return the BAPI return with the error message
The problem I have in the below code is:
In the try-catch block, if the record is null, it does not execuute the rest of block which has the BAPI return of the error message.
I need to get the error message returned by the BAPI to display it to the user in his selection screen.
Any help in that?
please it is an urgent matter
Thank you in advance
</b>
===================================
try {
client.execute(function);
JCO.ParameterList table = function.getExportParameterList();
tableCr = table.getStructure("RECORD");
JCO.ParameterList tableE = function.getTableParameterList();
tableErr = tableE.getTable("RETURN");
str_err_type = tableErr.getString("TYPE");
str_err_mess = tableErr.getString("MESSAGE");
myBean.setErrMsgType(str_err_type);
if (str_err_type.equalsIgnoreCase("S") )
{
myBean.setErrMsg(str_err_mess);
}
try{
if (tableErr.getString("TYPE").equals("E") )
{
myBean3.setErrMsg(str_err_mess);
ipcSession.putValue("sesBenefitsStatInfoBeanErr",myBean3);
}
}
catch(Exception errEx){
}
}
catch (Exception ex3){
}
try
{
if ((emp_pernr.equals("")) || (emp_pernr.equals("00000000")) ||
(term_date.equals("")) || (gosi_date.equals("")) )
{
}
else
{
processBAPI();
}
}
catch (Exception e1)
{
}
It is not a standard BAPI
Z_BAPI_ZHFSS
but the same procedure will be applied to all BAPIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
can you tell us the Name of the BAPI your calling?
Please Post code with [code ] [/code ] tags, so it becomes more readable.
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.