The Hunt for OrderRel.Date04

On my Order Entry > Releases > Detail screen there are 2 fields labeled:

  • Orig Need By (Mapped to OrderRel.Date05)
  • Orig Ship By (Mapped to OrderRel.Date04)

Those fields seem to reflect exactly what they say, the original dates.

The issue I am having is that for the life of me I cannot find where those fields are being set at. I have looked through all of the usual places, and am coming up dry.

I looked through the code on the Customization for the Order Entry screen, and there is nothing in there that references those fields. I have looked through all of the BPMs for OrderRel, OrderDtl , and OrderHed and am not finding anything that references Date04 or Date05 in the OrderRel table. I also went and looked at the relevant tables for Customizations and BPMs in the database and found nothing.

I even went as far as to looking at the SP’s in SQL, with no luck either.

Used this to search Customization’s:

SELECT
  Key1 AS [Name]
 ,Key2 AS [Program]
 ,Description AS [Description]
 ,Content AS [Content]
 ,CASE
    WHEN OnMenu = 1 THEN 'Active'
    ELSE 'Not Active'
  END AS [Status]
FROM Ice.XXXDef
WHERE TypeCode = 'Customization'
AND Content LIKE '%OrderRel%Date04%'
ORDER BY Key2 ASC

The only item that was returned was the Customization where those fields were put onto the form.

To search the BPM’s, I ran this:

SELECT
  bd.Source
 ,bd.BpMethodCode
 ,bd.Name
 ,bdt.Name
FROM Ice.BpDirective bd
LEFT OUTER JOIN Ice.BpDirectiveType bdt
  ON bd.Source = bdt.Source
    AND bd.DirectiveType = bdt.DirectiveType
WHERE IsEnabled = 1
AND CAST(bd.Body AS NVARCHAR(MAX)) LIKE '%OrderRel%Date04%'
ORDER BY bd.Source, bd.BpMethodCode

The results from that were just the BPM’s that enable the Change Log’s.

SELECT DISTINCT
  A.Name AS OBJECT_NAME
 ,A.TYPE_DESC
FROM sys.SQL_MODULES M
INNER JOIN sys.OBJECTS A
  ON M.object_id = A.object_id
WHERE type_desc = 'SQL_STORED_PROCEDURE'
AND M.DEFINITION LIKE '%OrderRel%Date04%'
ORDER BY TYPE_DESC

That returned nothing outside of the standard ZFW*_GetByID/GetRows/GetBySysRowID Stored Procedures.

There are no Database Triggers defined either.

Here are the properties for one of the controls. The other is setup the exact same but for OrderRel.Date04 instead of OrderRel.Date05.

I looked in the User Defined Column Mapping as well, but that was not any help.

The UD Column Maintenance proves to be just as unhelpful.

The only thing that I can think of is that perhaps it is being set during the EDI process (Demand Workbench/Mass Review), but I didn’t find anything there either.

Any thoughts on where else I should be looking? Is there some other place that could be updating those fields that I haven’t thought of yet? (I think I covered it all)

https://www.epiusers.help/t/findincode-db-baq-or-why-we-all-love-jgiese-wci/104658

Jason,
Have you done a trace when you manually create an order? That might show the field getting set and give some clues. Or at least narrow down where in the process it’s being done.

Add a Data Directive on OrderRel.
The specified field has been changed from any to another
Show Informational Message.
Please Call Jason’s Extension at ???
Then ask the caller, “Hey what were you just doing?”

1 Like

This was my initial thought. We have fields on OrderHed that get populated on EDI import and if you didn’t know that I’m not sure how you would figure it out.

Do these fields get populated on non-EDI orders or when you create an order manually?

@klincecum - I have that thread bookmarked but haven’t implemented it yet. I am probably going to have to do that for this go-round, because I am just stumped.

Echoing what others have suggested, are you using EDI and Demand Entry? If so, you can look at UD Column Map > Map ID 60 to see if Date04 and Date05 are mapped.

You can also do a BAQ to query DemandSchedule table to compare the field values of the DemandSchedule record to the corresponding OrderRel record.

1 Like

It does appear that these are set on both EDI and non-EDI orders.

That was in my initial post. There is no mapping for them. Good thought, though.

We are aware that users may need to updated many order values, but need to ensure that the original trading partner EDI fields are also maintained in Epicor. We do, indeed, copy many values in UD fields in our EDI mapping, outside of Epicor.

You may want to verify your EDI mapping.

May not help you though, from looking at your post, I think you looked in all the same places already, not sure.

Am I understanding correctly that during the EDI Import process that UD fields can be set, without needing a BPM to do so? (I am very unfamiliar with how the EDI Import process actually works)

Importing the BAQ (after adjusting the version of it) throws an error: Invalid column name ‘Description’. Tracked that down to there not being a Description field in Ice.BPDirective. So I deleted that column and added a calculated column that just returned (null)…ya know, to keep the column counts the same between the unions.

Apparently that didn’t keep the column count the same between the unions because I am getting the error of:

All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.

So I just copied the original query into SSMS, declared and set @FindText, and let it run…and you were right: Nothing returned that I didn’t already know about :man_shrugging:

Yes, all Epicor fields are available during EDI mapping.

We readily transfer EDI values to Epicor fields, and copy as well to UD fields when advisable.

image001.png

image002.png

Our EDI mapping takes place with our EDI Transaction provider, with the resulting .app files sent to our on-prem Epicor environment.

How does Epicor know what the mapping for those .app files is? IE: How does it know what token is the Order Number, which token is the Quantity, Due Date, etc? Is the .app file standardized, or is there a definition somewhere in Epicor that would have been created when EDI was initially implemented?

OMG He speaks!

Posts read:

We thought you were a bot! @bderuvo @josecgomez

:rofl:

EDI-format fields have specific purposes (PO Number, Date, quantity. unit price, etc.):

ISA010000000000010000000000ZZABCDEFGHIJKLMNOZZ1234567890123451011271719U004000000034380P>
GSPO44051978009999999992010112717191421X004010VICS
ST850000000010
BEG00SA08292233294**20101127610385385
REFDP038
REFPSR
ITD14324546
DTM
00220101214
PKG
F68PALLETIZE SHIPMENT
PKG
F
66REGULAR
TD5
A
92
P3SEE XYZ RETAIL ROUTING GUIDE
N1STXYZ RETAIL90003947268292
N331875 SOLON RD
N4
SOLONOH44139
PO11120EA9.25TECB065322-117PRROVNAB3542
PID
FSMALL WIDGET
PO4
4
4
EA
PLT94
3LR15CT
PO1
2220EA13.79TECB066850-116PRROVNRD5322

.

.

.

Epicor Demand fields also have specific purposes,and EDI mapping transfers individual EDI fields to the associated Epicor Demand field (see Data Dictionary Viewer).

1 Like

I haven’t seen X12 in a while…

phew GIF

I’m aware of that. We don’t get the ‘raw’ EDI-Fact file though. That goes from the Customer to our EDI Provider, 1 Source or something like that where it gets mapped and translated into an .app file which is sent over to our Epicor environment.

The .app file is ~ delimited, like so:

H~1~0~133986~FIRM~EFGONE~133986~133986~~944225~133986~~false~~~~~~~~false~~~false~false~~~~false~false~false~65100001~~20230903-2464884~~false~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(that is the header line from the .app file for a specific EDI transfer)

I know each of those fields belong to something, and I can identify most of them…my question is, how does my Epicor EDI Import process know which field maps to? Is that something hardcoded into Epicor (as in it is always expecting .app files that follow a certain format), or is it something that we would have had to define in the system somewhere?

There is a mapping file titled like this that defines where they go.

Kinetic_InboundEDITransactionFileMappings_2021.1

if you have UD fields in the app file they will be like this. SCH are releases, so the UD record 8 relates to the SCH record 7.

image