hardei
24th February 2008, 10:29
Dear Frnds,

I am trying to updates Price in Sales Order Lines in BaaN V.While Updating it is giving message "Order Date before Current Date".This message i am getting in stpapi.update..Before stpapi.update i wrote stpapi.get.mess.code.but mess_code is blank at that time..only stpapi.update giving thie error and bcoz of that i cant update it

HOw will i handle it?

Please see the follwing Code.



stpapi.put.field("tdsls4101s000","tdsls401.pric",str$(pric))
stpapi.enum.answer("tdsls4101s000","tdsls410101",tcyesno.yes)
stpapi.handle.subproc("tdsls4101s000","tdpcg0240s000","kill")
mess_code = stpapi.get.mess.code("tdsls4101s000",error)
ret = stpapi.update("tdsls4101s000",0,error)
mess_code = stpapi.get.mess.code("tdsls4101s000",error)
if not (isspace(error) and mess_code = "tdsls00010") or isspace(error)then
ret = stpapi.update("tdsls4101s000",0,error)

ret = stpapi.save("tdsls4101s000",error)
endif

Thanks in Advance

Regards,
Hardei

mark_h
24th February 2008, 23:07
Are you sure the current date before order date? When you run this manually do you get this error? I am not familiar with this session, so not sure what help I will be. Have you searched on tdsls4101s000? Last but not least have you tried putting the date to see if maybe a bad date is being entered as the default on the form. If necessary you can always get the date after you find the date, then re-put the date.