Skip to Content
0
Jan 02, 2017 at 11:10 PM

Creating Draft: Incorrect "Qty (Inventory UoM)" in line 1

628 Views

We are running SAP B1 9.0 PL10HF1. When adding a draft Reserve Invoice through the SDK, for some documents, we receive the error:

1470000315 - Cannot add or update document; specify a UoM code

When I add the UoMEntry on line level (I put it to -1), we get another error:

1470000840 - Incorrect "Qty (Inventory UoM)" in line 1; change quantity to a different value and press tab key, then change it back to the original quantity

I tried putting the inventory qty but that didn't help. I was able to reproduce this on PL12 as well.

What am I doing wrong? This is an example XML that gives us this error:

<?xml version="1.0" encoding="UTF-8"?> <BOM> <BO> <AdmInfo> <Object>112</Object> <Version>2</Version> </AdmInfo> <Documents> <row> <DocType>dDocument_Items</DocType> <Printed>psNo</Printed> <DocDate>20170102</DocDate> <DocDueDate>20170102</DocDueDate> <CardCode>C000022601</CardCode> <NumAtCard>ML76723IT</NumAtCard> <DocTotal>23.800000</DocTotal> <TransportationCode>1</TransportationCode> <Confirmed>tYES</Confirmed> <Series>285</Series> <PartialSupply>tYES</PartialSupply> <DocObjectCode>13</DocObjectCode> <FederalTaxID /> <PaymentReference /> <RevisionPo>tNO</RevisionPo> <BlockDunning>tNO</BlockDunning> <Pick>tNO</Pick> <PaymentBlock>tNO</PaymentBlock> <MaximumCashDiscount>tNO</MaximumCashDiscount> <Rounding>tNO</Rounding> <DocumentSubType>bod_None</DocumentSubType> <UseShpdGoodsAct>tNO</UseShpdGoodsAct> <ReserveInvoice>tYES</ReserveInvoice> <SequenceModel>0</SequenceModel> <UseCorrectionVATGroup>tNO</UseCorrectionVATGroup> <InsuranceOperation347>tNO</InsuranceOperation347> <ArchiveNonremovableSalesQuotation>tNO</ArchiveNonremovableSalesQuotation> <CashDiscountDateOffset>0</CashDiscountDateOffset> <NTSApproved>tNO</NTSApproved> <EDocGenerationType>edocNotRelevant</EDocGenerationType> <EDocStatus>edoc_Ok</EDocStatus> <GroupHandWritten>tNO</GroupHandWritten> <CreateOnlineQuotation>tNO</CreateOnlineQuotation> <ClosingOption>coByCurrentSystemDate</ClosingOption> <OpenForLandedCosts>tYES</OpenForLandedCosts> <RelevantToGTS>tNO</RelevantToGTS> <IsAlteration>tNO</IsAlteration> <ReqType>12</ReqType> <ReuseDocumentNum>tNO</ReuseDocumentNum> <ReuseNotaFiscalNum>tNO</ReuseNotaFiscalNum> <PrintSEPADirect>tNO</PrintSEPADirect> <InterimType>boidt_None</InterimType> <RelatedType>-1</RelatedType> <U_OrderStatus>N</U_OrderStatus> <U_WebID>75923</U_WebID> <U_IsPaid>Y</U_IsPaid> <U_PayMethodID>1302</U_PayMethodID> <U_ContactPerson>XXXXXX</U_ContactPerson> <U_PayMethod>MasterCard</U_PayMethod> <U_BartoliniStatus>0</U_BartoliniStatus> <U_ToPay>0.000000</U_ToPay> <U_UsedBalance>23.800000</U_UsedBalance> <U_InCommission>Y</U_InCommission> <U_Origin>O</U_Origin> <U_PayedBy>0</U_PayedBy> <U_PaidExternally>N</U_PaidExternally> <U_SSN>XXXXXXXF892M</U_SSN> <U_Site>urlgoeshere.eu</U_Site> <U_CanBeDelivered>Y</U_CanBeDelivered> <U_MailCustomer>N</U_MailCustomer> </row> </Documents> <Document_Lines> <row> <LineNum>0</LineNum> <ItemCode>V000041316</ItemCode> <Quantity>1.000000</Quantity> <WarehouseCode /> <TreeType>iNotATree</TreeType> <AccountCode>47005010</AccountCode> <UseBaseUnits>tNO</UseBaseUnits> <VatGroup>V4</VatGroup> <BaseType>-1</BaseType> <ShippingMethod>-1</ShippingMethod> <CorrectionInvoiceItem>ciis_ShouldBe</CorrectionInvoiceItem> <DeferredTax>tNO</DeferredTax> <UnitPrice>18.173077</UnitPrice> <LineType>dlt_Regular</LineType> <WithoutInventoryMovement>tNO</WithoutInventoryMovement> <ConsiderQuantity>tNO</ConsiderQuantity> <PartialRetirement>tNO</PartialRetirement> <ThirdParty>tNO</ThirdParty> <EnableReturnCost>tNO</EnableReturnCost> <UoMEntry>-1</UoMEntry> <InventoryQuantity>1.000000</InventoryQuantity> <Incoterms>0</Incoterms> <TransportMode>0</TransportMode> <ChangeInventoryQuantityIndependently>tNO</ChangeInventoryQuantityIndependently> <U_EYE>OD</U_EYE> <U_FreeTxt>Proclear</U_FreeTxt> <U_PONeeded>N</U_PONeeded> </row> <row> <LineNum>1</LineNum> <ItemCode>TRANSPORT</ItemCode> <Quantity>1.000000</Quantity> <TreeType>iNotATree</TreeType> <AccountCode>47005010</AccountCode> <UseBaseUnits>tNO</UseBaseUnits> <VatGroup>V2</VatGroup> <BaseType>-1</BaseType> <ShippingMethod>-1</ShippingMethod> <CorrectionInvoiceItem>ciis_ShouldBe</CorrectionInvoiceItem> <DeferredTax>tNO</DeferredTax> <UnitPrice>4.016393</UnitPrice> <LineType>dlt_Regular</LineType> <WithoutInventoryMovement>tNO</WithoutInventoryMovement> <ConsiderQuantity>tNO</ConsiderQuantity> <PartialRetirement>tNO</PartialRetirement> <ThirdParty>tNO</ThirdParty> <EnableReturnCost>tNO</EnableReturnCost> <UoMEntry>0</UoMEntry> <Incoterms>0</Incoterms> <TransportMode>0</TransportMode> <ChangeInventoryQuantityIndependently>tNO</ChangeInventoryQuantityIndependently> <U_PONeeded>Y</U_PONeeded> </row> </Document_Lines> <Document_LinesAdditionalExpenses> <row> <TaxLiable>tYES</TaxLiable> <TaxType>aext_NormalTax</TaxType> <BaseGroup>-1</BaseGroup> </row> </Document_LinesAdditionalExpenses> <Document_SpecialLines> <row /> </Document_SpecialLines> <TaxExtension> <row> <StreetS>Via Via</StreetS> <CityS>CASTAGNOLE DELLE LANZE</CityS> <ZipCodeS>14054</ZipCodeS> <CountyS>AT</CountyS> <CountryS>IT</CountryS> <StreetB>Via Via</StreetB> <CityB>CASTAGNOLE DELLE LANZE</CityB> <ZipCodeB>14054</ZipCodeB> <CountyB>AT</CountyB> <CountryB>IT</CountryB> </row> </TaxExtension> <AddressExtension> <row> <ShipToStreet>Via Via</ShipToStreet> <ShipToStreetNo>777</ShipToStreetNo> <ShipToCity>CASTAGNOLE DELLE LANZE</ShipToCity> <ShipToZipCode>14054</ShipToZipCode> <ShipToCounty>AT</ShipToCounty> <ShipToCountry>IT</ShipToCountry> <BillToStreet>Via Via</BillToStreet> <BillToStreetNo>777</BillToStreetNo> <BillToCity>CASTAGNOLE DELLE LANZE</BillToCity> <BillToZipCode>14054</BillToZipCode> <BillToCounty>AT</BillToCounty> <BillToCountry>IT</BillToCountry> </row> </AddressExtension> </BO> </BOM>