Friday, October 31, 2014

find the uncosted material transactions

select transaction_source_id wip_entity_id,

decode(entity_type,1, '1=Discrete Job',

2, '2=Repetitive Assly',

3, '3=Closed Discr Job',

4, '4=Flow Schedule',

5, '5=Lot Based Job',

entity_type) entity_type,

mmt.organization_id, transaction_date, move_transaction_id, completion_transaction_id,

transaction_type_id,

decode(transaction_action_id,

1, 'Issue',

2, 'Subinv Xfr',

3, 'Org Xfr',

4, 'Cycle Count Adj',

5, 'Issue',

21, 'Intransit Shpmt',

24, 'Cost Update',

27, 'Receipt',

28, 'Stg Xfr',

30, 'Wip scrap',

31, 'Assy Complete',

32, 'Assy return',

33, '-ve CompIssue',

34, '-ve CompReturn',

40, 'Inv Lot Split',

41, 'Inv Lot Merge',

42, 'Inv Lot Translate',

42, 'Inv Lot Translate',

transaction_action_id) txn_action_meaning

from mtl_material_transactions mmt,

wip_entities we

where mmt.transaction_source_type_id = 5

and mmt.costed_flag = 'E'

and mmt.error_code = 'CST_INVALID_JOB_DATE'

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

order by transaction_source_id, transaction_date;

No comments:

Post a Comment