167: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
168: p_value => TO_CHAR(p_eam_wo_rec.workflow_type),
169: p_parameterlist => l_parameter_list);
170: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
171: p_value =>FND_GLOBAL.USER_NAME ,
172: p_parameterlist => l_parameter_list);
173: Wf_Core.Context('Enterprise Asset Management...','Work Order Creation Event','Raising event');
174:
175: Wf_Event.Raise( p_event_name => l_event_name,
224: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
225: p_value => TO_CHAR(p_eam_wo_rec.workflow_type),
226: p_parameterlist => l_parameter_list);
227: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
228: p_value =>FND_GLOBAL.USER_NAME ,
229: p_parameterlist => l_parameter_list);
230: Wf_Core.Context('Enterprise Asset Management...','Work Order Staus Changed Event','Raising event');
231:
232: Wf_Event.Raise( p_event_name => l_event_name,
266: INSERT INTO EAM_WO_WORKFLOWS
267: (WIP_ENTITY_ID,WF_ITEM_TYPE,WF_ITEM_KEY,LAST_UPDATE_DATE,LAST_UPDATED_BY,
268: CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN)
269: VALUES
270: (p_eam_wo_rec.wip_entity_id,p_workflow_name,l_event_key,SYSDATE,FND_GLOBAL.user_id,
271: SYSDATE,FND_GLOBAL.user_id,FND_GLOBAL.login_id
272: );
273:
274:
267: (WIP_ENTITY_ID,WF_ITEM_TYPE,WF_ITEM_KEY,LAST_UPDATE_DATE,LAST_UPDATED_BY,
268: CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN)
269: VALUES
270: (p_eam_wo_rec.wip_entity_id,p_workflow_name,l_event_key,SYSDATE,FND_GLOBAL.user_id,
271: SYSDATE,FND_GLOBAL.user_id,FND_GLOBAL.login_id
272: );
273:
274:
275: WF_CORE.CONTEXT('Enterprise Asset Management...','Work Order Released change event','Building parameter list');
301: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
302: p_value => TO_CHAR(p_eam_wo_rec.workflow_type),
303: p_parameterlist => l_parameter_list);
304: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
305: p_value =>FND_GLOBAL.USER_NAME ,
306: p_parameterlist => l_parameter_list);
307: Wf_Event.AddParameterToList(p_name =>'WARRANTY_STATUS',
308: p_value => TO_CHAR(p_eam_wo_rec.warranty_claim_status),
309: p_parameterlist => l_parameter_list);
359: p_event => 'INSERT',
360: p_wip_entity_id =>p_eam_wo_rec.wip_entity_id,
361: p_organization_id =>p_eam_wo_rec.organization_id,
362: p_last_update_date => SYSDATE,
363: p_last_updated_by => FND_GLOBAL.user_id,
364: p_last_update_login =>FND_GLOBAL.login_id
365: );
366: RETURN;
367: END IF;
360: p_wip_entity_id =>p_eam_wo_rec.wip_entity_id,
361: p_organization_id =>p_eam_wo_rec.organization_id,
362: p_last_update_date => SYSDATE,
363: p_last_updated_by => FND_GLOBAL.user_id,
364: p_last_update_login =>FND_GLOBAL.login_id
365: );
366: RETURN;
367: END IF;
368:
427: p_event => 'UPDATE',
428: p_wip_entity_id =>p_eam_wo_rec.wip_entity_id,
429: p_organization_id =>p_eam_wo_rec.organization_id,
430: p_last_update_date => SYSDATE,
431: p_last_updated_by => FND_GLOBAL.user_id,
432: p_last_update_login =>FND_GLOBAL.login_id
433: );
434: END IF;
435:
428: p_wip_entity_id =>p_eam_wo_rec.wip_entity_id,
429: p_organization_id =>p_eam_wo_rec.organization_id,
430: p_last_update_date => SYSDATE,
431: p_last_updated_by => FND_GLOBAL.user_id,
432: p_last_update_login =>FND_GLOBAL.login_id
433: );
434: END IF;
435:
436: END UPDATE_INTERMEDIA_INDEX;
3548: ,x_msg_data => l_api_msg_data
3549: ,p_wip_entity_id => l_eam_mat_req_rec.wip_entity_id
3550: ,p_operation_seq_num => l_eam_mat_req_rec.operation_seq_num
3551: ,p_organization_id => l_eam_mat_req_rec.organization_id
3552: ,p_user_id => fnd_global.user_id
3553: ,p_responsibility_id => fnd_global.resp_id
3554: ,p_quantity => l_eam_mat_req_rec.requested_quantity
3555: ,p_unit_price => l_eam_mat_req_rec.unit_price
3556: ,p_category_id => l_purch_cat_id
3549: ,p_wip_entity_id => l_eam_mat_req_rec.wip_entity_id
3550: ,p_operation_seq_num => l_eam_mat_req_rec.operation_seq_num
3551: ,p_organization_id => l_eam_mat_req_rec.organization_id
3552: ,p_user_id => fnd_global.user_id
3553: ,p_responsibility_id => fnd_global.resp_id
3554: ,p_quantity => l_eam_mat_req_rec.requested_quantity
3555: ,p_unit_price => l_eam_mat_req_rec.unit_price
3556: ,p_category_id => l_purch_cat_id
3557: ,p_item_description => l_description
3733: ,x_msg_data => l_api_msg_data
3734: ,p_wip_entity_id => l_eam_mat_req_rec.wip_entity_id
3735: ,p_operation_seq_num => l_eam_mat_req_rec.operation_seq_num
3736: ,p_organization_id => l_eam_mat_req_rec.organization_id
3737: ,p_user_id => fnd_global.user_id
3738: ,p_responsibility_id => fnd_global.resp_id
3739: ,p_quantity => (l_eam_mat_req_rec.required_quantity
3740: -nvl(l_total_req_qty,0))
3741: ,p_unit_price => l_eam_mat_req_rec.unit_price
3734: ,p_wip_entity_id => l_eam_mat_req_rec.wip_entity_id
3735: ,p_operation_seq_num => l_eam_mat_req_rec.operation_seq_num
3736: ,p_organization_id => l_eam_mat_req_rec.organization_id
3737: ,p_user_id => fnd_global.user_id
3738: ,p_responsibility_id => fnd_global.resp_id
3739: ,p_quantity => (l_eam_mat_req_rec.required_quantity
3740: -nvl(l_total_req_qty,0))
3741: ,p_unit_price => l_eam_mat_req_rec.unit_price
3742: ,p_category_id => l_purch_cat_id
4471: ,x_msg_data => l_api_msg_data
4472: ,p_wip_entity_id => l_eam_direct_items_rec.wip_entity_id
4473: ,p_operation_seq_num => l_eam_direct_items_rec.operation_seq_num
4474: ,p_organization_id => l_eam_direct_items_rec.organization_id
4475: ,p_user_id => fnd_global.user_id
4476: ,p_responsibility_id => fnd_global.resp_id
4477: ,p_quantity => l_eam_direct_items_rec.requested_quantity
4478: ,p_unit_price => l_eam_direct_items_rec.unit_price
4479: ,p_category_id => l_eam_direct_items_rec.purchasing_category_id
4472: ,p_wip_entity_id => l_eam_direct_items_rec.wip_entity_id
4473: ,p_operation_seq_num => l_eam_direct_items_rec.operation_seq_num
4474: ,p_organization_id => l_eam_direct_items_rec.organization_id
4475: ,p_user_id => fnd_global.user_id
4476: ,p_responsibility_id => fnd_global.resp_id
4477: ,p_quantity => l_eam_direct_items_rec.requested_quantity
4478: ,p_unit_price => l_eam_direct_items_rec.unit_price
4479: ,p_category_id => l_eam_direct_items_rec.purchasing_category_id
4480: ,p_item_description => l_eam_direct_items_rec.description
4641: ,x_msg_data => l_api_msg_data
4642: ,p_wip_entity_id => l_eam_direct_items_rec.wip_entity_id
4643: ,p_operation_seq_num => l_eam_direct_items_rec.operation_seq_num
4644: ,p_organization_id => l_eam_direct_items_rec.organization_id
4645: ,p_user_id => fnd_global.user_id
4646: ,p_responsibility_id => fnd_global.resp_id
4647: ,p_quantity => (l_eam_direct_items_rec.required_quantity
4648: -nvl(l_total_req_qty,0))
4649: ,p_unit_price => l_eam_direct_items_rec.unit_price
4642: ,p_wip_entity_id => l_eam_direct_items_rec.wip_entity_id
4643: ,p_operation_seq_num => l_eam_direct_items_rec.operation_seq_num
4644: ,p_organization_id => l_eam_direct_items_rec.organization_id
4645: ,p_user_id => fnd_global.user_id
4646: ,p_responsibility_id => fnd_global.resp_id
4647: ,p_quantity => (l_eam_direct_items_rec.required_quantity
4648: -nvl(l_total_req_qty,0))
4649: ,p_unit_price => l_eam_direct_items_rec.unit_price
4650: ,p_category_id => l_eam_direct_items_rec.purchasing_category_id
8887:
8888: UPDATE WIP_DISCRETE_JOBS
8889: SET date_released = l_eam_wo_rec.date_released,
8890: last_update_date = SYSDATE,
8891: last_updated_by = FND_GLOBAL.User_Id,
8892: last_update_login = FND_GLOBAL.Login_Id
8893: WHERE wip_entity_id=l_eam_wo_rec.wip_entity_id
8894: AND organization_id=l_eam_wo_rec.organization_id;
8895:
8888: UPDATE WIP_DISCRETE_JOBS
8889: SET date_released = l_eam_wo_rec.date_released,
8890: last_update_date = SYSDATE,
8891: last_updated_by = FND_GLOBAL.User_Id,
8892: last_update_login = FND_GLOBAL.Login_Id
8893: WHERE wip_entity_id=l_eam_wo_rec.wip_entity_id
8894: AND organization_id=l_eam_wo_rec.organization_id;
8895:
8896: END IF; --end of check for work order being released
8945: THEN
8946: update wip_requirement_operations
8947: set released_quantity=required_quantity,
8948: last_update_date = SYSDATE,
8949: last_updated_by = FND_GLOBAL.User_Id,
8950: last_update_login = FND_GLOBAL.Login_Id
8951: where wip_entity_id=l_eam_wo_rec.wip_entity_id
8952: and organization_id=l_eam_wo_rec.organization_id
8953: and required_quantity > 0;
8946: update wip_requirement_operations
8947: set released_quantity=required_quantity,
8948: last_update_date = SYSDATE,
8949: last_updated_by = FND_GLOBAL.User_Id,
8950: last_update_login = FND_GLOBAL.Login_Id
8951: where wip_entity_id=l_eam_wo_rec.wip_entity_id
8952: and organization_id=l_eam_wo_rec.organization_id
8953: and required_quantity > 0;
8954:
9074: --Set the workorder's estimation status to 'Running' and call online cost estimation API CSTPECEP.Estimate_WorkOrder_Grp
9075: UPDATE WIP_DISCRETE_JOBS
9076: SET estimation_status = 2,
9077: last_update_date = SYSDATE,
9078: last_updated_by = FND_GLOBAL.User_Id,
9079: last_update_login = FND_GLOBAL.Login_Id
9080: WHERE wip_entity_id=l_eam_wo_rec.wip_entity_id
9081: AND organization_id=l_eam_wo_rec.organization_id;
9082:
9075: UPDATE WIP_DISCRETE_JOBS
9076: SET estimation_status = 2,
9077: last_update_date = SYSDATE,
9078: last_updated_by = FND_GLOBAL.User_Id,
9079: last_update_login = FND_GLOBAL.Login_Id
9080: WHERE wip_entity_id=l_eam_wo_rec.wip_entity_id
9081: AND organization_id=l_eam_wo_rec.organization_id;
9082:
9083: BEGIN
11901: UPDATE EAM_WORK_ORDER_DETAILS
11902: SET user_defined_status_id=3,
11903: pending_flag='Y',
11904: last_update_date=SYSDATE,
11905: last_update_login=FND_GLOBAL.login_id,
11906: last_updated_by=FND_GLOBAL.user_id
11907: WHERE wip_entity_id= l_eam_wo_comp_rec.wip_entity_id;
11908:
11909:
11902: SET user_defined_status_id=3,
11903: pending_flag='Y',
11904: last_update_date=SYSDATE,
11905: last_update_login=FND_GLOBAL.login_id,
11906: last_updated_by=FND_GLOBAL.user_id
11907: WHERE wip_entity_id= l_eam_wo_comp_rec.wip_entity_id;
11908:
11909:
11910:
11934: INSERT INTO EAM_WO_WORKFLOWS
11935: (WIP_ENTITY_ID,WF_ITEM_TYPE,WF_ITEM_KEY,LAST_UPDATE_DATE,LAST_UPDATED_BY,
11936: CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN)
11937: VALUES
11938: (l_eam_wo_comp_rec.wip_entity_id,l_workflow_name,l_event_key,SYSDATE,FND_GLOBAL.user_id,
11939: SYSDATE,FND_GLOBAL.user_id,FND_GLOBAL.login_id
11940: );
11941:
11942:
11935: (WIP_ENTITY_ID,WF_ITEM_TYPE,WF_ITEM_KEY,LAST_UPDATE_DATE,LAST_UPDATED_BY,
11936: CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN)
11937: VALUES
11938: (l_eam_wo_comp_rec.wip_entity_id,l_workflow_name,l_event_key,SYSDATE,FND_GLOBAL.user_id,
11939: SYSDATE,FND_GLOBAL.user_id,FND_GLOBAL.login_id
11940: );
11941:
11942:
11943: WF_CORE.CONTEXT('Enterprise Asset Management...','Work Order Released change event','Building parameter list');
11966: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
11967: p_value => TO_CHAR(l_workflow_type),
11968: p_parameterlist => l_parameter_list);
11969: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
11970: p_value =>FND_GLOBAL.USER_NAME ,
11971: p_parameterlist => l_parameter_list);
11972: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_NAME',
11973: p_value => l_workflow_name,
11974: p_parameterlist => l_parameter_list);
11994: p_event => 'UPDATE',
11995: p_wip_entity_id =>l_eam_wo_comp_rec.wip_entity_id,
11996: p_organization_id =>l_eam_wo_comp_rec.organization_id,
11997: p_last_update_date => SYSDATE,
11998: p_last_updated_by => FND_GLOBAL.user_id,
11999: p_last_update_login =>FND_GLOBAL.login_id
12000: );
12001: END IF; --end of check for maint. obj. source
12002:
11995: p_wip_entity_id =>l_eam_wo_comp_rec.wip_entity_id,
11996: p_organization_id =>l_eam_wo_comp_rec.organization_id,
11997: p_last_update_date => SYSDATE,
11998: p_last_updated_by => FND_GLOBAL.user_id,
11999: p_last_update_login =>FND_GLOBAL.login_id
12000: );
12001: END IF; --end of check for maint. obj. source
12002:
12003: RETURN;
12720: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
12721: p_value => TO_CHAR(l_workflow_type),
12722: p_parameterlist => l_parameter_list);
12723: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
12724: p_value =>FND_GLOBAL.USER_NAME ,
12725: p_parameterlist => l_parameter_list);
12726: Wf_Core.Context('Enterprise Asset Management...','Work Order Staus Changed Event','Raising event');
12727:
12728: Wf_Event.Raise( p_event_name => l_event_name,
12739: p_event => 'UPDATE',
12740: p_wip_entity_id =>l_eam_wo_comp_rec.wip_entity_id,
12741: p_organization_id =>l_eam_wo_comp_rec.organization_id,
12742: p_last_update_date => SYSDATE,
12743: p_last_updated_by => FND_GLOBAL.user_id,
12744: p_last_update_login =>FND_GLOBAL.login_id
12745: );
12746: END IF; --end of check for EAM workorders
12747:
12740: p_wip_entity_id =>l_eam_wo_comp_rec.wip_entity_id,
12741: p_organization_id =>l_eam_wo_comp_rec.organization_id,
12742: p_last_update_date => SYSDATE,
12743: p_last_updated_by => FND_GLOBAL.user_id,
12744: p_last_update_login =>FND_GLOBAL.login_id
12745: );
12746: END IF; --end of check for EAM workorders
12747:
12748:
13338: Wf_Event.AddParameterToList(p_name =>'WORKFLOW_TYPE',
13339: p_value => TO_CHAR(l_workflow_type),
13340: p_parameterlist => l_parameter_list);
13341: Wf_Event.AddParameterToList(p_name =>'REQUESTOR',
13342: p_value =>FND_GLOBAL.USER_NAME ,
13343: p_parameterlist => l_parameter_list);
13344:
13345: Wf_Event.Raise( p_event_name => l_op_completed_event,
13346: p_event_key => l_event_key,