Generate warning for bad GL Exp Acct during PO Entry

Been driving myself crazy trying to do what I thought was a rather simple BPM.

Objective: Display a warning to the user when they save a PO that has the GL Exp for any release equal to a specific acct.

Background:

  1. The Company Config is setup to use GL Acct 6001-00-01 for the default Expense Account. This is a “catch-all” and should really never have any charges to it.
  2. Placing a PO line of type “Other” sets the GL Acct on the line-release to 6001-00-01 (from the company conf).
  3. Users are supposed to change the GL Acct to the appropriate account.

I want a warning to pop up when any PO Rel has the GL Exp Acct set as 6001-00-01.

I’ve tried nearly all of the PO BO methods, and can only get the warning to fire if the GL is changed, not when it is first assigned.

Erp.PO.Update seems promising, but doesn’t fire on the initial creation af a PO Line with the matching Exp Acct.

If my memory serves me correctly, you have to use a data directive to capture the data in the state you are looking for.

2 Likes

I made an In-Tran DD to monitor the TranGLC file and raise an exception when:

TranGLC.RelatedToFile BEGINS WITH “PORel”
AND TranGLC.GLAccount BEGINS WITH “6001”

It fires as expected, but the Release is not yet created, so the user can’t just go to the Release tab and change the GL Exp Account.

EDIT: Corrected actual conditions (my DD was correct, but the text of this post was not)

Just thinking out loud but would you not trap the condition in the in-tran and then enable a standard for the user message?

Regular DD’s have neither the “Raise an Exception”, nor “Display a message” blocks.

I’d have to do a In-Tran DD to capture the event, setting a field in the POHeader table, and then use a BPM on PO.Update to warn/stop the user.

Seems if I’m making a BPM to prevent the saving of a PO with an “undesirable” GL Exp Acct specified, I should be able to capture it right from within the BPM.

Makes sense. I typically run the In-Tran, fill the context and enable standard. In the standard you can use a single line of custom code for the message. Not ideal, but it works.

Calvin- did this work as expected? Looking like I am going to be going down this path. Looking for any gotchas.

Never got it to work in the UI. I ended up making a BAQ reports to find a the PO releases with “bad” gl accts. I used break routing to break on the buyer, so each buyer would get a list of their PO’s that need correcting. It would run at midnight each night. We relied on the fact that it was super rare to receive a PO receipt the same day the PO was created.

Edit

An alternative solution would be to force PO lines to have a part class specified for PUR-UKN lines. And that the part classes ha GLCs setup.

Hi Ken,

actually there might be a better way than using a BPM. Using standard functionality you can block some accounts to be used n PO release entry. Try to do the following :

  1. go to financial management → general ledger → Setup → Account segment values.
  2. Pick natural account 6001
  3. Go to tab Natural account options → Restrictions
  4. Add a new restriction for the account to be blocked on PO entry.
    That should do the trick and give users the warning the account is not allowed on PO Release.

Regards,
Mihai

We tried this.

The problem is that this method is that it stops the release from being created due to the restriction. We need to give users the ability to change the default GLaccount from the invalid GLaccount to the proper one.

This is close though to what we are looking for.

I am trying to do something similar for AP Invoice Entry with our suspense account and tried using the Accounting Segments Restrictions. Found while it did work to prevent AP Invoices from using the suspense account - it also prevented several “New PO Suggestions” from being generated so had to back this out. Have you found any other solutions yet?