10. white paper filed service queries erd

9
T-XIS – Oracle Practice Solution Document WHITE PAPER FOR –FIELD SERVICE QUERIES AND ERD Module- Customer Author: Sachin Ingle Creation Date: 13-Sep-2013 Last Updated: 13-Sep-2013 Version: Version 1.0 Company Confidential – For internal use only Page 1 of 9

Upload: sachin-ingle

Post on 24-Oct-2015

12 views

Category:

Documents


2 download

DESCRIPTION

Field Service

TRANSCRIPT

Page 1: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

WHITE PAPER FOR –FIELD SERVICE QUERIES AND ERD

Module- Customer

Author: Sachin Ingle

Creation Date: 13-Sep-2013

Last Updated: 13-Sep-2013

Version: Version 1.0

Company Confidential – For internal use only Page 1 of 9

Page 2: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Contents

Business Scenarios – Entity Relation Ship Diagram.................................3

Business Case: ERD...............................................................................4

Business Solutions: ERD and Query..........................................................................5

Company Confidential – For internal use only Page 2 of 9

Page 3: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Business Scenarios – Entity Relation Ship DiagramDescription of Scenarios:Issue: Entity Relationship Diagram for Field Service Displaying Service request details.

Company Confidential – For internal use only Page 3 of 9

Page 4: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Business Case: ERDDescription of Situation: <Point Wise>Situation: This Query is usefull for future purpose. This diagram will help identify all the tables and joins.

Company Confidential – For internal use only Page 4 of 9

Page 5: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Business Solutions: ERD and Query Description of Situation:

Query

SELECT cib.incident_id, cib.incident_number incident_number, cisl.NAME incident_status, cisl.description incident_status_description, csev.NAME cs_severity, csev.description cs_serverity_des,/* TrackIT 141852 */ csurg.NAME cs_urgency, csurg.description cs_urgency_des, /* TrackIT 141852 */ cib.problem_description incident_description, citl.summary incident_summary, cib.last_update_date last_update_date, cib.last_updated_by last_updated_by, cib.incident_date incident_date, cib.incident_occurred_date incident_occurred_date, cib.incident_resolved_date incident_resolved_date, cib.creation_date incident_creation_date, cib.close_date incident_close_date, cib.open_flag open_flag, cib.problem_code problem_code, look1.description problem_code_description, /* TrackIT 123370 */ cib.current_serial_number current_serial_number, cib.resolution_code resolution_code, look2.description resolution_code_description, /* TrackIT 123370 */ cib.web_entry_flag web_entry_flag, cib.status_flag status_flag, ssp.attribute2 survey_flag, msi.segment1 product, cib.product_name product_name, msi.description product_description, sr_group.group_name owning_group, sr_eng.resource_name support_engineer, cib.sr_creation_channel sr_creation_channel, u.user_name logged_person, ttl.NAME incident_type, ttl.description incident_type_description, hp.party_number customer_number, hca.account_number customer_account, hp.party_name customer_name, hp.address1 address1, hp.address2 address2, hp.address3 address3, hp.address4 address4, hp.city city, hp.state state, hp.postal_code postal_code, hp.country country, cib.site_id site_id, cib.customer_site_id customer_site_id, cii.external_reference configuration, cii.serial_number serial_number, sr_party.sub_party_name contact_name, -- cgcv.phone_country_code phone_country_code, -- cgcv.phone_area_code phone_area_code, cgcv.phone_number phone_number, -- cgcv.email_address email_address, cia.creation_date group_assigned_date, --Added for trackit# 213714 cib.incident_attribute_1 software_version --Raj-added for TrackIT# 248845 -- nuan_cs_notes (cib.incident_id) consolidated_notes

Company Confidential – For internal use only Page 5 of 9

Page 6: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document -- Raj-added for TrackIt#2--36960 FROM fnd_user u, cs_hz_sr_contact_points cp, csi_item_instances cii, hz_parties hp, hz_cust_accounts hca, cs_incident_types_tl ttl, mtl_system_items_b msi, cs_incident_statuses_tl cisl, cs_incidents_all_tl citl, cs_incidents_all_b cib, --Added for trackit# 213714 cs_incidents_audit_b cia, jtf.jtf_rs_groups_tl sr_group, jtf.jtf_rs_resource_extns_tl sr_eng, apps.csc_hz_parties_self_v sr_party, -- apps.xxcust_csc_gs_contacts_v cgcv, hz_parties ssp, cs_lookups look1,/* TrackIT 123370 */ cs_lookups look2,/* TrackIT 123370 */ cs_incident_severities_tl csev,/* TrackIT 141852 */ cs_incident_urgencies_tl csurg/* TrackIT 141852 */WHERE 1 = 1-- AND cib.org_id = 539 --Commented for Trackit 166662-- AND cib.incident_number = '100907330' --'100796748' AND cib.incident_id = citl.incident_id AND citl.LANGUAGE = 'US' AND cib.incident_status_id = cisl.incident_status_id AND cisl.LANGUAGE = 'US' AND cib.incident_type_id = ttl.incident_type_id AND ttl.LANGUAGE = 'US' AND cib.inventory_item_id = msi.inventory_item_id(+) AND cib.inv_organization_id = msi.organization_id(+) AND cib.customer_id = hp.party_id AND cib.account_id = hca.cust_account_id(+)-- AND hca.party_id = hp.party_id(+)/*Commented for Trackit #279155*/ AND cib.customer_product_id = cii.instance_id(+) AND cib.incident_id = cp.incident_id(+) --AND cp.party_id = cgcv.party_id(+) AND cp.party_id = sr_party.party_id(+) AND cp.primary_flag = 'Y' AND cib.created_by = u.user_id AND ssp.party_id(+) = cp.party_id AND sr_eng.resource_id(+) = cib.incident_owner_id AND sr_group.GROUP_ID(+) = cib.owner_group_id AND cib.problem_code = look1.lookup_code(+)/* TrackIT 123370 */

Company Confidential – For internal use only Page 6 of 9

Page 7: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document AND look1.lookup_type(+) = 'REQUEST_PROBLEM_CODE'/* TrackIT 123370 */ AND cib.resolution_code = look2.lookup_code(+)/* TrackIT 123370 */ AND look2.lookup_type(+) = 'REQUEST_RESOLUTION_CODE'/* TrackIT 123370 */ AND cib.incident_severity_id = csev.incident_severity_id(+)/* TrackIT 141852 */ AND cib.incident_urgency_id = csurg.incident_urgency_id(+)/* TrackIT 141852 *//* Added for trackit# 213714 */ AND cia.incident_id = cib.incident_id AND cia.incident_audit_id = (SELECT MAX (incident_audit_id) FROM cs_incidents_audit_b cia1 WHERE cia1.incident_id = cib.incident_id -- AND cia1.GROUP_ID = cib.owner_group_id -- AND cia1.updated_entity_code = 'SR_HEADER' -- AND cia1.change_group_flag = 'Y' )/* end of code for trackit# 213714 */

Company Confidential – For internal use only Page 7 of 9

Page 8: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Company Confidential – For internal use only Page 8 of 9

Page 9: 10. White Paper Filed Service Queries ERD

T-XIS – Oracle Practice Solution Document

Navigation: Description

Company Confidential – For internal use only Page 9 of 9