cancel
Showing results for 
Search instead for 
Did you mean: 

Commit problem with BAPI_ENTRYSHEET_CREATE

Former Member
0 Kudos
478

I am using two BAPIs to generate data in SAP.  BAPI_CATIMESHEETMGR_INSERT following by BAPI_ENTRYSHEET_CREATE.  The first step to create time entries and the second step to generate the costs.

The logic is to run

BAPI_CATIMESHEETMGR_INSERT

then

BAPI_ENTRYSHEET_CREATE

then

If success for both

        BAPI_TRANSACTION_COMMIT

Else

     BAPI_TRANSACTION_ROLLBACK

Endif.

The CATS BAPI runs successfully but we get an error in the ENTRYSHEET BAPI so the ROLLBACK is called.  The error itself is fine as an invalid g/l account is being passed in some instances and the BAPI handles this correct and reports the error correctly.

Unfortunately the CATS entries remain in SAP ... they have been committed although no commit was performed by the code.

Upon further investigation I am finding that the ENTRYSHEET BAPI is performing a commit although parameter NO_COMMIT = 'X' is being passed and the BAPI is returning an error so shouldn't post.

If I step through the entry sheet BAPI it is calling   FUNCTION 'MS_CREATE_SERVICE_ENTRY_MULTI' after stepping over this FM the CATS entry is committed in the system.

Wondering if anyone has come across this issue before ... seems quite recent as the program described above has been in production for 5 years.  Want to avoid another long night of stepping through ABAP code.

Thanks a bunch

Stewart

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Did you ever find the solution for this ?

Former Member
0 Kudos

Hi Johnathon

The client got an oss note from SAP ... I don't have the details but will reach out to my contact to seen if they still have the details.

Stewart