on 2025 Jan 30 7:03 AM
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.
Request clarification before answering.
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.
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.
If this response solved your business requirements, please mark it accordingly. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 28 | |
| 14 | |
| 13 | |
| 6 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.