cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get All cost centers based on date&time creation through standard API

amer_alsharif
Explorer
0 Kudos
562

Hello Team,

I'm trying to consume SAP "SAP S/4HANA Cloud Public Edition" Web API that related to "Get cost centers" or "Get profit centers" by standard official SAP API links:

https://api.sap.com/api/sap-s4-CE_PROFITCENTER_0001-v1/overview

https://api.sap.com/api/CE_COSTCENTER_0001/overview

Both web API services need to submit primary keys such as controlling area, Cost center id, and validity end date(please refer to attached screenshot)

Is it possible to retrieve all cost centers through the API that were created in my tenant (for integration and data mapping with an external system) without specifying the required request keys?

Thanks.

 

 

 

 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

AndreasMuno
Product and Topic Expert
Product and Topic Expert

Thank you for your request, @amer_alsharif.

For profit centers, it does look like the API has a method that might list all of them, without the need to give any further inputs. See the blue marked GET /ProfitCenter entry on the left-hand side and the respective (lack of specific required) parameters.

AndreasMuno_0-1740937853323.png

For Cost Centers, the API  | Cost Center | SAP Business Accelerator Hub also has a similar GET /A_CostCenter_2 method which should yield all of the cost centers without any further input parameters needed.

AndreasMuno_1-1740938285466.png

 

If this response solved your business requirements, please mark it accordingly. Thank you.  

 

  

amer_alsharif
Explorer
0 Kudos
i already used it, thank you
RaymondGiuseppi
Active Contributor
0 Kudos

Those API, in their get method, allow limitation of returned records and a sort option, you could for example get the last 50 costcenters by CostCenterCreationDate desc, and call the API til you get out of your selection criteria?