cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a simple Inventory Counting Document With Batchnumbers

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bilal,

Have you followed documentation on how to create a Service call atom and the payload format required?

Have you tried with a very basic Service call in order to be sure how it works?

You can find detailed information at Integration Framework -> Online Help:

3.3.4.4.4. Call B1 Service Atom

1.3.3. B1 Service Outbound Schema

In the schema definition you can see the Payload needs to start with B1Out, please double check all documentation and share more information here if stills not work.

From the error message "Error on completion of HTTPS-roundtrip" it seems to be a problem with DI Proxy... Have you tried to do a get instead of an add just to see if the error message is the same one? Have you tried with a simple B1 call on the same system?

Many posts in SCN talk about this problem... maybe you can try to follow the recommendations proposed to see if you can get rid of this message.

Regards,

Trinidad.

Former Member
0 Kudos

Hi Trinidad,

Sorry for late reply. Reinstalled integration framework and it started to run correctly.

Thank you,

Regards

Altan

Answers (0)