Search code examples
abapbapisap-erp

SAP: Can´t create and activate a costcenter via BAPI_COSTCENTER_CREATEMULTIPLE


I am facing a problem to create a costcenter via BAPI. I hope someone has a solution for me.

After filling the table COSTCENTERLIST with obligatory data and commit the test of the BAPI there is no new inactive costcenter db record in my Costcenters list. I haven’t got any failmessage. Here my Test data:

enter image description here

I have tried to find the test record via BAPI_COSTCENTER_GETDETAIL1with a MASTER_DATA_INACTIVE parameter on but without success. The error is: “there is no inactive costcenter ‘TEST_Z123’ in the costarea 2000”.

I have also tried to activate my new Costcenter via BAPI_CTR_ACTIVATE_MULTIPLE and I got no failmessage and no active costcenter record.


Solution

  • Problem solved:

    Call "BAPI_TRANSACTION_COMMT" after "BAPI_COSTCENTER_CREATEMULTIPLE"