thieuf
30th July 2009, 11:01
Hello All,
After upgrading to SP25 (BIV on Unix) A simple AFS program is not working anymore. The program is intended to change items from specific suppliers back to purchased if they where changed to manufactured for some reason or other. (session runs in a job)
The script is pretty simple:
stpapi.put.field("tiitm0101m000","tiitm001.item", xitem)
xret = stpapi.find("tiitm0101m000", err.msg)
if xret = 1 then
stpapi.put.field("tiitm0101m000","tiitm001.kitm","1")
xretval = stpapi.update("tiitm0101m000", true, err.msg)
if not isspace(err.msg) then
xretval = stpapi.recover("tiitm0101m000", recover.msg)
endif
endif
stpapi.end.session("tiitm0101m000")
After the upgrade it is not working anymore. The error message says "Unknown enum".
After many different attempts (different put.field statments etc...) I have found a way that still gives me the error message, but does the update by spliting the update and save command like this:
xretval = stpapi.update("tiitm0101m000", 0, err.msg)
xretval = stpapi.save("tiitm0101m000", err.msg)
After the stpapi.update call, the error message still is "unknowm enum", but the item is updated and save as a purchased item so it works.
has anybody encountered this before? What am I missing here....?
Greetings Thieu
After upgrading to SP25 (BIV on Unix) A simple AFS program is not working anymore. The program is intended to change items from specific suppliers back to purchased if they where changed to manufactured for some reason or other. (session runs in a job)
The script is pretty simple:
stpapi.put.field("tiitm0101m000","tiitm001.item", xitem)
xret = stpapi.find("tiitm0101m000", err.msg)
if xret = 1 then
stpapi.put.field("tiitm0101m000","tiitm001.kitm","1")
xretval = stpapi.update("tiitm0101m000", true, err.msg)
if not isspace(err.msg) then
xretval = stpapi.recover("tiitm0101m000", recover.msg)
endif
endif
stpapi.end.session("tiitm0101m000")
After the upgrade it is not working anymore. The error message says "Unknown enum".
After many different attempts (different put.field statments etc...) I have found a way that still gives me the error message, but does the update by spliting the update and save command like this:
xretval = stpapi.update("tiitm0101m000", 0, err.msg)
xretval = stpapi.save("tiitm0101m000", err.msg)
After the stpapi.update call, the error message still is "unknowm enum", but the item is updated and save as a purchased item so it works.
has anybody encountered this before? What am I missing here....?
Greetings Thieu