2 weeks ago
Hello,
I have been receiving this error when trying to use POST method in my SAP Gateway Client for PROJECT_API_V3. It has been saying that the WBS element that I want to create already exists and no matter what naming I used or check if it existed in the system, but I don't see any data or WBS element with the same name. The POST method for creating Project details seem working fine with no issues but when creating WBS Element it will keep giving the same error.
Below is an example of HTTP request payload that I used, I have tried using the full version with all the attributes, but it still gives the same error.
{
"WBSElementExternalID" : "AB_Z124",
"WBSElementShortID" : "AB_Z124",
"WBSDescription" : "TEST POST 01",
"WBSElementLangBsdDescription" : "",
"ResponsiblePerson" : "0",
"ResponsiblePersonName" : "",
"ApplicantCode" : "0",
"ApplicantName" : "",
"BusinessArea" : "",
"ControllingArea" : "GI01",
"FunctionalArea" : "",
"ProfitCenter" : "",
"ResponsibleCostCenter" : "",
"Plant" : "",
"FactoryCalendar" : "",
"PriorityCode" : "",
"Currency" : "CHF",
"CostingSheet" : "",
"CostCenter" : "",
"RequestingCostCenter" : "",
"ProjectInternalID" : "154",
"WBSElementIsBillingElement" : true,
"InvestmentProfile" : "",
"WBSIsStatisticalWBSElement" : true,
"WBSIsAccountAssignmentElement" : true,
"ProjectType" : "",
"WBSElementIsPlanningElement" : true,
"WorkCenterLocation" : "",
"ResultAnalysisInternalID" : "",
"TaxJurisdiction" : "",
"FunctionalLocation" : "",
"FunctionalLocationLabelName" : "",
"LastChangedByUser" : "",
"LastChangeDate" : null,
"RespCostCenterControllingArea" : "",
"WBSIsMarkedForIntegratedPlng" : false,
"Equipment" : "",
"ProjectObjectChangeNumber" : "",
"WBSElementHierarchyLevel" : 2,
"OverheadCode" : "",
"ReferenceElement" : "",
"ProjInterestCalcProfile" : "",
"ProgressAnlysAggregationWeight" : 0,
"ReqgCostCenterControllingArea" : "",
"Language" : "",
"IsMarkedForDeletion" : false,
"WBSElementIsGroupingWBSElement" : "",
"WBSElementIsUsedInProjSmmry" : false,
"CostingVariant" : "",
"BasicStartDate" : null,
"ForecastedStartDate" : null,
"ActualStartDate" : null,
"BasicEndDate" : null,
"ForecastedEndDate" : null,
"ActualEndDate" : null,
"TechnicalCompletionDate" : null,
"BasicDuration" : 0.0,
"BasicDurationUnit" : "",
"ForecastedDuration" : 0.0,
"ForecastedDurationUnit" : "",
"ActualDuration" : 0.0,
"ActualDurationUnit" : "",
"SchedldBasicEarliestStartDate" : null,
"ScheduledBasicLatestEndDate" : null,
"SchedldFcstdEarliestStartDate" : null,
"LatestSchedldFcstdEndDate" : null,
"TentativeActualStartDate" : null,
"TentativeActualEndDate" : null,
"SubProject" : "",
"InvestmentReason" : "",
"InvestmentScale" : "",
"EnvironmentalInvestmentReason" : "",
"RequestingCompanyCode" : "",
"NetworkAssignmentType" : "0",
"CostObject" : "",
"BillingPlan" : "",
"ControllingObjectClass" : "OC",
"WBSElementParentInternalID" : "0",
"WBSElementChildInternalID" : "0",
"LeftSiblingWBSElmntInternalID" : "0",
"RightSiblingWBSElmntInternalID" : "0",
"FreeDefinedAttribute01" : "",
"FreeDefinedAttribute02" : "",
"FreeDefinedAttribute03" : "",
"FreeDefinedAttribute04" : "",
"FreeDefinedQuantity1" : 0.000,
"FreeDefinedQuantity1Unit" : "",
"FreeDefinedQuantity2" : 0.000,
"FreeDefinedQuantity2Unit" : "",
"FreeDefinedAmount1" : 0.00,
"FreeDefinedAmount1Currency" : "",
"FreeDefinedAmount2" : 0.00,
"FreeDefinedAmount2Currency" : "",
"FreeDefinedDate1" : null,
"FreeDefinedDate2" : null,
"FreeDefinedIndicator1" : false,
"FreeDefinedIndicator2" : false,
"DistributionProfile" : "",
"SchedldBasicEarliestEndDate" : null,
"SchedldBasicLatestStartDate" : null,
"SchedldFcstdEarliestEndDate" : null,
"LatestSchedldFcstdStartDate" : null,
"StatusCombinationCode" : 0,
"SAP__Messages" : [
]
}Below shows the error message when I execute the query:
{
"error" : {
"code" : "PS_API/002",
"message" : "WBS Element processed : AB_Z124",
"@SAP__common.ExceptionCategory" : "Provider_Application_Error",
"details" : [
{
"code" : "CJ/020",
"message" : "WBS element AB_Z124 already exists",
"@SAP__common.longtextUrl" : "../../../../default/iwbep/common/0001/T100Longtexts(MessageClass='CJ',MessageNumber='020',Variable1='AB_Z124',Variable2='',Variable3='',Variable4='')/Documentation",
"@SAP__common.Severity" : "error",
"@SAP__common.numericSeverity" : 4
},
{
"code" : "CJ/001",
"message" : "Short ID adapted to new key",
"@SAP__common.Severity" : "success",
"@SAP__common.numericSeverity" : 1
}
],
"innererror" : {
"ErrorDetails" : {
"@SAP__common.Application" : {
"ComponentId" : "PS-ST",
"ServiceRepository" : "SRVD_A2X",
"ServiceId" : "API_PROJECT_V3",
"ServiceVersion" : "0001"
},
"@SAP__common.TransactionId" : "B18D6D59BBFE04C0E00690BD51B04A8F",
"@SAP__common.Timestamp" : "20251106031717.490494",
"@SAP__common.ErrorResolution" : {
"Analysis" : "Use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
"Note" : "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
}
}
}
}
}And lastly, below is the request URI that I used:
/sap/opu/odata4/sap/api_project_v3/srvd_a2x/sap/project/0001/WBSElementHope anyone that knows what seems to be the issue can help or have a workaround for this. Thanks