cancel
Showing results for 
Search instead for 
Did you mean: 

DI API References for Inventory Counting

Former Member
0 Kudos

Dear all what is the DI API References for Inventory Counting

Ex: Dim ostrcount As SAPbobsCOM.StockTaking = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTakings)

Thanks & Regards

B.Lakshmi narayanan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Laksmi,

Please refer following thread

http://scn.sap.com/thread/3265731

regards

pradeep

Former Member
0 Kudos

one question

the reference Di Api is compatibility in Sap Bussines One 9.10.150 and visual studio 2015 for community , is necesary insert data for android using Di Api in web service Aspx but not account inventory and not debugger application  is visual basic application for desktop.

Johan_H
Active Contributor
0 Kudos

Hi,

You answered your own question, so what do you mean ?

Regards,

Johan

former_member296240
Participant
0 Kudos

hi ...

     

      this code for sap 8.82 .SAPbobsCOM.StockTaking.

        in sap 9.0 ?

AdKerremans
Active Contributor
0 Kudos

Hi Jaba,

I logged a message with SAP for this problem, becauseI couldn't find it either.

Dear Ad Kerremans,

Thank you for contacting SAP Business One Global Support.

StockTaking object is not used in SDK anymore since version 9.0.
Actually there is currently no DI API or DTW interface for importing items to the new Stock Counting Form and Stock Posting Form in SAP Business One 9.0.

We will keep this support message on our side for the moment so that we can forward it to development for further investigation.

For the time being, the Stock Counting can be entered in either of the following ways:
1. Manually via the SAP Business One Client.

2. Please see the attached document 'Workaround - Importing From Excel.docx' showing how to make an import that will have similar results to the DTW - Stock Taking template.

Based onthe business impact of this issue, the priority has been lowered to Medium as there is a simple workaround. Please see Note 795206 for details on message priorities.

Best Regards,
Daniel Goldstein
SAP Business One Global Support

Regards

Ad

Former Member
0 Kudos

Hi,

We, both with Johan, answered such a question last week I guess...

Since DTW is using nothing else than the DI-API... It means that the object always exists and is usable. Just to verify, I loaded a VisualStudio, regenerate the proxies and looked in the object browser: StockTaking exists as an object and as an interface, so is fully usable.

I'll add the test on V9 to my ToDoList

Regards,

Eric

edy_simon
Active Contributor
0 Kudos

Hi Eric,

I did the test for you

below is the code running on SBODemoSG SBO 9 PL 5

            SAPbouiCOM.SboGuiApi oUI = new SAPbouiCOM.SboGuiApi();

            oUI.Connect("0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056");

            SAPbouiCOM.Application oAPP = oUI.GetApplication();

            SAPbobsCOM.Company oC = oAPP.Company.GetDICompany() as SAPbobsCOM.Company;

              if (oC.Connected)

            {

                SAPbobsCOM.StockTaking oStockTake = oC.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTakings) as SAPbobsCOM.StockTaking;

                string sItemCode = "A00001";

                double dQuantity = 10020;

               

                oStockTake.ItemCode = sItemCode;

                oStockTake.WarehouseCode = "01";

                oStockTake.Counted = dQuantity;

                int lErr = oStockTake.Add();

              }

The Result :

1. The Stock count was updated to the OITW table :

2. But the Inventory counting screen and Inventory posting screen does not reflect this inventory posting.

    They created new objects with their own tables in SBO 9. Previously this only involved OITW. Now they have like a transaction document. There are separate table for Header and Detail for inventory counting. The same for Inventory posting.

And you can create an Inventory Posting document by copying from Inventory counting document - much like SO -> DO/AR Invoice.

So, in summary, The Stock Counting object is working on the DI level. But the result is not accessible by user from the SBO Application.

Unless there is a Stock Posting object in DI also, we cannot do anything with this.

Regards
Edy

Johan_H
Active Contributor
0 Kudos

As Eric said, the DTW uses the DI API.

So now the interesting question becomes: if you perform a stock taking with the DTW in v9 PL5, can the user access the result in the B1 client ?

If yes: what objects does the DTW use ? Are there new / different templates for stock taking now ?

If not: that would be a major faux pas from SAP, and we might ask SAP Support to remove the word "easy"

Former Member
0 Kudos

can you please send me the excel spreadsheet format to use with instructions on how to import this via SAP B1 v9

thanks...

Johan_H
Active Contributor
0 Kudos

Hi Robin,

The spreadsheet in question is the regular template that comes with the DTW.

The problem is that this method still does not use the new document oriented approach to stock taking that v9 uses.

What you could do, is log a similar support message as Ad Kerremans did, stressing that using the B1 client is not a viable workaround. Hopefully SAP will get the message.

Regards,

Johan