This discussion is archived
0 Replies Latest reply: Jul 19, 2013 2:47 AM by Dev586 RSS

Have a Problem in EAM work order creation API........

Dev586 Newbie
Currently Being Moderated

I have used the following code to create work order but i was unable to do so

 

I am getting return status SUCCESS(S)....

 

but am unable to view the record in EAM_WORK_ORDERS_V..

 

any sort of help would be appreciated...

 

 

 

declare

g_eam_wo_relations_tbl0 eam_process_wo_pub.eam_wo_relations_tbl_type;

g_eam_wo_relations_rec eam_process_wo_pub.eam_wo_relations_rec_type;

g_eam_op_rec0 eam_process_wo_pub.eam_op_rec_type;

g_eam_op_rec1 eam_process_wo_pub.eam_op_rec_type;

g_eam_op_network_rec0 eam_process_wo_pub.eam_op_network_rec_type;

g_eam_op_network_rec1 eam_process_wo_pub.eam_op_network_rec_type;

g_eam_mat_req_rec0 eam_process_wo_pub.eam_mat_req_rec_type;

g_eam_mat_req_rec1 eam_process_wo_pub.eam_mat_req_rec_type;

g_eam_di_rec0 eam_process_wo_pub.eam_direct_items_rec_type;

g_eam_di_rec1 eam_process_wo_pub.eam_direct_items_rec_type;

g_eam_res_rec0 eam_process_wo_pub.eam_res_rec_type;

g_eam_res_rec1 eam_process_wo_pub.eam_res_rec_type;

g_eam_res_inst_rec0 eam_process_wo_pub.eam_res_inst_rec_type;

g_eam_res_inst_rec1 eam_process_wo_pub.eam_res_inst_rec_type;

g_eam_op_tbl0 EAM_PROCESS_WO_PUB.eam_op_tbl_type;

g_eam_op_tbl1 EAM_PROCESS_WO_PUB.eam_op_tbl_type;

g_eam_op_network_tbl0 EAM_PROCESS_WO_PUB.eam_op_network_tbl_type;

g_eam_res_tbl0 EAM_PROCESS_WO_PUB.eam_res_tbl_type;

g_eam_res_inst_tbl0 EAM_PROCESS_WO_PUB.eam_res_inst_tbl_type;

g_eam_sub_res_tbl0 EAM_PROCESS_WO_PUB.eam_sub_res_tbl_type;

g_eam_res_usage_tbl0 EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type;

g_eam_mat_req_tbl0 EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type;

g_eam_di_tbl0 EAM_PROCESS_WO_PUB.eam_direct_items_tbl_type;

g_out_eam_wo_relations_tbl eam_process_wo_pub.eam_wo_relations_tbl_type;

g_out_eam_wo_rec eam_process_wo_pub.eam_wo_rec_type;

g_out_eam_wo_tbl eam_process_wo_pub.eam_wo_tbl_type;

g_out_eam_op_tbl EAM_PROCESS_WO_PUB.eam_op_tbl_type;

g_out_eam_op_network_tbl EAM_PROCESS_WO_PUB.eam_op_network_tbl_type;

g_out_eam_res_tbl EAM_PROCESS_WO_PUB.eam_res_tbl_type;

g_out_eam_res_inst_tbl EAM_PROCESS_WO_PUB.eam_res_inst_tbl_type;

g_out_eam_sub_res_tbl EAM_PROCESS_WO_PUB.eam_sub_res_tbl_type;

g_out_eam_res_usage_tbl EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type;

g_out_eam_mat_req_tbl EAM_PROCESS_WO_PUB.eam_mat_req_tbl_type;

g_out_eam_di_tbl EAM_PROCESS_WO_PUB.eam_direct_items_tbl_type;

 

 

g_eam_wo_rec1 eam_process_wo_pub.eam_wo_rec_type;

g_eam_wo_rec2 eam_process_wo_pub.eam_wo_rec_type;

g_eam_wo_tbl0 eam_process_wo_pub.eam_wo_tbl_type;

 

 

 

 

g_eam_wo_res_usg_tbl0 eam_process_wo_pub.eam_res_usage_tbl_type;

l_return_status VARCHAR2(1);

l_msg_count NUMBER;

 

 

g_eam_wo_usg_rec1 eam_process_wo_pub.eam_res_usage_rec_type;

g_eam_wo_usg_rec2 eam_process_wo_pub.eam_res_usage_rec_type;

begin

 

 

g_eam_wo_rec1 := null;

g_eam_wo_rec1.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;

g_eam_wo_rec1.batch_id := 1;

G_EAM_WO_REC1.HEADER_ID := 1;

G_EAM_WO_REC1.WIP_ENTITY_ID := NULL;

g_eam_wo_rec1.wip_entity_name := '10040';

g_eam_wo_rec1.organization_id := 207;

 

 

g_eam_wo_rec1.asset_group_id := 16884;

g_eam_wo_rec1.asset_number := '28Z1933';

g_eam_wo_rec1.rebuild_item_id := null;

g_eam_wo_rec1.rebuild_serial_number := null;

G_EAM_WO_REC1.MAINTENANCE_OBJECT_SOURCE := 1;

g_eam_wo_rec1.maintenance_object_type := 3;

g_eam_wo_rec1.maintenance_object_id := 1768219;

g_eam_wo_rec1.parent_wip_entity_id := null;

g_eam_wo_rec1.manual_rebuild_flag := null;

 

 

g_eam_wo_rec1.owning_department := 4002 ;

g_eam_wo_rec1.description := 'Creating a Released Work Order';

 

 

g_eam_wo_rec1.class_code := 'MAINT';

g_eam_wo_rec1.status_type := wip_constants.released;

g_eam_wo_rec1.date_released := sysdate-100;

g_eam_wo_rec1.firm_planned_flag := 1;

g_eam_wo_rec1.scheduled_start_date := sysdate;

g_eam_wo_rec1.requested_start_date := sysdate;

g_eam_wo_rec1.scheduled_completion_date := sysdate;

g_eam_wo_rec1.material_issue_by_mo := 'N';

 

 

g_eam_wo_rec1.priority := 10;

g_eam_wo_rec1.issue_zero_cost_flag := 'Y';

g_eam_wo_rec1.po_creation_time := 1;

g_eam_wo_rec1.job_quantity := 1;

g_eam_wo_rec1.notification_required := 'N';

 

 

 

 

g_eam_wo_tbl0(1) := g_eam_wo_rec1;

 

 

EAM_PROCESS_WO_PUB.PROCESS_WO

( p_bo_identifier => 'EAM'

, p_api_version_number => 1.0

, p_init_msg_list => TRUE

, p_commit => 'Y'

, p_eam_wo_rec => g_eam_wo_rec1

, p_eam_op_tbl => g_eam_op_tbl0

, p_eam_op_network_tbl => g_eam_op_network_tbl0

, p_eam_res_tbl => g_eam_res_tbl0

, p_eam_res_inst_tbl => g_eam_res_inst_tbl0

, p_eam_sub_res_tbl => g_eam_sub_res_tbl0

, p_eam_res_usage_tbl => g_eam_res_usage_tbl0

, p_eam_mat_req_tbl => g_eam_mat_req_tbl0

, p_eam_direct_items_tbl => g_eam_di_tbl0

, x_eam_wo_rec => g_eam_wo_rec2

, x_eam_op_tbl => g_out_eam_op_tbl

, x_eam_op_network_tbl => g_out_eam_op_network_tbl

, x_eam_res_tbl => g_out_eam_res_tbl

, x_eam_res_inst_tbl => g_out_eam_res_inst_tbl

, x_eam_sub_res_tbl => g_out_eam_sub_res_tbl

, x_eam_res_usage_tbl => g_eam_res_usage_tbl0

, x_eam_mat_req_tbl => g_out_eam_mat_req_tbl

, x_eam_direct_items_tbl => g_out_eam_di_tbl

, x_return_status => l_return_status

, x_msg_count => l_msg_count

, p_debug => 'Y'

, p_output_dir => '/sqlcom/log/lv115dyp'

, p_debug_filename => 'eambo22.log'

, p_debug_file_mode => 'w'

);

 

 

dbms_output.put_line('work order creation status:'||l_return_status);

 

 

commit;

END;

/

 

thanks in advance

 

DEV

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points