cancel
Showing results for 
Search instead for 
Did you mean: 

catch a bapi crash

Former Member
0 Kudos

Hi,

I have made some adjustments to the UWL config file and now I am able to catch the workitem number and this one is a input parameter for a bapi. But it happens that people change the file and my configuration is lost. How can I catch up the error message and show something else.

try

{

Y_Tf_Get_Workitem_Info_Input inputWGI1= new Y_Tf_Get_Workitem_Info_Input();

inputWGI1.setWorkitem_Id(WDWebContextAdapter.getWebContextAdapter().getRequestParameter("wi_id"));

wdContext.nodeY_tf_Get_Workitem_Info_Input().bind(inputWGI1);

wdContext.currentY_tf_Get_Workitem_Info_InputElement().modelObject().execute();

wdContext.nodeOutputWIGetInfo().invalidate();

}

catch (Exception ex)

{

ex.printStackTrace();

}

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Eoin,

model class execute method throws WDDynamicRFCExecuteException. You can report it using messgae manager:


wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);

Best regards, Maksim Rashchynski.