Skip to Content
0
Former Member
Dec 18, 2014 at 05:11 PM

How to add a simple Inventory Counting Document With Batchnumbers

46 Views

Hi experts,

I'm trying to add(not update or get) an inventory counting document with B1 Service Call. Could you give me a working payload as an example? ItemCode, UserCode,UoMCode not matter. I would like to see a simple working example. Integration framework makes me crazy! I've also tried to get an existing document and add it with necessary template changes. There is no problem with di-proxy etc. Everything works smoothly. It throws ConnectException with my payload below:

<Payload Role="X" id="atom2">
- <InventoryCounting xmlns="">
  <DocumentEntry />
  <CountDate>2014-12-18</CountDate>
  <SingleCounterType>12</SingleCounterType>
  <CountingType>ctSingleCounter</CountingType>
- <InventoryCountingLines>
- <InventoryCountingLine>
  <LineNumber>0</LineNumber>
  <ItemCode>01248395</ItemCode>
  <WarehouseCode>01</WarehouseCode>
  <UoMCode>kg</UoMCode>
  <UoMCountedQuantity>15</UoMCountedQuantity>
  </InventoryCountingLine>
  </InventoryCountingLines>
  </InventoryCounting>
  </Payload>
- <Payload Role="C" id="atom1" system="0010000106" systype="B1.8.8" b1login="Technical User" status="success" serviceid="InventoryCountingsService" type="Add method" method="add" requeststr="InventoryCountingParams" requestkeys="DocumentEntry" requestmethod="add" keyvalues="" ptype="synchronous" payload="atom2" DIresult="failure" DImsg="Exception : Error on completion of HTTPS-roundtrip: java.net.ConnectException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect">
  <Exception xmlns="">Error on completion of HTTPS-roundtrip: java.net.ConnectException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect</Exception>
  </Payload>


InventoryCountings schema is as below:

<InventoryCounting xmlns="">
      <!--DB Table Name: -->
      <DocumentEntry>long</DocumentEntry>
      <DocumentNumber>long</DocumentNumber>
      <Series>long</Series>
      <CountDate>date</CountDate>
      <CountTime>time</CountTime>
      <SingleCounterType>string (ctUser, ctEmployee)</SingleCounterType>
      <SingleCounterID>long</SingleCounterID>
      <DocumentStatus>string (cdsOpen, cdsClosed)</DocumentStatus>
      <Remarks>string</Remarks>
      <Reference2>string</Reference2>
      <BranchID>long</BranchID>
      <DocObjectCodeEx>string</DocObjectCodeEx>
      <FinancialPeriod>long</FinancialPeriod>
      <PeriodIndicator>string</PeriodIndicator>
      <CountingType>string (ctSingleCounter, ctMultipleCounters)</CountingType>
      <InventoryCountingLines>
        <InventoryCountingLine>
          <!--multiple such elements are allowed-->
          <DocumentEntry>long</DocumentEntry>
          <LineNumber>long</LineNumber>
          <ItemCode>string</ItemCode>
          <ItemDescription>string</ItemDescription>
          <Freeze>string (tNO, tYES)</Freeze>
          <WarehouseCode>string</WarehouseCode>
          <BinEntry>long</BinEntry>
          <InWarehouseQuantity>double</InWarehouseQuantity>
          <Counted>string (tNO, tYES)</Counted>
          <UoMCode>string</UoMCode>
          <BarCode>string</BarCode>
          <UoMCountedQuantity>double</UoMCountedQuantity>
          <ItemsPerUnit>double</ItemsPerUnit>
          <CountedQuantity>double</CountedQuantity>
          <Variance>double</Variance>
          <VariancePercentage>double</VariancePercentage>
          <VisualOrder>long</VisualOrder>
          <TargetEntry>long</TargetEntry>
          <TargetLine>long</TargetLine>
          <TargetType>long</TargetType>
          <TargetReference>string</TargetReference>
          <ProjectCode>string</ProjectCode>
          <Manufacturer>long</Manufacturer>
          <SupplierCatalogNo>string</SupplierCatalogNo>
          <PreferredVendor>string</PreferredVendor>
          <CostingCode>string</CostingCode>
          <CostingCode2>string</CostingCode2>
          <CostingCode3>string</CostingCode3>
          <CostingCode4>string</CostingCode4>
          <CostingCode5>string</CostingCode5>
          <Remarks>string</Remarks>
          <LineStatus>string (clsOpen, clsClosed)</LineStatus>
          <InventoryCountingLineUoMs>
            <InventoryCountingLineUoM>
              <!--multiple such elements are allowed-->
              <DocumentEntry>long</DocumentEntry>
              <LineNumber>long</LineNumber>
              <ChildNumber>long</ChildNumber>
              <UoMCountedQuantity>double</UoMCountedQuantity>
              <ItemsPerUnit>double</ItemsPerUnit>
              <CountedQuantity>double</CountedQuantity>
              <UoMCode>string</UoMCode>
              <BarCode>string</BarCode>
            </InventoryCountingLineUoM>
          </InventoryCountingLineUoMs>
          <InventoryCountingSerialNumbers>
            <InventoryCountingSerialNumber>
              <!--multiple such elements are allowed-->
              <ManufacturerSerialNumber>string</ManufacturerSerialNumber>
              <InternalSerialNumber>string</InternalSerialNumber>
              <ExpiryDate>date</ExpiryDate>
              <ManufactureDate>date</ManufactureDate>
              <ReceptionDate>date</ReceptionDate>
              <WarrantyStart>date</WarrantyStart>
              <WarrantyEnd>date</WarrantyEnd>
              <Location>string</Location>
              <Notes>string</Notes>
              <BatchID>string</BatchID>
              <SystemSerialNumber>long</SystemSerialNumber>
              <BaseLineNumber>long</BaseLineNumber>
              <Quantity>double</Quantity>
              <DocumentEntry>long</DocumentEntry>
            </InventoryCountingSerialNumber>
          </InventoryCountingSerialNumbers>
          <InventoryCountingBatchNumbers>
            <InventoryCountingBatchNumber>
              <!--multiple such elements are allowed-->
              <BatchNumber>string</BatchNumber>
              <ManufacturerSerialNumber>string</ManufacturerSerialNumber>
              <InternalSerialNumber>string</InternalSerialNumber>
              <ExpiryDate>date</ExpiryDate>
              <ManufactureDate>date</ManufactureDate>
              <AddmisionDate>date</AddmisionDate>
              <Location>string</Location>
              <Notes>string</Notes>
              <Quantity>double</Quantity>
              <BaseLineNumber>long</BaseLineNumber>
              <DocumentEntry>long</DocumentEntry>
            </InventoryCountingBatchNumber>
          </InventoryCountingBatchNumbers>
        </InventoryCountingLine>
      </InventoryCountingLines>
    </InventoryCounting>


Best regards,

Bilâl