DMT Purchase Order

I am trying to DMT import a list of Purchase Order.
However, I am hitting an error in DMT - “Invalid Purchase Order Number. Must be less than the configuration starting number 10000”.

I am puzzled because I check the purchase order table (POHeader), and the last PO number is already 231182. that is 6 in length.

Need help~
I am on version 10.1.400

What is the starting PO number setup in Company Config?

PO number is auto generated, so you can’t specify the PO Num - unless it is below the starting number.

Typically the DMT file will specify 0 (zero) as the PO Num, and the DMT process will automatically assign them during creation.

If you’re not using Combined PO, but rather doing the headers first, then the Details then the releases, you’ll have to let the system assign the PO nums, then you’ll have to update the PO NUms in your POLines file. And then update the PO Releas file as well.

A cheat would be to temporarily set the next number to something higher than you need.

  1. Next PO num is configured as 10000 (what you already have)
  2. The last PO Num in the system is 12345
  3. You want to upload 10 PO’s numbered 12350- 12359
  4. Set the next PO NUm to 12360
  5. DMT in you PO’s
  6. Set the next PO Num back to 10000 (totally optional).

Note, that in the above, PO Num’s 12346-12349 would not exist and be skipped.

4 Likes

Hi both

Thanks for the replies! :slight_smile:
I manage to resolve it with @ckrusen steps.

A word of caution with DMT and auto generated numbers… Not only are the PONum’s aut generated, but the LIne and and Release numbers too.

DMT often won’t respect the supplied values when creating new records that are usually auto numbered.

For example,

  • Say I create an OrderHed with DMT and the OrderNum generated was 12000.
  • Then I want to add order lines to 12000, via DMT. But for whatever reason, Line 3 needs to be skipped. Like if the external order system originally had a line 3 and then it was deleted before the data was exported for DMT.
  • The DMT file may look like:
company  OrderNum  OrderLine  PartNum
=======  ========  =========  =======
EP          12000          1  ABC-123
EP          12000          2  PDQ-456
EP          12000          4  XYZ-123

Note that there’s no Line 3

Processing that would create lines

Line  PartNum
====  =======
   1  ABC-123
   2  PDQ-456
   3  XYZ-123

Which might not be a big deal, but it would be if the line for XYZ-123 needs to be line 4, or referenced elsewhere - like on a Quote.

In this case, you’d need to pad your DMT file like:

company  OrderNum  OrderLine  PartNum
=======  ========  =========  =======
EP          12000          1  ABC-123
EP          12000          2  PDQ-456
EP          12000          3  DMT-PAD
EP          12000          4  XYZ-123

Then you’d need to go back and delete the lines with part DMT-PAD

I also ran into this when trying to upload BOM’s the supplied Mtl Sequence wasn’t being honored. It would just go 10,20, 30, 40, etc…

1 Like

Cool, thanks for sharing.
Most of the times, I tried to avoid DMT. I worry it will miss any validation checking.

DMT calls the BO methods, just like doing things in the UI. In the UI, if you tried to save an order with a blank description on a line, it would fail. Same thing happens in DMT.

Even your custom BPM’s are honored. If you have a BPM that prevents saving an Oder line without having a ProdGrp set, then DMT would also fail to update that line if the PrdGrp wasn’t supplied.

1 Like

Is there a trick to loading PO Releases? I’m trying to run a mass update on open POs to populate the Promise Date field with the Due Date field. But I’m getting an error.

Method not found: ‘PORelTGLCRow PORelTGLCDataTable.FindByCompanyPONumPOLinePORelNumSysRowID(System.String, Int32, Int32, Int32, System.Guid)’.

From what I read, I need to add some extra “optional” columns - but it’s not clear to me just where to get this info.

Are you using “Purchase Order Release” or “PO Combined” ??

If it is just an Update, I wouldn’t think any more columns are needed beyond the key fields (guessing: Company, PONum, POLine, and PORelNum) and what you want to update.

And this is sometimes fewer fields than show when you select the “Required” button, because they’re typically what is needed for a new record (when using “Add New”). But those fields already have values in them if the record already exists.

The fields starting with PORelTGLC# shouldn’t be needed unless you are making major changes to the release.

Try a DMT file with just:

Company, PONum, POLine, PORelNum, PromiseDt

Again, make sure you only have Update checked
image

Yeah that’s all I started with. And I got that error. I’m currently trying to link it to the TranGLC table to see if that works (I’m in Test of course)

Records in the TranGLC table are created when the PORelease is first saved. They should already exist if the PORelease already exists.

Make a BAQ ofor TranGLC, limit the RelatedFile to PORel, and Key1 = the PONum. Keys 2 and 3 should be the POLine and RelNum

I’ve added the TranGLC table and joined it to my PORel table using the mapping you’ve shown above. I filtered to just RelatedToFile = PORel. I’ve tried to DMT with the columns mentioned in another post as well as tried the optional column in the DMT. Neither works. I always get the message I pasted above.

These are the columns from another post.

Company, Plant, PONum, POLine, PORelNum, PORelTGLC#Company, PORelTGLC#RelatedToFile, PORelTGLC#Key1, PORelTGLC#Key2, PORelTGLC#Key3, PORelTGLC#Key4, PORelTGLC#Key5, PORelTGLC#Key6, PORelTGLC#TGLCTranNum, PORelTGLC#GLAccount

I must have tried 10 different combinations starting with the bare minimum and everything in between up until the above list. They all error out the same way on seemingly every line.

Manually (via the UI) update the promise date, with tracing enabled (just changed data). Then look at the trace to see what is being changed. Like I’ve said before I’d not expect any change to the TranGLC when just updating promise date.

Just a wild guess, but maybe updating the PORel updates some fields on the line, and GLC’s based on line info are being recalculated.

Have you tried using the “PO Combined” DMT?

Calvin,
I tried the PO Combined update this morning and it did not work. This time I get multiple error types. Some say the PO has been approved so no changes are allowed (which opens up a new can of worms I suppose). Then I am also getting the PORelTGLCRow from earlier as well. I’m guessing that the POs that are not approved (and therefore editable) are still erroring out like the PO Release update. I hate giving up on something but I am running out of ideas.

Another point to note: If I manually go through the UI, the Promise date is updateable with an Approved PO, so I don’t see why I would be getting an error through the DMT. I did look at the trace also but nothing jumped out at me. It did not appear that any specific field changed - just the PO dataset is included in the trace. When I checked the box to write full dataset, there is just way too much in that for me to be able to tell what else I might need to pay attention to.

Don’t beat yourself up too much. DMT is notorious for having weird bugs. And not just ones that weren’t found before. Many people complain about DMT bombing out after being updated. On a process that has worked flawlessly prior to the update.

Also, you can enable tracing in DMT. The first thing I’d do is compare the traces of when the date is updated in the UI, vs when done in DMT.

Possible hack:
Write a BPM to fire on pre-processing the PO Receipt and copy the due date to the promise date if the promise date is blank. Seems like that would accomplish the same goal. The whole point is to use it to grade supplier OTD… which I won’t care about until I have an actual date of receipt…

What do you think about that? Drawbacks?

Or just derive the Promise date from the PO LIne, and if that is blank, then from the PO Header. That’s what Epicor implies. It’s why you only see the “Update dates on … ?” when a lower level already has a date value. Think of the logic like:

if(PORel.PrmDate != null)
    Promise Date  =  PORel.PrmDate;
else if (POLine.PrmDate != null) 
    Promise Date  =  POLine.PrmDate;
else
    Promise Date  =  POHead.PrmDate;

I am trying to capture all the existing open ones and update them so that we might start seeing results sooner. But going forward, yes I agree that we follow the hierarchy of control based on PO Head, Line, Release, etc. all will take care of itself. There’s nothing special about it other than we were not populating the Promise date in the past, and therefore have no record of when the supplier originally committed to shipment, only the last update on the due date (which we would update to match when we were actually expecting it, regardless of if they were late or early). I at least have the opportunity to catch any open POs and update their promise date to the due date to start getting the feedback a little sooner.