Error in PO Receipts screen:  Master record missing

Sorry - the PO Receipt failed :
Master record missing.
violation of FOREIGN KEY constraint "FK_PORECS_PONUM" on table "PORECS"

We've found this error to be the result of a blank space just prior to the PO number. This could happen if the PO Types screen had a PO Prefix of " " (a blank space). Then, a PO generated would result as " 12345" (notice the space) instead of "12345".

So, the immediate action that should be taken is to review your (Purch > Purchasing Setup > PO Types) table and remove any blank space that may be saved in the prefix field.

If there are existing PO's with this problem, then a support representative can send a command file to trim those leading spaces. The following information should be used by the support representative for this purpose:

update PORDER set PONUM = ltrim(rtrim(PONUM))

The statement above should cascade automatically into the PODETL and PORECS tables too. So there should be no need for multiple command files to hit multiple tables.