Home » Applications » Oracle Fusion Apps & E-Business Suite » Layer Cost Update - Inventory (Oracle eBusiness Suite 11.5.10.2)
Layer Cost Update - Inventory [message #433126] Mon, 30 November 2009 05:10
sirahs
Messages: 30
Registered: February 2005
Member
Hi All, I'm trying to use the layer cost update functionality via MTL_TXN_COST_DET_INTERFACE and MTL_TRANSACTIONS_INTERFACE. I've tried alot of methods via metalink, various google threads - but no luck. I can get it to work provided I use a different transaction type (e.g. average cost update). If I use layer cost update transaction type - it seems to error with a unique constraint violation on MTL_CST_TXN_COST_DETAILS_U1. My sample code is shown below - which may also be helpful to others as there doesnt seem to be much out there and Oracle's template doesnt work - surprise, surprise... Anyway - any pointers - most welcome - thanks in advance Sandy.

Now here's the code:

INSERT INTO mtl_txn_cost_det_interface (transaction_interface_id
,last_update_date
,last_updated_by
,creation_date
,created_by
,last_update_login
,organization_id
,cost_element_id
,level_type
,new_average_cost
,request_id
,program_application_id
,program_id
,program_update_date
,percentage_change
, value_change)

VALUES (l_trx_id
,SYSDATE
,fnd_global.user_id
,SYSDATE
,fnd_global.user_id
,fnd_global.user_id
,5129
,1
,1
,2.11
,NULL
,NULL
,NULL
,NULL
,NULL
,NULL);


-- Insert into Transactions Interface

INSERT INTO mtl_transactions_interface (transaction_interface_id
,transaction_header_id
,source_code
,process_flag
,transaction_mode
,last_update_date
,last_updated_by
,creation_date
,created_by
,last_update_login
,inventory_item_id
,organization_id
,transaction_quantity
,primary_quantity
,transaction_uom
,transaction_date
,acct_period_id
,transaction_source_id
,transaction_type_id
,material_account
,material_overhead_account
,resource_account
,outside_processing_account
,overhead_account
,cost_group_id
,source_line_id
,source_header_id)
VALUES (l_trx_id
,l_trx_id
,'Layer Cost Update'
,1
,3 -- transaction_mode
,SYSDATE
,fnd_global.user_id
,SYSDATE
,fnd_global.user_id
,fnd_global.user_id
,13818--53750
,5129
,0
,0
,'Ea'
,SYSDATE
,8042
,1157
,80 -- Average cost update
,12945
,12945
,12945
,12945
,12945
,3344
,0
,0);
Previous Topic: over billing of payable invoice
Next Topic: Enabling Audit Trail match_type and PO_number matching purchase order screen
Goto Forum:
  


Current Time: Fri May 17 23:14:13 CDT 2024