BPM and/or Customization gurus

We’ve had on a few occasions where users will copy and paste a line description into a PO when entering. Of course when the line description exceeds 1000 character this creates chaos when running a Wip report and we have to go in and repair.
I would like to put a BPM into place that will force a hard stop when the maximum number of characters is exceeded.
I am not a BPM expert by any means other than a very basic simple BPM.
I believe I would use PO.GetNewPODetail … condition would be PODetail.Line Desc of the changed row >= (we are going to set it at 800), but how would I set the “specified” expression?

Or would a customization be a better route to go?
Ideas? Suggestions?

Please and thanks in advance :slight_smile:

I’m not familiar with the issue, but if I understand correctly PO line description will accept more than 1000 characters but this causes some sort of issue in the WIP report? Is the issue that it becomes unreadable due to length or a error based issue?

Our part descriptions often span several lines. I usually make the BAQs and reports have a calculated value that just returns the first 50 or 100 characters, named something like ShortDesc. That allows the full descriptoon to appear on orders and PO’s, but just gives you a brief snippet of the desc on the other reports (like stock status) I’ll often replace embedded CR and LF with a a space.


Might want to replace “odd” characters (like TAB, RS, and extended chars like ©, TM, °, •, etc…), as they can cause issues to.

Data Directive on PODetail is your best bet here I would put an In-Transaction Data Directive
with a condition where PODtl.LineDescription.Length > 1000 then throw an exception;

Create a Variable of type Integer

Then assign it the value of the Length of the LineDescription field

then add a condition that if the sepecified parameter > 1000 then throw exception

modify crystal/ssrs (Wip report) to print first 800 characters only.

That will only work if it’s not creating a hard error. A lot of times you can jam more characters than the binding format allows into fields and it will store the excess in the database as nvarchar max. When you try to load those records later it will give you textbox format errors. That is why I’m looking to find out from her if it’s hard errors creating the issue or readability.

The Inventory/Wip Reconciliation report throws an error:

  • Error message when running Inventory Wip report im/imr70.p raised the 4GL Stop condition with the following message
    Epicor sent us a fix to run when this occurs, but I would like to be proactive and prevent the occurance

Well the solution I gave you won’t work since this is 9… the concept is sound but you’ll have to translate it to 9 (ABL) syntax and widgets.

Jose … what you are displaying looks like it was created in E10… can this be done in 9.05.701 also?

Yes it can but I don’t have a 9 version to demonstrate it on, however the execution would be very similar.

i take your point… i remember having tilde symbol ~ in the description caused issue.

I’m gonna try to wing it for you in ABL… but it has been 5+ years since I did this,so… bare with me.

Use an In Transaction Directive in 9 and the Custom Code option with the following code.

FOR EACH ttPODetail WHERE (ttPODetail.RowMod="A" OR ttPODetail.RowMod="U") AND LENGTH(ttPODetail.LineDesc) > 1000:
     {lib/PublishEx.i &exMsg = "'The Length of the Line Description cannot be more than 1000 characters '"}

Pray to the ABL gods that my off the cuff syntax is accurate LoL

1 Like

You lie you referenced our code repos

PFFFT can’t prove a thing :laughing:

Actually I tried but this shit is so old I couldn’t find much… the exception though I did locate there.

Also ixnay on the eporay #FirstRuleOfFightClub


What is the difference between doing this as an In-Transaction Data Directive VS a BPM using the same ABL code?

BPM is both Method and Data Directives.
In Transaction Data Directive ensures that this is run for ANY PLACE where this table gets updated. It is just a more encompassing solution.

But a Data Directive is a BPM… so is a Method Directive.

I tried this in test had to add a / in the {lib/Publish … and then it validated.

Yup I forgot the slash

So I could do this as a Pre-processing Method directive on Get new po detail?

In that particular method there doesn’t exist a record in your ttPODetail table and the description hasn’t been filled in.