tomlbacon
14th December 2010, 18:14
I have written ar program that Generated a Pick List, Releases the Pick List and also Releases the Shipment. I need to know when I should be checking for error within the Stapapi logic. Session runs fine most of the time but I know that During confirm shipment if had a double allocation of lot item that would cause negative inventory the normal session will give me warning about negative inventory. Commands attached. Baan V Environment.
Thanks for any help
mark_h
14th December 2010, 20:47
With warnings I usually just ignore them, but every place you have err.msg is a potential place to check for errors. I typically do not always check on all of them. In this case you can check the err.msg in the confirm shipment routine - see if you get this warning. You might even have to use the stpapi.get.mess.code - I had to use this to get a warning from one session.
BUT from what I read that is probably too late - especially if you want to give the user the chance to cancel the confirm step. What I do in that case is before starting the stpapi code I do some of my own error checking first and pop up my own message. The key is do you have enough information to check if this is actually the case before doing the confirm? If so that is how I would do it.