cancel
Showing results for 
Search instead for 
Did you mean: 

Goods issue (oInventoryGenExit) not working ...

Former Member
0 Kudos

Hi, I'm trying to use oInventoryGenExit & oInventoryGenEntry to perform Goods issue & Goods Receipt.

While Goods receipt works, Goods issue doesn't go thru.

I'm getting -5003 when i add the oInventoryGenExit document.

=====================================================

Set GIHeader = oCompany.GetBusinessObject(oInventoryGenExit)

GIHeader.Lines.AccountCode = "_SYS00000000094"

GIHeader.Lines.ItemCode = strGI

GIHeader.Lines.Quantity = 2

GIHeader.Lines.Price = 20

GIHeader.Lines.Add

retVal = GIHeader.Add

( retVal is -5003 )

=====================================================

Please advise...

Ravi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can normally get more information on errors by using the GetLastError function. This returns a description of the error that might help you track down the problem.

Try adding the following to the end of your code:-

If (0 <> retVal) Then

Call oCompany.GetLastError(lngErr, strMsg)

MsgBox ("Found error:" + Str(lngErr) + "," + strMsg)

End If

If the message it returns doesn't make much sense to you, try posting it here.

Regards,

John

Former Member
0 Kudos

Thanks for the reply, John.

The error mesg was helpful. -5003 is (Qty falls

below minimum qty ).

Thanks again...

Former Member
0 Kudos

Hi

Could somebody tell me how I would DIM the business object (oInventoryGenExit).

I cant find the related item under SAPSbob.

Former Member
0 Kudos

Very old thread I know but its something like this

Dim oInvGenExit As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)