cancel
Showing results for 
Search instead for 
Did you mean: 

How to Catch BAPI Application Errors?

Former Member
0 Kudos

Is there a way to catch BAPI execution errors and display a custom message?

Currently it seems that if the RETURN table from a bapi contains a record with a type of 'E' then an "Application Message" pops up with text similar to "An error was returned from the back end system..." How can you customize/suppress what gets displayed instead?

If there were a way to validate the data before executing the bapi via a guard condition then I would, but in this case that just can't be done.

Thanks.

VC 9

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hmm, I seem to be having the same issue, when i do a single test in any of the systems(back end or the dataservice test in EP), I dont get the error message.

and there doesnt seem to be a way of supressing this by creating a wrapper too

Former Member
0 Kudos

I guess you can find this info in the Portal logs.

Former Member
0 Kudos

Hello,

I haven't a solution, but I suggest, that you try it with a RFC function module, which calls the BAPI, then you do your validation and exception handling in the RFC function module.

Best Regards,

Marcel

Former Member
0 Kudos

Marcel,

Thanks for the post.

I've thought of the same. It seems hard to believe there is no way to handle this situation in VC without wrapping every RFC/BAPI call in yet another RFC or web service.

Given the nature of this tool <b><u>the ability to handle errors via the Return table is a MUST HAVE feature</u></b>! We may want to give our users options based upon what's in the Return table! If I'm missing something here, feel free to chime in.

Have you noticed that when you "Test" the data service calling the same bapi with the same input parameters you do not get the error popup? You can actually see what's in the Return table. So clearly when you compile your app there's some global error handling going on that is not included when you're just testing the data service.

VC Guys, we need it to work like it does when you test! We need to be able to interrogate the Return table without the Application Error popup getting in the way.

gerhard_lang
Explorer
0 Kudos

Hello Damon,

I´m dealing with the same issue and I fully agree with your requirements. I thought it´s my fault that it is not working or my version (VC7) isn´t capable of this.

Regards

Gerhard

Former Member
0 Kudos

Hi Damon,

I will send a link to this thread to a moderator colleague of SAP who is working together with the VC developers maybe he could pass the information to the developers.

Best Regards,

Marcel

former_member4251
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Damon & Marcel,

The problems is more related to the nature of the datasource (could be a BW query, SQL sp, BAPI or WS), however each time you include a data service element into the model you can test it by:

- right click over the element

- test dataservice

- execute (check the input fields and you can add more)

With this test you are able to check if the data service is working as expected and then make the adjust on the BAPI (or others) or in the input values.

By using the tools in this way you're able to check the model during design time and make it useful.

But let's talk about runtime mode, if you got a problem with a model already deployed you can use an http trace to check if the vcbroker is failing, or if the problem if with the BAPI (or others).

For this case (runtime) the developers are working on already, the log's new feature will be released in few SP's for NW2004s version.

Hope you find this information useful.

Kindest Regards,

Luis

Former Member
0 Kudos

Hi Luis,

thanks for the quick reply. I hope this helps the VC developers out there.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcel,

I ran into this problem as well when trying to use VC as front end for Travel Mgt. I solved this issue using custom RFC and renaming the RETURN parameter to RETURN2. After doing this, VC no longer intercepted with the Application Message popup. This allowed me to handle errors and messages within the VC application in a more user friendly manner.

Hopefully this will help others with this issue prior to any fixes by VC developers.

John