cancel
Showing results for 
Search instead for 
Did you mean: 

API for maintaining Sales Contracts in S4 Hana Cloud

carsten_srensen
Participant
0 Kudos

Hi

In our existing SAP ECC 6.0 system we are using the BAPI: BAPI_SALESDOCUMENT_CHANGE, BAPI_CUSTOMERCONTRACT_CHANGE andSD_SALESDOCUMENT_CREATE to update different data on our existing Sales Contracts.

But I'm not able to find a appropriate API in https://api.sap.com/

Does it not exist, or am searching with wrong terms?

Best regards

Carsten

Accepted Solutions (1)

Accepted Solutions (1)

former_member330246
Active Contributor
0 Kudos

Carsten, sorry, you are right.

Check API SalesContract; below the data regarding this API (copied from API Discover):

" You can use this service to integrate external applications with sales contract processing in SAP S/4HANA Cloud. In every API call, you can make use of the following operations:

  • You can retrieve sales contracts. Apply any of the filters provided or retrieve all existing data.
  • You can create sales contracts. Note that you must use “deep insert” requests (a header plus the following entities: header partner, header pricing element, item, item partner, and item pricing element). You cannot create entities without including any related entities.
  • For existing sales contracts, you can create new items. Note that you must use “deep insert” requests (with the following entities: item partner and item pricing element). You cannot create entities without including any related entities.
  • For existing sales contracts, you can update the header, header partner, header pricing element, item, item partner, and item pricing element.
  • For existing sales contracts, you can delete the header, header partner, header pricing element, item, item partner, and item pricing element. "

Now will work. FM

carsten_srensen
Participant
0 Kudos

Hi Fausto.

Thx for Your answer. But as far as I can see You refer to a SALES ORDER, not a Sales Contract.

Best regards

Carsten

Answers (1)

Answers (1)

former_member330246
Active Contributor
0 Kudos

Carsten,

please, check Process Sales Order API. Bellow a quickly brief that I copy and paste from the description,

" You can use this service to integrate external applications with sales order processing in SAP S/4HANA Cloud. In every API call, you can make use of the following operations:

  • You can retrieve sales orders. Apply any of the filters provided or retrieve all existing data.
  • You can create sales orders. Note that you must use “deep insert” requests (a header plus the following entities: header partner, header pricing element, item, item partner, and item pricing element). You cannot create entities without including any related entities.
  • For existing sales orders, you can create new items. Note that you must use “deep insert” requests (with the following entities: item partner and item pricing element). You cannot create entities without including any related entities.
  • For existing sales orders, you can update the header, header partner, header pricing element, item, item partner, and item pricing element.
  • For existing sales orders, you can delete the header, header partner, header pricing element, item, item partner, and item pricing element."

Please inform if it works,

FM