2007 Jul 17 4:06 AM
hi,
when calling a FM 'L_TO_CREATE_TR', a error 'Storage type xx does not allow negative stock figures' occurs, and the process popup E message text at status line, so the program is stoped !
while i want to process the error in program, how to do to avoid the ECC popup this error text when calling this FM?
Thanks advanced!
2007 Jul 17 8:42 AM
In you call function EXCEPTION add the following
<i><b>ERROR_MESSAGE</b>: This exception instructs the system to ignore S messages, I messages and W messages until return from the function module (although they still appear in the log during background processing). When an E message or an A message occurs, the called function module terminates, as if the exception <b>ERROR_MESSAGE</b> has been triggered.
</i>
(...)
EXCEPTIONS
FOREIGN_LOCK = 1
QM_RELEVANT = 2
TR_COMPLETED = 3
XFELD_WRONG = 4
LDEST_WRONG = 5
DRUKZ_WRONG = 6
TR_WRONG = 7
SQUIT_FORBIDDEN = 8
NO_TO_CREATED = 9
UPDATE_WITHOUT_COMMIT = 10
NO_AUTHORITY = 11
PREALLOCATED_STOCK = 12
PARTIAL_TRANSFER_REQ_FORBIDDEN = 13
ERROR_MESSAGE = 14
OTHERS = 15.You message will trigger the ERROR_MESSAGE exception and SY-SUBRC = 14.
Regards
In you call function EXCEPTION add the following
<i><b>ERROR_MESSAGE</b>: This exception instructs the system to ignore S messages, I messages and W messages until return from the function module (although they still appear in the log during background processing). When an E message or an A message occurs, the called function module terminates, as if the exception <b>ERROR_MESSAGE</b> has been triggered.
</i>
(...)
EXCEPTIONS
FOREIGN_LOCK = 1
QM_RELEVANT = 2
TR_COMPLETED = 3
XFELD_WRONG = 4
LDEST_WRONG = 5
DRUKZ_WRONG = 6
TR_WRONG = 7
SQUIT_FORBIDDEN = 8
NO_TO_CREATED = 9
UPDATE_WITHOUT_COMMIT = 10
NO_AUTHORITY = 11
PREALLOCATED_STOCK = 12
PARTIAL_TRANSFER_REQ_FORBIDDEN = 13
ERROR_MESSAGE = 14
OTHERS = 15.You message will trigger the ERROR_MESSAGE exception and SY-SUBRC = 14.
Regards
2007 Jul 17 7:53 AM
Hi edgar
using sy-subrc, check where the error occurs in you code and then catch that exception using exception handling. Then you wont have this pop up.
Regards
Ravish
2007 Jul 17 8:42 AM
In you call function EXCEPTION add the following
<i><b>ERROR_MESSAGE</b>: This exception instructs the system to ignore S messages, I messages and W messages until return from the function module (although they still appear in the log during background processing). When an E message or an A message occurs, the called function module terminates, as if the exception <b>ERROR_MESSAGE</b> has been triggered.
</i>
(...)
EXCEPTIONS
FOREIGN_LOCK = 1
QM_RELEVANT = 2
TR_COMPLETED = 3
XFELD_WRONG = 4
LDEST_WRONG = 5
DRUKZ_WRONG = 6
TR_WRONG = 7
SQUIT_FORBIDDEN = 8
NO_TO_CREATED = 9
UPDATE_WITHOUT_COMMIT = 10
NO_AUTHORITY = 11
PREALLOCATED_STOCK = 12
PARTIAL_TRANSFER_REQ_FORBIDDEN = 13
ERROR_MESSAGE = 14
OTHERS = 15.You message will trigger the ERROR_MESSAGE exception and SY-SUBRC = 14.
Regards
2024 Sep 11 9:29 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |