I’m building a BPM to prevent users from charging PO Release expenses to another department’s GL account. We have departmental GL accounts where Segment 3 represents the department:
example:
3XYZ | 10 | 20 - Admin department
3XYZ | 10 | 30 - Finance Department
For now what I’m doing is, in a PO.Update Method Directive, I determine the current user’s department and store it in CallContextBpmData.Character02.
I then fix the segment 3 value based on a hardcoded variable. If an admin department user entered 3XYZ | 10 | 30 it should be corrected to 3XYZ | 10 | 20.
callContextBpmData.Character02 == “ADMIN” ? “20” :
callContextBpmData.Character02 == “FINANCE” ? “30” :
But I know this is not the best, because if new departments are added in the future, I need to update the BPM every time. One possible solution would be to Store mappings in a UD table and look them up from the BPM. Is there another effective way to achieve this?
Thanks In advance for your time and effort! ![]()
