I’ve made a In-Tran DD to change the GLAcct used by the Expense Acct on PO Releases.
The condition is:
When that is TRUE, I use two Set Field blocks:
With the full expression:
With the full expression:
BpmFunc.Replace(ttTranGLCRow.SegValue1, "1151", "1166")
This seems to work fine, but I’m a little worried with “tweaking” a table like TranGLC. And especially so because just changing the SegValue1 didn’t automatically update the GLAccount field.
Am I playing with fire?
To avoid the XY Problem …
The need for this tweak arises from the fact that BTO PO lines default to the Inventory GL Acct, while our accounting dept would rather they go into a specified acct “BTO PARTS”. The reason they want the differnt account is because they reconcile the Inv GL Acct with the value of the SSR (Stock Status Report).
It’s easy enough for the PO Entry people to just select the Release tab and change the expense account. But they often forget to do it. I’ve even made a BAQ report that shows PO Lines with “bad” GL Exp Acct specified. These BAQ reports are even emailed out every night , yet items PO receipts still occur with bad Exp Acct on the PO.
I would have thought that using Posting rules or GL controls are what you would want to use not a data directive. I believe the posting engine is designed specifically what you are wanting to do. You would may want to put a GL control on the specific parts, part group or part class to make it work. Caveat here “I am no Accountant” You may not even need to use a posting rule, just the GL control.
Not really too sure how playing with Data directives on the gl tables with regards to Sarbanes Oxley either…Yikes!
Hope this information helps
The problem arises because the parts are not in the system (hence the BTO PO line type). Therefore there is no Part Class automatically assigned. I did make a Part Class for BTO parts (with a GL Control), and if the buyer selects that Part Class, the proper GL acct is used. But if the buyers can’t remember to set the Exp Account on the PO line, what makes me think they’d remember to change the Part class.
Maybe I should look at a DD or BPM to automatically set the Part Class when it’s a BTO part.
The following seems to have worked, without messing with a Tran table.
- Created a Part Class (ClassID: “BTOP”, Description: “Buy To Order Parts”)
- Added a GL Control to Class BTOP, which just sets the Inventory Exp acct to 1166-00-01
- Created a BPM of Erp.PO.ChangeDetailOrderLine / Pre Process
Condition: ttPODetail.BTONumber <> 0 AND ttPODetail.ClassID <> “BTOP”
Action: Set Field ttPODetail.ClassID = “BTOP”
That’s a much simpler solution.