ABAP log

July 23, 2007

Displaying SAP error messages in a nice way.

Filed under: ABAP, SAP — abaplog @ 8:09 pm

One day I wanted to have my error messages displayed in a nice popup window (users just wanted it to be “RED” and shouting), but not with using the MESSAGE statement that either stops the processing or is shown just as “information” (type “I”). I tried this and that, and almost gave up to using a simple “information” message as I discovered that my colleague had a similar task. He had a luck to find the function module I needed: C14ALD_BAPIRET2_SHOW. His problem was that it takes a table of BAPIRET2 as an argument (with message class and number) but his messages were coming from an external system. This way, the message class did not exis, which SAP didn’t like, showing some strange output. However, he had a complete error message (in BAPIRET2-MESSAGE). We decided to split the message into four (or up to four) parts and pretend that we have actually the message 001 from the message class 00 (whose template looks like &1&2&3&4 and exists on all SAP systems). This way a user could see the complete message, not being screwed up by SAP like it does if it sees some unknown message class. And my task was even much simpler because everything was happening in one system (no problems with wrong message classes).

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: