cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for tax on item

Former Member
0 Kudos

Hello,

I want to know how much tax is charged on an item. I know that the Id is in SalesVATGroup and I want to find the Tax in OVTG. But OVTG is no part of the DI-API. What should I do?

rgds,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do you have an example for this newbie?

thx

Former Member
0 Kudos

Maybe this will do the trick? Replace "myCodeValue" with the actual code:

---


Dim oRecordSet As SAPbobsCOM.Recordset
Dim taxRate As Double
 
'// Getting an initialized Recordset object
oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
		
'// Performing the select statement
'// The query result will be loaded
'// into the Recordset object
oRecordSet.DoQuery("SELECT Rate FROM OVTG WHERE Code = 'myCodeValue'")

taxRate = oRecordSet.Fields.Item(0).Value

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi,

If it isn't exposed by the DI API, you can always use SQL to retrieve the data. Create an SQL SELECT statement, using a RecordSet.

Regards,

Jakob