cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with closing Goods Receipt PO

Former Member
0 Kudos

Hello,

I want to close a Goods Receipt PO Document.

When I use the code below, an error occurs ( Date deviates from due date range,'208040' ) :

Public oGoodsRPO As SAPbobsCOM.Documents = CType(oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes), SAPbobsCOM.Documents)

oGoodsRPO.GetByKey(120210)

Dim Derr As Integer = oGoodsRPO.Close()

If Derr <> 0 Then

Dim serr As String = ""

oComp.GetLastError(Derr, serr)

Throw New Exception(serr)

Else

SBO_Application.SetStatusBarMessage("Goods Receipt was closed successfully")

End If

I then tried to change the active period and set it in October 2006, but

always the same problem.

What's the Origin of this problem and how I can solve it.

Thank You,

Best Regards,

Youssef El Bahmi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Set your Time format in rigional settings according to ypur requirement and then open B1. There is the problem in Date Time format.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try to get the Curren Period in a Message Box and Check whether you are closing the Document after Posting Date

Mohamed Zubair