on 05-21-2011 9:41 AM
Hi all,
is there a way to check BP fields (like BP Code) on save?
Possibly, due to performance issue, I wouldn't like to use post transaction notifications.
Thanks!
Fabio
Hi Fabio,
What kind of check do you want? By post transaction notifications, you can only get message, nothing will be blocked.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This should be checked in real time, as if the user creates a BP with a wrong code and then posts a transaction, you can not then go and change the code.
On the FORM_DATA_ADD event, you can check on the BusinessObjectInfo.BeforeAction == true to see if the code that is in the field on the form is still in the format triggered by your FMS.
To be even more secure, you could use the UI API to trigger the FMS in that field again just before they add. Again use the same event as above, but put the cursor in the BP Code field and then use oApplciation.SendKeys("^F2") which will trigger the FMS.
Well there is a difference between post transaction and the transaction notification. Transaction notification happens before the transaction has been committed so you can block it and roll back (and display an error message to the user). It would be the preferred solution - and was created by SAP for exactly this purpose.
But if you have your reasons for not using stored proc, then maybe this FMS workaround would work?
How about putting the FMS on the CardCode field, and trigger it to update when the CardCode value changes? That way if the user ever tries to change it, the FMS will instantly be called again and update the value.
Hopefully it will not result in an infinite FMS loop, but it shouldn't as once it has worked once, the value isn't changing any more. It is worth testing.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.