Skip to Content

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

Sales employee in A/R invoice

I am entering A/R invoices using DI/API.I am using the following code -

  objDoc = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
                    objDoc.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices

                    objDoc.CardCode = objDTHeader.Rows(intI).Item("CardCode")
                    objDoc.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO
                    objDoc.DocDate = objDTHeader.Rows(intI).Item("DocDate")

I want to set Sales Employee as -No SE - .I tried the code

objDoc.SalesPersonCode = -1

But any random sales person is getting set.The code for setting owner is working properly bu the code for setting sales employee is not working.

Former Member
Former Member replied

What ur doing is fine. Just make sure that ur using the correct SLPCODE from table OSLP

Vasu Natari.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question