0% found this document useful (0 votes)
5 views

Usage documentation

Uploaded by

devarajulurao
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Usage documentation

Uploaded by

devarajulurao
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Technical Document of Usage Analytics

For
2BM Mobile Work Order
Introduction
This Document gives you an overview of the technical design and implementation about the Usage Analytics
app. Usage Analytics is a web browser is built based on UI5 & Javascript and backend Odata V2 service, it
gives the organization an overview about the daily usage of the 2BM Mobile Work Order app. It shows the
graphical representation and number counts of Users logged, Notifications created & Orders Closed by
Mobile Work Order App. Data can be filtered by Plant & WorkCenter and the reports can be viewed by filter
Daily, Weekly, Monthly & Yearly.

Technical Introduction
Below are the technical objects are created and changes has been made to the existing oData Service of 2BM
Mobile Work Order.
Database tables

• Transaction Log Table: Table name is /TOBMAS/TRANSLOG which will store all transaction
whenever any change, create or delete operations happened in data of product and store activities
like username, entitykey, operation, timestamp, mode (mode is from operation is triggered ) and
order completed flag.
• Staging Table – Table name is /TOBMAS/STG_LOG which is used to store processed result from
log table, use of this table that it stores final data from log table, as in log table we have raw data and
performance of staging table would be better then log table. Staging table will be updated by
background job.
• User Log table – Table name is /TOBMAS/LOG_USER and which store all user which are active in
product for specific day by any mode (online, offline or browser).

Change in the oData service project /TOBMAS/WORKORDER

Two Entity sets need to be added to achieve this.


KPISet - This set will provide data to cards where it calculates.

• All User Active in Day, Week, Month and Year. (USRAC)


• All Work orders closed in a Day, Week, Month and Year. (ORDCL)
• All Notification created in a Day, Week, Month and Year (NOTCR)
KPIHistorySet - This set will provide the detail data where it calculates and shows in graphical representation.

• All Users Active shows the details in Day/Week/Month/Year (USRAC)


• All Work Orders closed shows the details in Day/Week/Month/Year (USRAC)
• All Notifications Created shows the details in Day/Week/Month/Year (USRAC)
Logic to calculate logs

To achieve this class /TOBMAS/CL_TRANSLOG is created, please find logic for methods -

• INSERT_TRANSLOG – This method inserts logs to Log table “/TOBMAS/TRANSLOG” whenever any
operations like Create, Update or Delete happen in work order data through mobile or web app.
• /TOBMAS/TRANSLOG – Purpose of this method is to process raw data from translog table and put it
into staging table, in this method all orders from Translog table will be check against order master
table “AUFK” and get all order which are closed.
This method all check notification from translog table and check against notification table “QMEL”
that if they are newly created by checking “ERDAT” field.
• GET_KPIHISTORYSET – This method is used to provide data set to frontend by calculating logic on
filters provided from frontend.
For USER – Dates collected and if same date finds for another user, then add it in response but this
will be separate entry in case if we have filter of plant and work centre passed from frontend, then
will be different enry for different combination of User, Plant and Work Centre.
Weeks, Month and Year are collected in same way.
For user and Notification – Collection process is same as user but no addition per day entry is
summed up.
• FILTERS - This method is used to collect filters provided from Odata call and collect them in
respective range tables or variable value.
• BLANK_ENTRIES – This method check all records on basis of Day,Week,Month and Year and include
blank records if there is no data in Staging table or LOG user table.
• CAPTURE_LOGIN_USERS – This method is to capture login user in calls and update User log table.

Changes in DPC Extension methods

Re-define certain methods to achieve this functionality.

• /IWBEP/IF_MGW_CORE_SRV_RUNTIME~UPDATE_ENTITY – This method will log all entries in Log


table which are update by Web or mobile app.
• /IWBEP/IF_MGW_CORE_SRV_RUNTIME~CREATE_ENTITY – This is going to store all entries in Log
table which are newly created.

Logic to calculate Staging Table:
The program /TOBMAS/PROCESS_TRANSLOG is used to calculate the staging table “/TOBMAS/STG_LOG”. In
this program we are calling method “modify_staging_tables” of class “/tobmas/cl_translog”.

Get All the entries from table /TOBMAS/STG_LOG where date is greater than 1st of January of the current
year.
To Calculate Notification created by MWO app is as follows.

• Collect all the entries from table /TOBMAS/TRANSLOG where not processed.
• Find the value ‘NotifNo=’ in paremeter entitykey of each entry and collect all the notification
numbers.
• Pass all the notification numbers into table QMEL and check the creation dates.
• Loop through, all the notifications and check if there is an entry already exists in the table
/TOBMAS/STG_LOG with the creation date, Plant & WorkCentre then update the count parameter
(STG_COUNT) else create a new entry with the creation date of the notification.

To Calculate Orders Closed by MWO is as follows.

• Collect all the entries from table /TOBMAS/TRANSLOG where not processed and Orders where closed
(parameter IS_ORDER_TECHO = ‘X’ ).
• Find the value ‘Orderid=’ in the parameter entitykey of each entry where and collect all the order
numbers.
• Pass all the order numbers into table VIAFKOS and check the parameter IDAT2(Technical Completion
Date is not empty).
• Loop through, all the orders and check if there is an entry already exists in the table
/TOBMAS/STG_LOG with the creation date, Plant & WorkCentre then update the count parameter
(STG_COUNT) else create a new entry with the technical completion (VIAFKOS-IDAT2) date.

Once all the staging table is processed then update the parameter ‘PROCESS = ‘X’’ of the table
/TOBMAS/TRANSLOG.

You might also like