I am creating a BOM in SAP with function module CSAP_MAT_BOM_CREATE
and I get an error.
Where can I see detailed error messages?
Answer 1
Function Module CSAP_MAT_BOM_CREATE writes into the application log.
Start Transaction SLG1 with object = CAPI and subobject = CAPI_LOG
When there is still nothing to see:
Answer 2
When there is an error, one is tempted to make a rollback. With this rollback, the error messages are also rolled back from the database, so you can't see them.
So contrary to BAPIS, a good way to call this function module is
CALL FUNCTION 'CSAP_MAT_BOM_CREATE'...
if sy-subrc <> 0.
write: / 'For error details see transaktion SLG1 object CAPI subobject CAPI_LOG'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
endif.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.