Hi Friends
We are working on ESS business package implemented on EP. For the users who do not have access to 'Working time', I am getting the following error message:
Exception condition "PROFILE_NOT_INITIALIZED" raised., error key: RFC_ERROR_SYSTEM_FAILURE
Exception condition "PROFILE_NOT_INITIALIZED" raised., error key: RFC_ERROR_SYSTEM_FAILURE
com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Exception condition "PROFILE_NOT_INITIALIZED" raised., error key: RFC_ERROR_SYSTEM_FAILURE at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:101)
at com.sap.xss.hr.cat.record.blc.RfcManager.rfcExecute(RfcManager.java:486)
at com.sap.xss.hr.cat.record.blc.RfcManager.init(RfcManager.java:864)
at com.sap.xss.hr.cat.record.blc.wdp.InternalRfcManager.init(InternalRfcManager.java:247)
at com.sap.xss.hr.cat.record.blc.FcCatRecordInterface.onInit(FcCatRecordInterface.java:279)
and so on....
My requirement is to catch this error message in EP or using WebDynpro, and display a proper error message for this.
Do anybody have an idea, how it can be accomplished?
with thanks
amit
hi amit,
after executing the RFC in the exception use this code.
final Writer wr = new StringWriter();
final PrintWriter pw = new PrintWriter(wr);
e.printStackTrace(pw);
wdComponentAPI.getMessageManager().reportSuccess("Error:" + wr.toString());
wdComponentAPI.getMessageManager().reportSuccess("Error:" + e.getMessage());
Regards,
Gopi
Hi gopi
Thanks for the input, but this doesnt work. Actually this is an unrecoverable exception and if I write the code as told by you, it gives a webdynpro error. However as of now I have been able to change the error message by writing following line of code:
msgMgr.deleteAllMessages(wdThis.wdGetAPI().getComponent());
msgMgr.raiseException(wdThis.wdGetAPI().getComponent(),"RFC_ERROR_SYSTEM_FAILURE","@link#PROFILE_NOT_INITIALIZED","You are not allowed to view this page");
But the stack trace still remains there. My problem will be solved even if we are able to remove the trace. Can you please help me in this regard.
with thanks
amit
Add a comment