Skip to Content
0
Jan 30, 2023 at 01:57 PM

How to create multiple condition records using Odata?

111 Views

Hi all,

I am using the Odata "Condition Record for Pricing in Sales" to create new condition records. I have been already testing separately how to create condition records with A_SlsPrcgConditionRecord and it'sworking. However I was wondering how I could do multiple conditions at the same time.

I tried by using the same Json file but I am not succeeding. Find below an example (I picked the ones that were working individually and tried to process them together by appending them but I guess I am not doing it right).

It should normally be possible since it's even described in the official API website (create one or multiple conditions).

{

"ConditionRecord" : "",

"ConditionSequentialNumber" : "",

"ConditionTable" : "905",

"ConditionApplication" : "V",

"ConditionType" : "ZCPR",

"ConditionValidityEndDate" : "2023-01-31T00:00:00",

"ConditionValidityStartDate" : "2023-01-01T00:00:00",

"CreatedByUser" : "" ,

"CreationDate" : "2023-01-30T00:00:00",

"ConditionTextID" : "",

"PricingScaleType" : "A",

"PricingScaleBasis" : "",

"ConditionScaleQuantity" : "0",

"ConditionScaleQuantityUnit" : "",

"ConditionScaleAmount" : "0",

"ConditionScaleAmountCurrency" : "",

"ConditionCalculationType" : "C",

"ConditionRateValue" : "46.00",

"ConditionRateValueUnit" : "EUR",

"ConditionQuantity" : "1",

"ConditionQuantityUnit" : "TO",

"ConditionToBaseQtyNmrtr" : "0",

"ConditionToBaseQtyDnmntr" : "0",

"BaseUnit" : "",

"ConditionLowerLimit" : "0",

"ConditionUpperLimit" : "0",

"ConditionAlternativeCurrency" : "",

"ConditionExclusion" : "",

"ConditionIsDeleted" : false,

"AdditionalValueDays" : "00",

"PaymentTerms" : "",

"CndnMaxNumberOfSalesOrders" : "",

"MinimumConditionBasisValue" : "0",

"MaximumConditionBasisValue" : "0",

"MaximumConditionAmount" : "0",

"IncrementalScale" : "",

"PricingScaleLine" : "",

"ConditionReleaseStatus" : "",

"to_SlsPrcgCndnRecdValidity" : [

{

"ConditionRecord" : "",

"ConditionValidityEndDate" : "2023-01-31T00:00:00",

"ConditionValidityStartDate" : "2023-01-01T00:00:00",

"ConditionApplication" : "",

"ConditionType" : "",

"ConditionReleaseStatus" : "",

"DepartureCountry" : "",

"SalesDocument" : "",

"SalesDocumentItem" : "",

"BillableControl" : "",

"Industry" : "",

"CityCode" : "",

"ConditionContract" : "",

"County" : "",

"EngagementProject" : "",

"ConfigurationNumber" : "",

"BR_NFDocumentType" : "",

"BRSpcfcFreeDefinedField1" : "",

"BRSpcfcFreeDefinedField2" : "",

"BRSpcfcFreeDefinedField3" : "",

"InternationalArticleNumber" : "",

"TechnicalObjectType" : "",

"Equipment" : "",

"CustomerHierarchy" : "",

"IncotermsClassification" : "",

"IncotermsTransferLocation" : "",

"AccountTaxType" : "",

"TxRlvnceClassfctnForArgentina" : "",

"BR_TaxCode" : "",

"LocalSalesTaxApplicabilityCode" : "",

"CustomerGroup" : "",

"CustomerPriceGroup" : "",

"MaterialPricingGroup" : "",

"SoldToParty" : "",

"BPForSoldToParty" : "",

"Customer" : "100094",

"BPForCustomer" : "",

"PayerParty" : "",

"BPForPayerParty" : "",

"ShipToParty" : "",

"BPForShipToParty" : "",

"Supplier" : "",

"BPForSupplier" : "",

"DestinationCountry" : "",

"MaterialGroup" : "",

"Material" : "600009976",

"ReturnsRefundExtent" : "",

"AdditionalMaterialGroup1" : "",

"AdditionalMaterialGroup2" : "",

"AdditionalMaterialGroup3" : "",

"AdditionalMaterialGroup4" : "",

"AdditionalMaterialGroup5" : "",

"Personnel" : "",

"PriceListType" : "",

"PostalCode" : "",

"Region" : "",

"EngagementProjectServiceOrg" : "",

"RequirementSegment" : "",

"StockSegment" : "",

"Division" : "",

"CommodityCode" : "",

"ConsumptionTaxCtrlCode" : "",

"BRSpcfcTaxBasePercentageCode" : "",

"BRSpcfcTxGrpDynTaxExceptions" : "",

"CustomerTaxClassification1" : "",

"CustomerTaxClassification2" : "",

"CustomerTaxClassification3" : "",

"CustomerTaxClassification4" : "",

"ProductTaxClassification1" : "",

"ProductTaxClassification2" : "",

"ProductTaxClassification3" : "",

"ProductTaxClassification4" : "",

"TradingContract" : "",

"TradingContractItem" : "",

"TaxJurisdiction" : "",

"BRSpcfcTaxDepartureRegion" : "",

"BRSpcfcTaxDestinationRegion" : "",

"MainItemMaterialPricingGroup" : "",

"MainItemPricingRefMaterial" : "",

"VariantCondition" : "",

"ValueAddedServiceChargeCode" : "",

"SDDocument" : "",

"ReferenceSDDocument" : "",

"ReferenceSDDocumentItem" : "",

"SalesOffice" : "",

"SalesGroup" : "",

"SalesOrganization" : "BE01",

"SalesOrderSalesOrganization" : "",

"OrderQuantityUnit" : "",

"DistributionChannel" : "",

"TransactionCurrency" : "",

"WBSElementInternalID" : "",

"WBSElementExternalID" : "",

"WorkPackage" : "",

"Plant" : "BEB1",

"PlantRegion" : "",

"WorkItem" : "",

"ConditionProcessingStatus" : "",

"PricingDate" : "2023-01-30T00:00:00",

"ConditionIsExclusive" : false,

"ConditionScaleBasisValue" : "",

"TaxCode" : "",

"ServiceDocument" : "",

"ServiceDocumentItem" : "",

"TimeSheetOvertimeCategory" : "",

"SalesSDDocumentCategory" : "",

"ReturnReason" : "",

"ProductHierarchyNode" : "",

"CustomerConditionGroup" : "",

"ShippingType" : "",

"SubscriptionContractDuration" : "",

"SubscrpnContrDurationUnit" : "",

"SubscriptionContractLockReason" : "",

"CrsCtlgMappgPriceVersionNumber" : ""

}

],

"to_SlsConditionRecord" : [

{

"ConditionRecord" : "",

"ConditionSequentialNumber" : "",

"ConditionTable" : "910",

"ConditionApplication" : "V",

"ConditionType" : "ZF01",

"ConditionValidityEndDate" : "2023-01-31T00:00:00",

"ConditionValidityStartDate" : "2023-01-01T00:00:00",

"CreatedByUser" : "" ,

"CreationDate" : "2023-01-30T00:00:00",

"ConditionTextID" : "",

"PricingScaleType" : "A",

"PricingScaleBasis" : "",

"ConditionScaleQuantity" : "0",

"ConditionScaleQuantityUnit" : "",

"ConditionScaleAmount" : "0",

"ConditionScaleAmountCurrency" : "",

"ConditionCalculationType" : "C",

"ConditionRateValue" : "12.00",

"ConditionRateValueUnit" : "EUR",

"ConditionQuantity" : "1",

"ConditionQuantityUnit" : "TO",

"ConditionToBaseQtyNmrtr" : "0",

"ConditionToBaseQtyDnmntr" : "0",

"BaseUnit" : "",

"ConditionLowerLimit" : "0",

"ConditionUpperLimit" : "0",

"ConditionAlternativeCurrency" : "",

"ConditionExclusion" : "",

"ConditionIsDeleted" : false,

"AdditionalValueDays" : "00",

"PaymentTerms" : "",

"CndnMaxNumberOfSalesOrders" : "",

"MinimumConditionBasisValue" : "0",

"MaximumConditionBasisValue" : "0",

"MaximumConditionAmount" : "0",

"IncrementalScale" : "",

"PricingScaleLine" : "",

"ConditionReleaseStatus" : "",

"to_SlsPrcgCndnRecdValidity" : [

{

"ConditionRecord" : "",

"ConditionValidityEndDate" : "2023-01-31T00:00:00",

"ConditionValidityStartDate" : "2023-01-01T00:00:00",

"ConditionApplication" : "",

"ConditionType" : "",

"ConditionReleaseStatus" : "",

"DepartureCountry" : "",

"SalesDocument" : "",

"SalesDocumentItem" : "",

"BillableControl" : "",

"Industry" : "",

"CityCode" : "",

"ConditionContract" : "",

"County" : "",

"EngagementProject" : "",

"ConfigurationNumber" : "",

"BR_NFDocumentType" : "",

"BRSpcfcFreeDefinedField1" : "",

"BRSpcfcFreeDefinedField2" : "",

"BRSpcfcFreeDefinedField3" : "",

"InternationalArticleNumber" : "",

"TechnicalObjectType" : "",

"Equipment" : "",

"CustomerHierarchy" : "",

"IncotermsClassification" : "CIP",

"IncotermsTransferLocation" : "",

"AccountTaxType" : "",

"TxRlvnceClassfctnForArgentina" : "",

"BR_TaxCode" : "",

"LocalSalesTaxApplicabilityCode" : "",

"CustomerGroup" : "",

"CustomerPriceGroup" : "",

"MaterialPricingGroup" : "",

"SoldToParty" : "",

"BPForSoldToParty" : "",

"Customer" : "",

"BPForCustomer" : "",

"PayerParty" : "",

"BPForPayerParty" : "",

"ShipToParty" : "1000026217",

"BPForShipToParty" : "",

"Supplier" : "",

"BPForSupplier" : "",

"DestinationCountry" : "",

"MaterialGroup" : "",

"Material" : "600009976",

"ReturnsRefundExtent" : "",

"AdditionalMaterialGroup1" : "",

"AdditionalMaterialGroup2" : "",

"AdditionalMaterialGroup3" : "",

"AdditionalMaterialGroup4" : "",

"AdditionalMaterialGroup5" : "",

"Personnel" : "",

"PriceListType" : "",

"PostalCode" : "",

"Region" : "",

"EngagementProjectServiceOrg" : "",

"RequirementSegment" : "",

"StockSegment" : "",

"Division" : "",

"CommodityCode" : "",

"ConsumptionTaxCtrlCode" : "",

"BRSpcfcTaxBasePercentageCode" : "",

"BRSpcfcTxGrpDynTaxExceptions" : "",

"CustomerTaxClassification1" : "",

"CustomerTaxClassification2" : "",

"CustomerTaxClassification3" : "",

"CustomerTaxClassification4" : "",

"ProductTaxClassification1" : "",

"ProductTaxClassification2" : "",

"ProductTaxClassification3" : "",

"ProductTaxClassification4" : "",

"TradingContract" : "",

"TradingContractItem" : "",

"TaxJurisdiction" : "",

"BRSpcfcTaxDepartureRegion" : "",

"BRSpcfcTaxDestinationRegion" : "",

"MainItemMaterialPricingGroup" : "",

"MainItemPricingRefMaterial" : "",

"VariantCondition" : "",

"ValueAddedServiceChargeCode" : "",

"SDDocument" : "",

"ReferenceSDDocument" : "",

"ReferenceSDDocumentItem" : "",

"SalesOffice" : "",

"SalesGroup" : "",

"SalesOrganization" : "BE01",

"SalesOrderSalesOrganization" : "",

"OrderQuantityUnit" : "",

"DistributionChannel" : "",

"TransactionCurrency" : "",

"WBSElementInternalID" : "",

"WBSElementExternalID" : "",

"WorkPackage" : "",

"Plant" : "BEB1",

"PlantRegion" : "",

"WorkItem" : "",

"ConditionProcessingStatus" : "",

"PricingDate" : "2023-01-30T00:00:00",

"ConditionIsExclusive" : false,

"ConditionScaleBasisValue" : "",

"TaxCode" : "",

"ServiceDocument" : "",

"ServiceDocumentItem" : "",

"TimeSheetOvertimeCategory" : "",

"SalesSDDocumentCategory" : "",

"ReturnReason" : "",

"ProductHierarchyNode" : "",

"CustomerConditionGroup" : "",

"ShippingType" : "01",

"SubscriptionContractDuration" : "",

"SubscrpnContrDurationUnit" : "",

"SubscriptionContractLockReason" : "",

"CrsCtlgMappgPriceVersionNumber" : ""

}

]

}