Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Setting tax code in sales invoice

I am creating sales invoices and credits using data from an external source and I need to set the tax code to purchase tax rather than sales tax for credits as this will help the customer reconcile the different types of trransactions. My problem is that whilst I can set the tax property it seems to be getting overridden when the record is added. The code I am using is: -

Select Case TaxCode1

Case "B1"

'21%

If TXNType = "II" Then

'Invoice

SalesInv.Lines.TaxCode = "21V"

Else

'Credit

SalesInv.Lines.TaxCode = "V21"

End If

Case "B3"

'0%

If TXNType = "II" Then

'Invoice

SalesInv.Lines.TaxCode = "0VIC"

Else

'Credit

SalesInv.Lines.TaxCode = "VIC0"

End If

End Select

If I test this property immediatley before the add it is set to V21 but it gets added to the database as 21V.

Has anyone else had this problem? Is it that the SDK is preventing the use of a purchase tax code in sales even though it can be selected manually by the user?

Former Member
Not what you were looking for? View more on this topic or Ask a question