cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve error messages

Former Member
0 Kudos

I have a chart on my webpage. If the query mapped to the chart throws an SQL error, I need to display an error message to the user along with the error description. By default, the chart displays 'No data available' in such cases. Can anybody help me on this?

(I want to avoid executing the query once more using an iCommand applet. Is there any way to get the same details returned by the getLastError() method of the iCommand applet for charts?)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amrita,

Actually we faced a similar scenario. But we didn't have to give the error of SQL error but we need to show the output of the return the response of a BAPI while creating a notification in SAP. For that we populated the data in a hidden grid and displayed it accordingly using a message box.

I hope it helps.

Regards,

Musarrat

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

The 'No Data Available' message is intentionally produced by all applets, not just the iChart since it would provide no value for the user to see a nasty error message with SQL syntax spewed into the screen. The actual fatal error message is logged to the Java Console and the user can see it here if necessary, but instead of attempting to fix this after the fact, why not avoid the SQL error in the first place!?

Whenever a FatalError is produced it actually closes that particular connection in the JDBC connection pool, so from an efficiency standpoint it is much better to avoid the errors initially instead of trying to blindly show them to the user after they've happened.

Regards,

Jeremy

Former Member
0 Kudos

Thanks Jeremy! The requirement is such that the user will be generating the query dynamically through selection of various parameters on the screen and if it is incorrect, he should be shown the actual fatal error message instead of 'No Data Available'. Is there any way to get around this?

Former Member
0 Kudos

Hi,

you can use BLS.

create a document.

call the query and check whether the query is successfully excuted or not. if yes assign the output to doc. if no, assign the error message(you can use fatal error or message). then assign the output of the doc to output of transaction.

I hope this may help you

Regards,

Kishore