WIP Migration:
Create a job in Work in Process
1. Create a job with item which is billable on and define routing sequence for the same.
E.g
Stagging Table
CREATE TABLE WIP_MOVE_TXN_STAG1
(
CREATED_BY_NAME VARCHAR2 (100 BYTE),
CREATION_DATE DATE,
FM_OPERATION_SEQ_NUM NUMBER,
FM_INTRAOPERATION_STEP_TYPE NUMBER,
LAST_UPDATE_DATE DATE,
LAST_UPDATED_BY_NAME VARCHAR2 (100 BYTE),
PRIMARY_ITEM_ID NUMBER,
ORGANIZATION_ID NUMBER,
PROCESS_PHASE NUMBER,
PROCESS_STATUS NUMBER,
TO_OPERATION_SEQ_NUM NUMBER,
TO_INTRAOPERATION_STEP_TYPE NUMBER,
TRANSACTION_DATE DATE,
TRANSACTION_QUANTITY NUMBER,
TRANSACTION_UOM VARCHAR2 (10 BYTE),
TRANSACTION_TYPE NUMBER,
WIP_ENTITY_ID NUMBER)
Sample data
OPERATIONS,12-Jan-2011,10,1,12-Jan-2011,OPERATIONS,43900,207,1,1,20,1,12-Jan-2011,1,Ea,1,137792
OPERATIONS,12-Jan-2011,20,1,12-Jan-2011,OPERATIONS,43900,207,1,1,30,1,12-Jan-2011,1,Ea,1,137792
OPERATIONS,12-Jan-2011,30,1,12-Jan-2011,OPERATIONS,43900,207,1,1,30,3,12-Jan-2011,1,Ea,1,137792
Procedure to fill interface table
CREATE OR REPLACE PROCEDURE WIP_MOVE_TXN(ERRBUFF OUT VARCHAR2,RETCODE OUT NUMBER) IS
CURSOR WIP_CUR IS SELECT * FROM WIP_MOVE_TXN_STAG1;
BEGIN
FOR WIP_REC IN WIP_CUR LOOP
INSERT INTO WIP_MOVE_TXN_INTERFACE
(
PRIMARY_ITEM_ID,
ORGANIZATION_ID,
PROCESS_PHASE,
PROCESS_STATUS,
WIP_ENTITY_ID,
TRANSACTION_DATE,
TRANSACTION_QUANTITY,
TRANSACTION_UOM,
TRANSACTION_TYPE,
FM_OPERATION_SEQ_NUM,
FM_INTRAOPERATION_STEP_TYPE,
TO_OPERATION_SEQ_NUM,
TO_INTRAOPERATION_STEP_TYPE,
CREATED_BY_NAME,
CREATION_DATE,
LAST_UPDATE_DATE,
LAST_UPDATED_BY_NAME
-- group_id
) VALUES
(
WIP_REC.PRIMARY_ITEM_ID,
WIP_REC.ORGANIZATION_ID,
WIP_REC.PROCESS_PHASE,
WIP_REC.PROCESS_STATUS,
WIP_REC.WIP_ENTITY_ID,
sysdate,
WIP_REC.TRANSACTION_QUANTITY,
WIP_REC.TRANSACTION_UOM,
WIP_REC.TRANSACTION_TYPE,
WIP_REC.FM_OPERATION_SEQ_NUM,
WIP_REC.FM_INTRAOPERATION_STEP_TYPE,
WIP_REC.TO_OPERATION_SEQ_NUM,
WIP_REC.TO_INTRAOPERATION_STEP_TYPE,
WIP_REC.CREATED_BY_NAME,
sysdate,
sysdate,
WIP_REC.LAST_UPDATED_BY_NAME
-- WIP_REC.group_id
);
END LOOP;
END WIP_MOVE_TXN;
/
set serveroutput on
declare
errbuff varchar2(200);
retcode varchar2(10);
begin
WIP_MOVE_TXN(errbuff,retcode);
dbms_output.put_line('Procedure executed successfully');
commit;
end;
/
And now go to inventory ->setup->trasaction->interface Manager
Choose move transaction and select tools and launch manager to run move transaction concurrent program.
Find it request it should invoke work order program with transaction_id to validate.
If transaction is validated data from interface table will be moved to base table
Tables to check
create table xx_WIP_MOVE_TXN_INTERFACE as select * from WIP_MOVE_TXN_INTERFACE
SELECT * FROM WIP_TXN_INTERFACE_ERRORS --WHERE TRANSACTION_ID=15264055
select * from WIP_MOVE_TXN_INTERFACE where primary_item_id='6707'
select * from wip_move_transactions where TRANSACTION_ID='15264087'
select * from wip_discrete_jobs_v where wip_entity_name='92839'
select * from wip_move_transactions where wip_entity_id='137791'
select * from wip_operations where wip_entity_id='121750'
No comments:
Post a Comment
Thanks for your comments submitted.,will review and Post soon! by admin.