06-22-2017 8:56 AM - edited 02-03-2024 10:42 PM
Hi All,
I'm using DI Server with the OrdersService to update a document. I would like to add some items. On each line I'm setting ItemCode, Quantity, Price, UnitPrice, PriceAfterVat, VATGroup and LineTotal (= Price*Quantity). I'm also setting the updated DocTotal of the document. I have 3 lines with a qty of 1 each time:
1. 35.124 + 21%VAT = 42.5 (=existing line)
2. 44.48 + 21% VAT = 53.82
3. 44.48 + 21% VAT = 53.82
So I set the documenttotal to 150.14, I also set VatSum (I tried without) to 26.056 but I keep getting There is a difference between the document total and its components. [ORDR.DocTotal][line: 0]
What am I doing wrong?
This is the full XML I'm posting
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>250A38BC-C016-43EE-B27F-360B48A340BC</SessionID>
</env:Header>
<env:Body>
<dis:Update xmlns:dis="http://www.sap.com/SBO/DIS">
<Service>OrdersService</Service>
<Document>
<DocEntry>275132</DocEntry>
<DocNum>1471043712</DocNum>
<DocType>dDocument_Items</DocType>
<HandWritten>tNO</HandWritten>
<Printed>psNo</Printed>
<DocDate>2017-06-21</DocDate>
<DocDueDate>2017-06-21</DocDueDate>
<CardCode>C000104472</CardCode>
<CardName>Sebastiaan</CardName>
<NumAtCard>LO577759BEDEV</NumAtCard>
<DocTotal>150.14</DocTotal>
<DocCurrency>EUR</DocCurrency>
<DocRate>1</DocRate>
<Reference1>1471043712</Reference1>
<Reference2 nil="true" />
<Comments nil="true" />
<JournalMemo>Sales Orders - C000104472</JournalMemo>
<PaymentGroupCode>4</PaymentGroupCode>
<DocTime>15:19:00</DocTime>
<SummeryType>dNoSummary</SummeryType>
<ContactPersonCode nil="true" />
<ShowSCN>tNO</ShowSCN>
<Series>219</Series>
<TaxDate>2017-06-21</TaxDate>
<PartialSupply>tYES</PartialSupply>
<DocObjectCode>17</DocObjectCode>
<ShipToCode nil="true" />
<FederalTaxID nil="true" />
<PaymentReference nil="true" />
<CreationDate>2017-06-21</CreationDate>
<UpdateDate>2017-06-22</UpdateDate>
<FinancialPeriod>148</FinancialPeriod>
<VatSum>26.056</VatSum>
<NetProcedure>tNO</NetProcedure>
<RevisionPo>tNO</RevisionPo>
<Submitted>tNO</Submitted>
<Segment>0</Segment>
<PickStatus>tNO</PickStatus>
<PickStatus>tNO</PickStatus>
<PaymentMethod nil="true" />
<PaymentBlock>tNO</PaymentBlock>
<MaximumCashDiscount>tNO</MaximumCashDiscount>
<Reserve>tNO</Reserve>
<WareHouseUpdateType>dwh_CustomerOrders</WareHouseUpdateType>
<Rounding>tNO</Rounding>
<DeferredTax>tNO</DeferredTax>
<BillOfExchangeReserved>tNO</BillOfExchangeReserved>
<WTAppliedSC>0.000000</WTAppliedSC>
<ApplyTaxOnFirstInstallment>tNO</ApplyTaxOnFirstInstallment>
<BPChannelContact nil="true" />
<Address2>Naamsesteenweg
BELGIUM</Address2>
<DocumentStatus>bost_Open</DocumentStatus>
<PeriodIndicator>2014</PeriodIndicator>
<UseShpdGoodsAct>tNO</UseShpdGoodsAct>
<DownPayment>0.000000</DownPayment>
<ReserveInvoice>tNO</ReserveInvoice>
<SequenceModel>0</SequenceModel>
<UseCorrectionVATGroup>tNO</UseCorrectionVATGroup>
<ServiceGrossProfitPercent>0</ServiceGrossProfitPercent>
<ControlAccount>400000</ControlAccount>
<InsuranceOperation347>tNO</InsuranceOperation347>
<ArchiveNonremovableSalesQuotation>tNO</ArchiveNonremovableSalesQuotation>
<ExtraMonth>0</ExtraMonth>
<ExtraDays>30</ExtraDays>
<CashDiscountDateOffset>0</CashDiscountDateOffset>
<StartFrom>pdt_None</StartFrom>
<NTSApproved>tNO</NTSApproved>
<EDocGenerationType>edocNotRelevant</EDocGenerationType>
<EDocStatus>edoc_Ok</EDocStatus>
<DownPaymentStatus>so_Open</DownPaymentStatus>
<GroupHandWritten>tNO</GroupHandWritten>
<CreateOnlineQuotation>tNO</CreateOnlineQuotation>
<ApplyCurrentVATRatesForDownPaymentsToDraw>tNO</ApplyCurrentVATRatesForDownPaymentsToDraw>
<ClosingOption>coByCurrentSystemDate</ClosingOption>
<OpenForLandedCosts>tYES</OpenForLandedCosts>
<AuthorizationStatus>dasWithout</AuthorizationStatus>
<RelevantToGTS>tNO</RelevantToGTS>
<IsAlteration>tNO</IsAlteration>
<CancelStatus>csNo</CancelStatus>
<DocumentDelivery>ddtNoneSeleted</DocumentDelivery>
<ReuseDocumentNum>tNO</ReuseDocumentNum>
<ReuseNotaFiscalNum>tNO</ReuseNotaFiscalNum>
<PrintSEPADirect>tNO</PrintSEPADirect>
<InterimType>boidt_None</InterimType>
<RelatedType>-1</RelatedType>
<Confirmed>tYES</Confirmed>
<SalesPersonCode>20</SalesPersonCode>
<TransportationCode>3</TransportationCode>
<DocumentSubType>bod_None</DocumentSubType>
<LanguageCode>22</LanguageCode>
<TrackingNumber nil="true" />
<PickRemark nil="true" />
<U_Origin>O</U_Origin>
<U_LOCBE_IS_INTRREL>N</U_LOCBE_IS_INTRREL>
<U_LOCBE_FIN>N</U_LOCBE_FIN>
<U_MailCustomer>N</U_MailCustomer>
<U_CanBeDelivered>N</U_CanBeDelivered>
<U_WebID>576959</U_WebID>
<U_Site>.\Private$\lensonline-dev.be</U_Site>
<U_PayedBy>0</U_PayedBy>
<U_PayMethodID>9001</U_PayMethodID>
<U_SecTrspInfo>Brugge - Bril & Co</U_SecTrspInfo>
<U_SecTrspID>20</U_SecTrspID>
<U_PayMethod>In de winkel</U_PayMethod>
<U_IsPaid>N</U_IsPaid>
<U_UsedBalance>68.92</U_UsedBalance>
<U_IntRemark nil="true" />
<DocumentLines>
<DocumentLine>
<LineNum>0</LineNum>
<ItemCode>V000073064</ItemCode>
<ItemDescription>product1</ItemDescription>
<Quantity>1</Quantity>
<ShipDate>2017-06-21</ShipDate>
<Price>35.124</Price>
<PriceAfterVAT>42.5</PriceAfterVAT>
<Currency>EUR</Currency>
<Rate>0</Rate>
<VendorNum nil="true" />
<SerialNum nil="true" />
<WarehouseCode>01</WarehouseCode>
<SalesPersonCode>-1</SalesPersonCode>
<CommisionPercent>0</CommisionPercent>
<TreeType>iNotATree</TreeType>
<AccountCode>702000</AccountCode>
<UseBaseUnits>tNO</UseBaseUnits>
<SupplierCatNum nil="true" />
<CostingCode nil="true" />
<ProjectCode nil="true" />
<BarCode>1115563331014</BarCode>
<VatGroup>21V</VatGroup>
<Height1>0</Height1>
<Hight1Unit nil="true" />
<Height2>0</Height2>
<Height2Unit nil="true" />
<Lengh1>0</Lengh1>
<Lengh1Unit nil="true" />
<Lengh2>0</Lengh2>
<Lengh2Unit nil="true" />
<Weight1>0</Weight1>
<Weight1Unit nil="true" />
<Weight2 nil="true" />
<Weight2Unit nil="true" />
<Factor1>1</Factor1>
<Factor2>1</Factor2>
<Factor3>1</Factor3>
<Factor4>1</Factor4>
<BaseType>-1</BaseType>
<BaseEntry nil="true" />
<BaseLine nil="true" />
<Volume>0</Volume>
<VolumeUnit>2</VolumeUnit>
<Width1>0</Width1>
<Width1Unit nil="true" />
<Width2>0</Width2>
<Width2Unit nil="true" />
<Address nil="true" />
<TaxCode nil="true" />
<TaxType>tt_Yes</TaxType>
<TaxLiable>tYES</TaxLiable>
<PickStatus>tNO</PickStatus>
<PickQuantity>0</PickQuantity>
<PickListIdNumber nil="true" />
<OriginalItem nil="true" />
<BackOrder>tYES</BackOrder>
<FreeText nil="true" />
<ShippingMethod>1</ShippingMethod>
<POTargetNum nil="true" />
<POTargetEntry nil="true" />
<POTargetRowNum nil="true" />
<DeferredTax>tNO</DeferredTax>
<EqualizationTaxPercent>0</EqualizationTaxPercent>
<MeasureUnit nil="true" />
<UnitsOfMeasurment>1</UnitsOfMeasurment>
<LineTotal>35.124</LineTotal>
<TaxPercentagePerRow>21</TaxPercentagePerRow>
<ConsumerSalesForecast>tYES</ConsumerSalesForecast>
<CountryOrg nil="true" />
<SWW nil="true" />
<TransactionType nil="true" />
<DistributeExpense>tYES</DistributeExpense>
<ShipToCode>NR_403411</ShipToCode>
<PickStatusEx>dlps_NotPicked</PickStatusEx>
<CFOPCode nil="true" />
<CSTCode nil="true" />
<Usage nil="true" />
<TaxOnly>tNO</TaxOnly>
<VisualOrder>0</VisualOrder>
<BaseOpenQuantity>0</BaseOpenQuantity>
<UnitPrice>35.124</UnitPrice>
<LineStatus>bost_Open</LineStatus>
<PackageQuantity>1</PackageQuantity>
<Text nil="true" />
<LineType>dlt_Regular</LineType>
<COGSCostingCode nil="true" />
<COGSAccountCode>609000</COGSAccountCode>
<ChangeAssemlyBoMWarehouse>N</ChangeAssemlyBoMWarehouse>
<GrossBuyPrice>0</GrossBuyPrice>
<GrossBase>-1</GrossBase>
<GrossProfitTotalBasePrice>0</GrossProfitTotalBasePrice>
<CostingCode2 nil="true" />
<CostingCode3 nil="true" />
<CostingCode4 nil="true" />
<CostingCode5 nil="true" />
<ItemDetails nil="true" />
<LocationCode nil="true" />
<ActualDeliveryDate nil="true" />
<RemainingOpenQuantity>1</RemainingOpenQuantity>
<ExLineNo nil="true" />
<RequiredDate nil="true" />
<RequiredQuantity>0</RequiredQuantity>
<COGSCostingCode2 nil="true" />
<COGSCostingCode3 nil="true" />
<COGSCostingCode4 nil="true" />
<COGSCostingCode5 nil="true" />
<CSTforIPI nil="true" />
<CSTforPIS nil="true" />
<CSTforCOFINS nil="true" />
<CreditOriginCode nil="true" />
<WithoutInventoryMovement>tNO</WithoutInventoryMovement>
<AgreementNo nil="true" />
<AgreementRowNumber nil="true" />
<ShipToDescription>Naamsesteenweg
BELGIUM</ShipToDescription>
<ActualBaseEntry nil="true" />
<ActualBaseLine nil="true" />
<DocEntry>275132</DocEntry>
<Surpluses>0</Surpluses>
<DefectAndBreakup>0</DefectAndBreakup>
<Shortages>0</Shortages>
<ConsiderQuantity>tNO</ConsiderQuantity>
<PartialRetirement>tNO</PartialRetirement>
<RetirementQuantity>0</RetirementQuantity>
<RetirementAPC>0</RetirementAPC>
<ThirdParty>tNO</ThirdParty>
<UoMEntry>-1</UoMEntry>
<UoMCode>Handmatig</UoMCode>
<InventoryQuantity>1</InventoryQuantity>
<RemainingOpenInventoryQuantity>1</RemainingOpenInventoryQuantity>
<ParentLineNum nil="true" />
<Incoterms>0</Incoterms>
<TransportMode>0</TransportMode>
<ItemType>dit_Item</ItemType>
<ChangeInventoryQuantityIndependently>tNO</ChangeInventoryQuantityIndependently>
<FreeOfChargeBP nil="true" />
<U_PHCtrBTW>OK</U_PHCtrBTW>
<U_LOCBE_IS_ORIGCTR nil="true" />
<U_LOCBE_IS_TRANSAC>1</U_LOCBE_IS_TRANSAC>
<U_LOCBE_IS_TRANSPO>3</U_LOCBE_IS_TRANSPO>
<U_LOCBE_IS_TERMDEL>EXW</U_LOCBE_IS_TERMDEL>
<U_BECC_AcctName nil="true" />
<U_EYE>OD</U_EYE>
<U_BasePriceExclSP>35.124000</U_BasePriceExclSP>
<U_BasePriceInclSP>35.124000</U_BasePriceInclSP>
<U_PackageID nil="true" />
<U_PackageName nil="true" />
<U_FreeTxt>product1</U_FreeTxt>
<U_PONeeded>Y</U_PONeeded>
<U_ParentAccount nil="true" />
<U_BINAbsEntry>20</U_BINAbsEntry>
<U_LineReference nil="true" />
<U_WebLineNum>10</U_WebLineNum>
</DocumentLine>
<DocumentLine>
<LineNum nil="true" />
<ItemCode>V000080119</ItemCode>
<ItemDescription nil="true" />
<Quantity>1</Quantity>
<ShipDate nil="true" />
<Price>44.48</Price>
<PriceAfterVAT>53.82</PriceAfterVAT>
<Currency>EUR</Currency>
<Rate>0</Rate>
<VendorNum nil="true" />
<SerialNum nil="true" />
<WarehouseCode>01</WarehouseCode>
<SalesPersonCode nil="true" />
<CommisionPercent nil="true" />
<TreeType nil="true" />
<AccountCode nil="true" />
<UseBaseUnits>tNO</UseBaseUnits>
<SupplierCatNum nil="true" />
<CostingCode nil="true" />
<ProjectCode nil="true" />
<BarCode nil="true" />
<VatGroup>21V</VatGroup>
<Height1 nil="true" />
<Hight1Unit nil="true" />
<Height2 nil="true" />
<Height2Unit nil="true" />
<Lengh1 nil="true" />
<Lengh1Unit nil="true" />
<Lengh2 nil="true" />
<Lengh2Unit nil="true" />
<Weight1 nil="true" />
<Weight1Unit nil="true" />
<Weight2 nil="true" />
<Weight2Unit nil="true" />
<Factor1>1</Factor1>
<Factor2>1</Factor2>
<Factor3>1</Factor3>
<Factor4>1</Factor4>
<BaseType>-1</BaseType>
<BaseEntry nil="true" />
<BaseLine nil="true" />
<Volume nil="true" />
<VolumeUnit nil="true" />
<Width1 nil="true" />
<Width1Unit nil="true" />
<Width2 nil="true" />
<Width2Unit nil="true" />
<Address nil="true" />
<TaxCode nil="true" />
<TaxType nil="true" />
<TaxLiable nil="true" />
<PickStatus nil="true" />
<PickQuantity nil="true" />
<PickListIdNumber nil="true" />
<OriginalItem nil="true" />
<BackOrder nil="true" />
<FreeText nil="true" />
<ShippingMethod nil="true" />
<POTargetNum nil="true" />
<POTargetEntry nil="true" />
<POTargetRowNum nil="true" />
<MeasureUnit nil="true" />
<UnitsOfMeasurment nil="true" />
<LineTotal>44.48</LineTotal>
<ConsumerSalesForecast>tYES</ConsumerSalesForecast>
<CountryOrg nil="true" />
<SWW nil="true" />
<TransactionType nil="true" />
<ShipToCode nil="true" />
<PickStatusEx nil="true" />
<CFOPCode nil="true" />
<CSTCode nil="true" />
<Usage nil="true" />
<UnitPrice>44.48</UnitPrice>
<LineStatus nil="true" />
<Text nil="true" />
<LineType nil="true" />
<COGSCostingCode nil="true" />
<CostingCode2 nil="true" />
<CostingCode3 nil="true" />
<CostingCode4 nil="true" />
<CostingCode5 nil="true" />
<ItemDetails nil="true" />
<LocationCode nil="true" />
<ActualDeliveryDate nil="true" />
<RemainingOpenQuantity>1</RemainingOpenQuantity>
<ExLineNo nil="true" />
<RequiredDate nil="true" />
<COGSCostingCode2 nil="true" />
<COGSCostingCode3 nil="true" />
<COGSCostingCode4 nil="true" />
<COGSCostingCode5 nil="true" />
<CSTforIPI nil="true" />
<CSTforPIS nil="true" />
<CSTforCOFINS nil="true" />
<CreditOriginCode nil="true" />
<WithoutInventoryMovement nil="true" />
<AgreementNo nil="true" />
<AgreementRowNumber nil="true" />
<ShipToDescription nil="true" />
<ActualBaseEntry nil="true" />
<ActualBaseLine nil="true" />
<UoMEntry>-1</UoMEntry>
<UoMCode>Handmatig</UoMCode>
<InventoryQuantity>1</InventoryQuantity>
<RemainingOpenInventoryQuantity>1</RemainingOpenInventoryQuantity>
<ParentLineNum nil="true" />
<Incoterms nil="true" />
<FreeOfChargeBP nil="true" />
<U_WebLineNum>20</U_WebLineNum>
<U_FreeTxt>Dailies Total 1</U_FreeTxt>
<U_EYE>OD</U_EYE>
<U_PONeeded>Y</U_PONeeded>
<U_BINAbsEntry>20</U_BINAbsEntry>
</DocumentLine>
<DocumentLine>
<LineNum nil="true" />
<ItemCode>V000080116</ItemCode>
<ItemDescription nil="true" />
<Quantity>1</Quantity>
<ShipDate nil="true" />
<Price>44.48</Price>
<PriceAfterVAT>53.82</PriceAfterVAT>
<Currency>EUR</Currency>
<Rate>0</Rate>
<VendorNum nil="true" />
<SerialNum nil="true" />
<WarehouseCode>01</WarehouseCode>
<SalesPersonCode nil="true" />
<CommisionPercent nil="true" />
<TreeType nil="true" />
<AccountCode nil="true" />
<UseBaseUnits>tNO</UseBaseUnits>
<SupplierCatNum nil="true" />
<CostingCode nil="true" />
<ProjectCode nil="true" />
<BarCode nil="true" />
<VatGroup>21V</VatGroup>
<Height1 nil="true" />
<Hight1Unit nil="true" />
<Height2 nil="true" />
<Height2Unit nil="true" />
<Lengh1 nil="true" />
<Lengh1Unit nil="true" />
<Lengh2 nil="true" />
<Lengh2Unit nil="true" />
<Weight1 nil="true" />
<Weight1Unit nil="true" />
<Weight2 nil="true" />
<Weight2Unit nil="true" />
<Factor1>1</Factor1>
<Factor2>1</Factor2>
<Factor3>1</Factor3>
<Factor4>1</Factor4>
<BaseType>-1</BaseType>
<BaseEntry nil="true" />
<BaseLine nil="true" />
<Volume nil="true" />
<VolumeUnit nil="true" />
<Width1 nil="true" />
<Width1Unit nil="true" />
<Width2 nil="true" />
<Width2Unit nil="true" />
<Address nil="true" />
<TaxCode nil="true" />
<TaxType nil="true" />
<TaxLiable nil="true" />
<PickStatus nil="true" />
<PickQuantity nil="true" />
<PickListIdNumber nil="true" />
<OriginalItem nil="true" />
<BackOrder nil="true" />
<FreeText nil="true" />
<ShippingMethod nil="true" />
<POTargetNum nil="true" />
<POTargetEntry nil="true" />
<POTargetRowNum nil="true" />
<MeasureUnit nil="true" />
<UnitsOfMeasurment nil="true" />
<LineTotal>44.48</LineTotal>
<ConsumerSalesForecast>tYES</ConsumerSalesForecast>
<CountryOrg nil="true" />
<SWW nil="true" />
<TransactionType nil="true" />
<ShipToCode nil="true" />
<PickStatusEx nil="true" />
<CFOPCode nil="true" />
<CSTCode nil="true" />
<Usage nil="true" />
<UnitPrice>44.48</UnitPrice>
<LineStatus nil="true" />
<Text nil="true" />
<LineType nil="true" />
<COGSCostingCode nil="true" />
<CostingCode2 nil="true" />
<CostingCode3 nil="true" />
<CostingCode4 nil="true" />
<CostingCode5 nil="true" />
<ItemDetails nil="true" />
<LocationCode nil="true" />
<ActualDeliveryDate nil="true" />
<RemainingOpenQuantity>1</RemainingOpenQuantity>
<ExLineNo nil="true" />
<RequiredDate nil="true" />
<COGSCostingCode2 nil="true" />
<COGSCostingCode3 nil="true" />
<COGSCostingCode4 nil="true" />
<COGSCostingCode5 nil="true" />
<CSTforIPI nil="true" />
<CSTforPIS nil="true" />
<CSTforCOFINS nil="true" />
<CreditOriginCode nil="true" />
<WithoutInventoryMovement nil="true" />
<AgreementNo nil="true" />
<AgreementRowNumber nil="true" />
<ShipToDescription nil="true" />
<ActualBaseEntry nil="true" />
<ActualBaseLine nil="true" />
<UoMEntry>-1</UoMEntry>
<UoMCode>Handmatig</UoMCode>
<InventoryQuantity>1</InventoryQuantity>
<RemainingOpenInventoryQuantity>1</RemainingOpenInventoryQuantity>
<ParentLineNum nil="true" />
<Incoterms nil="true" />
<FreeOfChargeBP nil="true" />
<U_WebLineNum>30</U_WebLineNum>
<U_FreeTxt>Dailies Total 1</U_FreeTxt>
<U_EYE>OS</U_EYE>
<U_PONeeded>Y</U_PONeeded>
<U_BINAbsEntry>20</U_BINAbsEntry>
</DocumentLine>
</DocumentLines>
<AddressExtension>
<ShipToStreet nil="true" />
<ShipToStreetNo nil="true" />
<ShipToBlock nil="true" />
<ShipToBuilding nil="true" />
<ShipToCity nil="true" />
<ShipToZipCode nil="true" />
<ShipToState nil="true" />
<ShipToCounty nil="true" />
<ShipToCountry nil="true" />
<ShipToAddress2 nil="true" />
<ShipToAddress3 nil="true" />
<BillToStreet>Naamsesteenweg</BillToStreet>
<BillToStreetNo></BillToStreetNo>
<BillToBlock nil="true" />
<BillToBuilding nil="true" />
<BillToCity></BillToCity>
<BillToZipCode></BillToZipCode>
<BillToState nil="true" />
<BillToCounty nil="true" />
<BillToCountry>BE</BillToCountry>
<BillToAddress2 nil="true" />
<BillToAddress3 nil="true" />
</AddressExtension>
</Document>
</dis:Update>
</env:Body>
</env:Envelope><br>
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.