Search 800 + Posts

Dec 19, 2012

API to Copy an existing Workorder in Oracle eAM

Below is sample code to copy an existing WorkOrder in Oracle Enterprise Asset management ( eAM) , by using public API  EAM_PROCESS_WO_PUB.COPY_WORKORDER


Declare

X_status VARCHAR2(4000);
X_Msg_Cnt Number;
X_Msg_Data Varchar2(4000);
L_Eam_Wo_Rec_Out      Eam_Process_Wo_Pub.Eam_Wo_Rec_Type;
L_Eam_Op_Tbl          Eam_Process_Wo_Pub.Eam_Op_Tbl_Type;
L_Eam_Op_Network_Tbl  Eam_Process_Wo_Pub.Eam_Op_Network_Tbl_Type;
L_Eam_Res_Tbl         Eam_Process_Wo_Pub.Eam_Res_Tbl_Type;
L_Eam_Res_Inst_Tbl    Eam_Process_Wo_Pub.Eam_Res_Inst_Tbl_Type;
L_Eam_Res_Usage_Tbl   Eam_Process_Wo_Pub.Eam_Res_Usage_Tbl_Type;
L_Eam_Mat_Req_Tbl     Eam_Process_Wo_Pub.Eam_Mat_Req_Tbl_Type;
L_Eam_Direct_Items_Tbl    Eam_Process_Wo_Pub.Eam_Direct_Items_Tbl_Type;
L_Return_Status   Varchar2(100);
L_Msg_Count Number;
x_return_status   varchar2(100);

       
Begin
EAM_PROCESS_WO_PUB.COPY_WORKORDER (p_bo_identifier =>'EAM'
,p_api_version_number => 1.0
,p_init_msg_list => 'TRUE'
,P_Commit => 'N'
,P_Wip_Entity_Id => 1863991--p_wip_entity_id
,p_organization_id => 804--p_organization_id
,x_eam_wo_rec => L_EAM_WO_REC_OUT
,x_eam_op_tbl => L_EAM_OP_TBL
,x_eam_op_network_tbl => L_EAM_OP_NETWORK_TBL
,x_eam_res_tbl => L_EAM_RES_TBL
,x_eam_res_inst_tbl => L_EAM_RES_INST_TBL
,x_eam_res_usage_tbl => L_EAM_RES_USAGE_TBL
,x_eam_mat_req_tbl => L_EAM_MAT_REQ_TBL
,x_eam_direct_items_tbl => L_EAM_DIRECT_ITEMS_TBL
,x_return_status => L_RETURN_STATUS
,X_Msg_Count => L_Msg_Count
);
  If X_Msg_Cnt > 0 Then
    DBMS_OUTPUT.PUT_LINE('Error Occurred in WO Creation : '||SQLERRM||' : '||SQLCODE);
  End If;
  Dbms_Output.Put_Line('x_return_status.......  '||X_Return_Status);
End;



3 comments:

  1. Evosys has implemented mobile based Oracle EBS solution, acton, at Nawras, Oman. The project kicked off on 20th May 2012 and went live on 22nd Sept 2012.


    About Evosys: Evosys is a premium Oracle Partner providing consulting services for implementation and maintenance of Oracle Applications. We are a market-focused, process-centric organization that develops and delivers innovative solutions to our customers, consistently outshining other market players. We are fully committed to deliver quality services and are proud of our outstanding success in delivering 100% successful projects for all our 50+ global customers over a period of 6 years. We are known for combining speed of implementation with the quality of delivery. We believe in industry specialization and have strong references in implementation of end to end ERP solutions for verticals like Healthcare, Public Sector, Education, Construction, Shipping, Logistics, Manufacturing and Distribution.

    For any Oracle Service, Business Partnerships, Sales Referrals, Collaborations & Tie ups, Please contact business@evosys.co.in & we shall contact you immediately.

    Contact Business@evosys.co.in

    ReplyDelete
  2. This is really good one , It save me hours..

    ReplyDelete
  3. Good that was helpful

    ReplyDelete