Skip to Content
0
Former Member
Dec 15, 2015 at 04:45 PM

Best way do enumerate all documents (quotations, invoices, etc.) via DI

238 Views

Hi there,

I'm already familiar with SAP and the UI SDK.

So know i'm developing my first pure DI Application. I managed to create documents like:

...

vDrafts = (SAPbobsCOM.Documents)company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);

vDrafts.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices;

vDrafts.CardCode = "D150008";

vDrafts.HandWritten=SAPbobsCOM.BoYesNoEnum.tNO;

vDrafts.DocDate = DateTime.Now;

vDrafts.DocTotal = 0.99;

vDrafts.Lines.ItemCode = "TEST";

vDrafts.Lines.ItemDescription = "APPLE";

vDrafts.Lines.UnitsOfMeasurment = 1;

vDrafts.Lines.Quantity = 1;

...

Works fine. But i'm wondering, how an enumeration of for example invoices is made? I can't believe that an SQL Query against DB is the perfect way for this, just if you keep updates etc. in mind...

So is there an programatic way to enumrate alle documents or do i realy have to do it with an query with SAPbobsCOM.BoObjectTypes.BoRecordset?

Thanks!