Symptom
Error 'Assign a budget to WBS element XXXXXXX' while using API API_FINPLANNINGDATA_SRV.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Import data using the sample payload below:
{
"PlanDataAggrgnLvlFieldsString": "LedgerFiscalYear,GLAccount,PlanningCategory,CostCenter,GlobalCurrency,AmountInGlobalCurrency,FiscalPeriod,WBSElement,Project",
"to_FinPlanningEntryItemTP": {
"results": [
{
"Project": "TIME3",
"GlobalCurrency": "INR",
"WBSElement": "TEST",
"CostCenter": "TEST123",
"PlanningCategory": "BUDGET01",
"GLAccount": "10100000",
"LedgerFiscalYear": "2024",
"AmountInGlobalCurrency": "100000",
"FiscalPeriod": "009"
}
]
}
} - Error FCO_AVC_PS/041 obtained.
Cause
The plan data scope it missing.
In case the plan data scope "PlanDataRplcScopeFieldsString" is missing, the default replace scope in this case will be (PlanningCategory, LedgerFiscalYear ). The system looks for entries with Planning category "BUDGET01" and fiscal year "2024" provided in the payload and then tries to replace the data. And if there are already actuals posted for these WBS elements (entries with BUDGET01 and 2024), the error is obtained as expected.
Resolution
In order to avoid the error, include "PlanDataRplcScopeFieldsString": "PlanningCategory,LedgerFiscalYear,Project" in the second line after
"PlanDataAggrgnLvlFieldsString": "LedgerFiscalYear,GLAccount,PlanningCategory,CostCenter,GlobalCurrency,AmountInGlobalCurrency,FiscalPeriod,WBSElement,Project"
See Also
Keywords
FCO_AVC_PS/041, assign a budget to WBS element XXXXXXX, API_FINPLANNINGDATA_SRV, import budget, error, financial planning api , KBA , CO-FIO-OM-PL-2CL , Planning (Public Cloud) , Problem
SAP Knowledge Base Article - Public