今天不小心 Final Closed了一条Po Release,只能通过后台更新数据恢复了。

更新后可接收可匹配,但不保证更新数据有遗漏,慎用。

更新前备份各表数据

UPDATE PO_LINE_LOCATIONS_ALL
SET CLOSED_CODE = 'OPEN',quantity_cancelled = 0
,CLOSED_FLAG='N'
WHERE po_release_id = 608;


UPDATE PO_LINE_LOCATIONS_ALL l
SET l.amount_cancelled = 0
WHERE po_release_id = 608;


UPDATE PO_RELEASES_ALL s SET s.closed_code = 'CLOSED'
WHERE PO_RELEASE_ID = 608;


delete from PO_ACTION_HISTORY
where OBJECT_ID = 608
and ACTION_CODE = 'FINALLY CLOSE';


UPDATE po_distributions_all l
SET l.quantity_cancelled = 0
WHERE l.po_release_id = 608;