Friday, October 31, 2014

CST_INVALID_JOB_DATE WIP COMPLETION TRXN DATE/TIME PRECEDES JOB RELEASE DATE

update wip_discrete_jobs wdj
set wdj.date_released = (select min(mmt.transaction_date)
from mtl_material_transactions mmt
where mmt.transaction_source_id = wdj.wip_entity_id
and mmt.organization_id = wdj.organization_id
and mmt.transaction_source_type_id = 5)
where wdj.wip_entity_id in
(select distinct mmt.transaction_source_id
from mtl_material_transactions mmt,
wip_entities we
where mmt.transaction_source_type_id = 5
and mmt.transaction_source_id = we.wip_entity_id
and mmt.organization_id = we.organization_id
and we.entity_type in (1, 5) -- discrete, lbj
and mmt.costed_flag = 'E'
and mmt.error_code = 'CST_INVALID_JOB_DATE')

No comments:

Post a Comment