Skip to Content

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

Problem On Creating Goods Issue using DI

Hi There,

i'm using DI to create a goods issue, but when i try to put in data in the header of the goods issue like,

oGIssue = OCo.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)

oGIssue.DocDate = TransDate (not just DocDate, juat anything that refer to header will come out this error)

I hit an error message say:

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

but without put in/Change anydata of the goods issue header (that mean just add in lines using DI) the program run just fine.

Any idea? Please help.. I have tried many solution still no idea.



consider this code:

Dim oIssue As SAPbobsCOM.Documents

oIssue = Oco.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)

'if the input is of string, else ignore this

Dim TempInput As String

TempInput = "02-10-2008"

Dim TempDate As Date

TempDate = CDate(TempInput)

With oIssue

.DocDate = TempDate.AddDays(-1)

.Lines.ItemCode = "1010001"

.Lines.Quantity = 1


End With

and consider releasing the same object that you've created in some part of the program. hope it works.

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