Skip to Content

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

Multiple Documents Creation through SDK

Hi Experts,

I am Using below code i can Create Only One Credit Note But my scenario I need multiple Credit Notes creations

While (oMatrix.RowCount > i)

ocrdiet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)

ocrdiet.DocDate = Now()

ocrdiet.DocDueDate = Now()

ocrdiet.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service

ocrdiet.CardCode = oMatrix.Columns.Item("V_3").Cells.Item(i).Specific.String

ocrdiet.Lines.AccountCode = oMatrix.Columns.Item("V_11").Cells.Item(i).Specific.String

ocrdiet.Project = oForm.Items.Item("9").Specific.Value

ocrdiet.Lines.LineTotal = Convert.ToDouble(oMatrix.Columns.Item("V_4").Cells.Item(i).Specific.Value)

ocrdiet.Lines.TaxCode = "AP EXMPT"

ocrdiet.Lines.LocationCode = 1

ocrdiet.Lines.Add()

ocrdiet.Lines.SetCurrentLine(lno)

lno = lno + 1

count = count + 1

ocrdiet.Add()

i = i + 1

End While

Please Suggest me

Thanks

Sandeep

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