Skip to Content
author's profile photo Former Member
Former Member

Catching error from R/3 in EP

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2007 at 08:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 12:26 PM

    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
    10|10000 characters needed characters exceeded

    • Former Member

      hi amit,

      <b> RFC_ERROR_SYSTEM_FAILURE</b> you get when there is a short dump in the RFC. check ST22 transaction in the R/3. The RFC is giving a short dump..

      The code i have given is to trace the error.

      to display the errors just loop through the Bapi or RFC Return node and display the message field when type is "E".

      wdComponentAPI.getMessageManager.reportException(message,boolean);

      Regards,

      Gopi

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 05:14 PM

    Hi,

    When a user in R/3 is assigned some roles, the profile needs to be generated to make those roles "active". Check with your admins if those profiles are activated.

    Hope it helps,

    Rajit

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.