cancel
Showing results for 
Search instead for 
Did you mean: 

Custom (user friendly) error message if JCO connection fails

Former Member
0 Kudos

Hi!

We are using WebDynpro inside Enterprise Portal NW04 SP16.

During maintenance work on backend side (e.g. R/3 or CRM) our users get

the following error inside the WebDynpro application:

Could not create JCOClientConnection for logical System:

NAME_OF_JCO_MODELDATA - Model: class

some.name.model.Class.

Please assure that you have configured the RFC connections and/or logical

system name properly for this model!

We would like to display a more user friendly error message to our users and customers. How can this be achieved?

I opened OSS call regarding this topic. The answer was that customizing these error messages is not supported in NW04 and NW04s but we would have the possibility in 7.10 However we could try using some kind of error handling like this:

try {

    input.modelInstance().getCurrentlyUsedJcoClient(); //ignore returned JCO.Client, just check for exception

} catch (WDDynamicRFCException ex) {

    //check for this specific exception via text. NOTE: SAP does not guarantee this text remains stable in future SPs / releases

    if (ex.getMessage().indexOf("Please assure that you have configured the RFC connections and/or logical system name properly for this model") != -1) { 

    //do further own error handling, e.g. via WD message manager + some log output using the logger of the WD controller

    return;

}

The drawback is that we have to change code in all applications we developed .-( Does anybody of you know a better way?

Best Regards

Christian Schramm

Accepted Solutions (1)

Accepted Solutions (1)

former_member85655
Active Participant
0 Kudos

Hi Christian,

There is a proposal to have customizable error pages in Webdynpro. But this will only be available only next year in the least. It might come with a Service pack of 7.10.

Regards,

Arun

Answers (1)

Answers (1)

former_member182294
Active Contributor
0 Kudos

Hi Christian,

Create a common DC and write a method which accepts the Model Instance as the input parameter. Write same code which checks the connection as you mentioned. Add the new DC as Used DC in all your applications and just call the method with Model Instance as Paramter. This still requires some changes in all your existing appliations but future maintance also easy.

Regards

Abhilash

Former Member
0 Kudos

Thanks for replying but honestly I am searching for a solution where I don't have to make code changes.

Regards,

Christian