You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
getBudgetsForCostCenter
Fetch all budgets and certain budgets associated with a specific cost center.
This method receives data from the getBudgetsForCostCenterProps endpoint exposed by the SAP OCC API B2B Cost Centers Controller.
Signature
export declare function getBudgetsForCostCenter(
context: SapccIntegrationContext,
props: GetBudgetsForCostCenterProps
): Promise<BudgetList>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | GetBudgetsForCostCenterProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
Returns a representation of a BudgetList.
Referenced Types
- SapccIntegrationContext
GetBudgetsForCostCenterProps- BudgetList
Examples
Fetching active cost centers with optional parameters
import { sdk } from '~/sdk';
const costCenters = await sdk.commerce.getBudgetsForCostCenter({ costCenterCode: "some-code", sort: "byCode", pageSize: 10 });