BADI for BP open (display or change mode) event
When a user opens a BP (via BP transaction or open method of BOR object) in CRM, I want to do some custom check. Based on the check, I want to decide whether this user is allowed to open this BP or not. If this check fails, I want to display an error message (No authority to display this BP). Only if the check is successful, that BP should open.
Any idea where can I write this type of code?
I checked a few BADIs (BUPA_LOCK, HRSYNC_P etc.), but didn't find anything useful.