Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using the Where Clause to Unlock QBR Reporting Maximo Ad Hoc Reporting Tom Rosenburg, General Motors Maximo User Group Summit 2015.

Similar presentations


Presentation on theme: "Using the Where Clause to Unlock QBR Reporting Maximo Ad Hoc Reporting Tom Rosenburg, General Motors Maximo User Group Summit 2015."— Presentation transcript:

1 Using the Where Clause to Unlock QBR Reporting Maximo Ad Hoc Reporting Tom Rosenburg, General Motors Maximo User Group Summit 2015

2 Spring Hill Facility 6.9 million square feet --- 2,100 acres. 40 miles south of Nashville Produced Saturn vehicles Current Operations Future Operations

3 Maximo at GM Version 7.1.1.7 on Oracle Over 10,000 users Use QBR Use Scheduler Reporting tools Native Query Based Reporting (QBR) Crystal Reports Native BIRT reporting

4 Query Based Reporting QBR is a simple, Ad-hoc reporting tool integrated into Maximo. Use built-in wizard to build QBR’s. Use queries built on a Maximo List tab or build/expand using SQL expressions to build queries that return the data set that you wish to build a QBR on.

5 How GM Uses QBR Specific Business Use Cases Examples of Ad Hoc Reporting include: Work Orders PM’s Inventory

6 Related Objects/Tables in Queries Display data not stored in the Parent object via Key Fields First field on the left in the list tab or the top left field in the application. Example: ASSETNUM in the ASSET object (or table) The key field is unique in its home object, but can be used many times in another related object, such as ASSETNUM in WORKORDER. Example: Display Asset Description for a Work Order QBR WORKORDER.ASSETNUM = ASSET.ASSETNUM

7 Where Clause and Relational Database Work Order # DescriptionWork Type Location Site ASSETNUMStatusEstim ated Labor Hours Actual Labor Hours 3637480Monthly /GAGELAB/COMPUTER MAINT OP. 100/110 Gage Bench PMPHDMACH1536PHDG100COMP0:300:25 3637692PBKMCMM1 Block South ZeissPMPBLKMACH1536PBKMCMM1COMP0:301:00 3637693PBKMCMM2 Block North ZeissPMPBLKMACH1536PBKMCMM2COMP0:300:45 ASSETNUMDescriptionManufacturer Site LocationStatus PBKMCMM1Block South ZeissNOMANUFACT1536PBLKMACHOPERATING PBKMCMM2Block North ZeissNOMANUFACT1536PBLKMACHOPERATING PCRXCMMCrank ZeissNOMANUFACT1536PCRKMACHOPERATING “Work Order” Object/Table (sample) “Asset” Object/Table (sample)

8

9 Work Orders for Assets by MFG QBR for all work orders completed for assets manufactured by Zeiss. Click in the field and use the F1 key or, Alt + F1 to see which table and field to use in your SQL Where Clause

10 SQL Where Clause ((woclass = 'WORKORDER' or woclass = 'ACTIVITY') and historyflag = 0 and istask = 0 and siteid = '1536') and assetnum in (select assetnum from asset where manufacturer = ‘ZC01’)

11 Tip Use Integer Fields first Typically indexed (historyflag = 0 and istask = 0 and siteid = '1536' and woclass = 'WORKORDER' ) and assetnum in (select assetnum from asset where manufacturer = ‘ZC01')

12

13 Result Set

14

15

16

17

18 Date Ranges (historyflag = 0 and istask = 0 and siteid = '1536' and woclass = 'WORKORDER' ) and status = 'COMP' and actfinish > sysdate-30 and assetnum in (select assetnum from asset where manufacturer = 'ZC01')

19 Add or Remove Fields

20

21

22

23

24

25

26

27 Inventory Example Use Case: Find inventory where the standard cost is greater than $100. The standard cost field is not in the inventory table, it is in the invcost table. SQL Where Clause (status != 'OBSOLETE' and siteid = '1536' and itemnum in (select itemnum from invcost where STDCOST > 100 and siteid = '1536'))

28

29 1.Open Inventory app 2.Run the Where Clause 3.From List Tab, click “Select Action”  Run Reports 4.Choose “Create Report” 5.Select Style then Fields for the QBR 6.Group by ITEMNUM 7.Report Title and check “Save Report” box. 8.Submit to run the QBR. 1.Open Inventory app 2.Run the Where Clause 3.From List Tab, click “Select Action”  Run Reports 4.Choose “Create Report” 5.Select Style then Fields for the QBR 6.Group by ITEMNUM 7.Report Title and check “Save Report” box. 8.Submit to run the QBR.

30 Inventory with Standard Cost Greater Than $100

31 ( historyflag = 0 and istask = 0 and siteid = '1536' and woclass = 'WORKORDER' and (actfinish > (trunc(sysdate, 'day') - 6.08 ) ) and (actfinish < (trunc(sysdate, 'day') - 1.08 )) and persongroup in ('3_VIS','PS')) 3 rd Shift Completed Work Orders Example

32

33

34 Time Based SQL Expression (siteid = '1536' and istask = 0 and historyflag = 0 and woclass = 'WORKORDER' and status = 'COMP' and persongroup in ('PRMC','PREL','PRTD') and actfinish > trunc(sysdate-1) and actfinish < trunc(sysdate))

35

36

37

38 Step 1: The Where Clause Use Case: Find Work Orders with missing crafts. I need to create a QBR to email to the area CAC (Planner) letting them know to correct these work orders Create the Where Clause: (historyflag = 0 and siteid = '1536' and istask = 0 and woclass = 'WORKORDER and craft is null and location in (select y.location from locancestor y where y.siteid = '1536' and y.ancestor = 'EN.LGE')) Highlight and Copy “Where Clause”

39 Step 2: Copy Where Clause into Maximo Click the arrow next to “Advanced Search”

40 Step 2.5: Copy Where Clause into Maximo Click on “Where Clause”

41 Step 3: Paste the Where Clause into the “Current Query” window

42 Step 4: Create the QBR From “List Tab” with Results showing Select Action Run Reports Click “Create Report”

43 Step 5: QBR Properties Style User Friendly Name Public or Not?

44 Select whether to use the current query when ever the report is run. Select the fields you want on the report. Step 6: Select Fields for the Report

45 Step 7: Format the Report Sort, group and/or filter In this case, I grouped by PERSONGROUP

46 Step 8: Run Report or Schedule for Future Run Example: The first of each month at 8:00 AM.

47

48 LOCANCESTOR IS A GREAT SQL TOOL! Locancestor table can be found in system configuration, where ancestor is the same as location

49 LOCANCESTOR Ancestor is EN.LGE for all the child locations and their children, if any

50 LOCANCESTOR Table ( historyflag = 0 and istask = 0 and siteid = '1536' and status != 'COMP' and worktype IN ('PROJ','CM') and LOCATION IN (select y.location from locancestor y where y.siteid = '1536' and y.ancestor= 'EN.LGE'))

51 (status !='DECOMMISSIONED') and siteid = '1536' and EQ9 != 'CARRIER' and assetnum in (select x.asset from pm x where x.persongroup = 'CARRIER' and x.PMEQ1 = 'CARRIER' and x.route is null) SQL Expression Using Custom Fields

52 Current Month Data Start Center Results & QBR’s ( historyflag = 0 and istask = 0 and woclass = 'WORKORDER' and siteid in (select LOCATIONSITE from PERSON where PERSONID =:USER) and persongroup in (select persongroup from PERSONGROUPTEAM where RESPPARTYGROUP = :USER) and (pmnum is not null or (parent is not null and jpnum is not null)) and targcompdate >= add_months (trunc (sysdate, 'MM'), +0) and targcompdate < last_day(trunc(sysdate))+1)

53

54 Work Orders Missing Target Start Date for an Area (siteid = '1536' and historyflag = 0 and istask = 0 and woclass = 'WORKORDER' and targcompdate is null and REPORTEDBY = 'CIMPLICITY' and status != 'COMP' and location in (select location from locancestor where ancestor = 'EN.LGE'))

55 Current Week Monday through Sunday ( historyflag = 0 and istask = 0 and siteid = '1536' and woclass = 'WORKORDER' and (targcompdate >= trunc(SYSDATE, 'W') + 1) and (targcompdate <= trunc(SYSDATE, 'W') + 7))

56 Date Examples First day of current week(sunday) select TRUNC(SYSDATE, 'Day') from dual; First day of next week(sunday) select TRUNC(SYSDATE+7, 'Day') from dual; First day of previous week(sunday) select TRUNC(SYSDATE-7, 'Day') from dual; First day of current month select TRUNC(SYSDATE, 'Month') from dual; Last day of previous month select last_day(add_months(sysdate,-1))

57 More Date Examples First day of current year select TRUNC(SYSDATE, 'Year') from dual; First day of previous year select TRUNC(TRUNC(SYSDATE, 'Year')-1, 'Year') from dual; First day of next year select ADD_MONTHS(TRUNC(SYSDATE, 'Year'),12) from dual; First Day of Current quater select TRUNC(SYSDATE, 'Q') from dual; First Day of Previous Quarter select ADD_MONTHS(TRUNC(SYSDATE, 'Q'),-3) from dual; First Day of Next Quarter select ADD_MONTHS(TRUNC(SYSDATE, 'Q'),3) from dual;

58 Maximo 7.6 Enhancements to QBR: Create Calculated Fields

59

60 7. 6 Edit QBRs

61 QBR’s are a simple way to create Adhoc reports Use SQL Expressions Maximo 7.6 QBR’s enhancements: summarize, edit, and use expressions Questions? Conclusion


Download ppt "Using the Where Clause to Unlock QBR Reporting Maximo Ad Hoc Reporting Tom Rosenburg, General Motors Maximo User Group Summit 2015."

Similar presentations


Ads by Google