-1

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?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89

1 Answers1

1

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.
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89