2011 Mar 21 3:56 PM
Hi,
im using FM 'L_TO_CANCEL' and I need to show all errors coming from this FM on the job log. Do I need to create a message for every exception? How should i do it?
Thanx!
2011 Mar 21 5:21 PM
just hard code message type to 'S'.
there is one more way, i hope you are running that FM in side a loop, so keep storing the exceptions in a table and finally display the table as output.
Hi,
im using FM 'L_TO_CANCEL' and I need to show all errors coming from this FM on the job log. Do I need to create a message for every exception? How should i do it?
Thanx!
2011 Mar 21 4:09 PM
There will be only one exception at a time, so you probably only need something like
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.depending on how the FM issues the messages with the RAISING option.
If you don't want the job to cancel, you can hard code the TYPE as 'I' or 'S'.
Thomas
2011 Mar 21 5:06 PM
2011 Mar 21 5:19 PM
Please invest some own research effort as well. The short dump text will tell you the invalid value. Check for a blank SY-MSGTY before issuing the message. Oh, and include my snippet in IF SY-SUBRC >< 0, obviously.
Once again, please try solving things yourself first.
Thomas
2011 Mar 21 5:21 PM
just hard code message type to 'S'.
there is one more way, i hope you are running that FM in side a loop, so keep storing the exceptions in a table and finally display the table as output.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |