Paul P
1st September 2006, 06:56
Hi guys,
I'm trying to make my API for Maintain Receipts (tdpur4120m000) fool-proof. One possible hick up I noticed is that if someone selects a line from the tdpur4131s000 subsession, but doesn't continue on updating the data for that line in the main tdpur4120m000 session (ie leaving all numbers in tdpur4120m000 zero for that line), then all the other people wouldn't be able to select that same line to perform receipt against elsewhere. In short, BaanIV wants one person to finish recording receipt for a particular PO-line before allowing another person to record another receipt for that PO-line.
In trying to catch this, if one PO-line that's to be received using API can't be found in tdpur4131s000 (stpapi.find()<>1), I'd like my API script to un-mark all previously found & marked records before closing tdpur4131s000. I think I should be able to be un-mark using stpapi.recover(), which calls the choice.recover.set. After this, I need to ask API to execute(abort.program) and not execute(end.program), but I don't know how to do this as stpapi.end.session() seems to be calling choice.end.program. FYI, doing execute(end.program) after execute(recover.set) directly on the program (not through AFS) still results in the previously marked records being sent to tdpur4120m000
Anybody ever tried to do the same thing? Or am I going too far in making the API for this fool-proof :) ?
Thx,
Paul
I'm trying to make my API for Maintain Receipts (tdpur4120m000) fool-proof. One possible hick up I noticed is that if someone selects a line from the tdpur4131s000 subsession, but doesn't continue on updating the data for that line in the main tdpur4120m000 session (ie leaving all numbers in tdpur4120m000 zero for that line), then all the other people wouldn't be able to select that same line to perform receipt against elsewhere. In short, BaanIV wants one person to finish recording receipt for a particular PO-line before allowing another person to record another receipt for that PO-line.
In trying to catch this, if one PO-line that's to be received using API can't be found in tdpur4131s000 (stpapi.find()<>1), I'd like my API script to un-mark all previously found & marked records before closing tdpur4131s000. I think I should be able to be un-mark using stpapi.recover(), which calls the choice.recover.set. After this, I need to ask API to execute(abort.program) and not execute(end.program), but I don't know how to do this as stpapi.end.session() seems to be calling choice.end.program. FYI, doing execute(end.program) after execute(recover.set) directly on the program (not through AFS) still results in the previously marked records being sent to tdpur4120m000
Anybody ever tried to do the same thing? Or am I going too far in making the API for this fool-proof :) ?
Thx,
Paul