Work order Progress - Positions
This table displays work order positions and provides information about their completion progress. The table uses color-coding to show progress and delays, depending on the start and delivery date. It also shows the quantity that has been produced. The grid selects the positions using a data range. The default data range is as follows:
•All positions (opened and closed positions) between the previous day and the next 7 days. •All positions (opened and closed positions) with delivery date between the last 5 days and the next day. •All open positions (from open work orders only) with start date in the past (earlier than the previous day).
Adjusting the date range
The number and operator can be changed using SQL (GETDATE() - 5) or SAP HANA add_days(current_date, -5). The number is always interpreted as the number of days which is added or subtracted depending on the operator. The result includes date and time in MSSQL, but not in HANA.
Date
|
MSSQL
|
HANA
|
Previous day
|
(GETDATE() - 1)
|
add_days(current_date, -1)
|
Next day
|
(GETDATE() + 1)
|
add_days(current_date, +1)
|
Last five days
|
(GETDATE() - 5)
|
add_days(current_date, -5)
|
Next five days
|
(GETDATE() + 5)
|
add_days(current_date, +5)
|
It is sometimes useful to get all the work orders from the previous day, regardless of the time of the day in SQL. For example, if today is “2019-01-10 10:28:00” the expression (GETDATE() - 1) results in “2019-01-09 10:28:00”. The time is the same, which means that if the query is set to give the work orders from the previous day, it omits the work orders that happened during that day before the current time 10:28:00. It is possible to get the date at 00:00 using the expression:
Previous day at 00:00:00: DATEADD(DAY, DATEDIFF(DAY, 1, GETDATE()), 0)
Last 30 days 00:00:00: DATEADD(DAY, DATEDIFF(DAY, 30, GETDATE()), 0)
Auto filter row
The first row of the position table is an auto filter row, that allows the user to filter for specific information in a column, for example, search for a specific work order number or a specific date.
The filter for each row works as follows:
Column
|
Description
|
Table Field
|
Start Date
|
Start date of the position.
Red: The position was supposed to be started (before the current day), but it is not in progress.
|
View: BEASV_WORKORDER_POS.StartDate
|
Work Order
|
Work order number.
|
View: BEASV_WORKORDER_POS.DocEntry
|
Position
|
Position number in the work order.
A green checkmark in this field indicates that the position is closed (
). If the position is closed the row will be completely green.
|
View: BEASV_WORKORDER_POS.LineNumber
|
Priority
|
Priority of the work order.
|
View: BEASV_WORKORDER_POS.Priority
|
Item Code
|
Item Code.
|
View: BEASV_WORKORDER_POS.ItemCode
|
Item Name
|
Item Name.
|
View: BEASV_WORKORDER_POS.ItemName
|
InWork
|
0-Blank: No work started on position.
1-Green Icon: Active position, that has an active work order.
2-Yellow Icon: A position that has time receipts, but is not active.
|
View: BEASV_WORKORDER_POS.InWork
|
Total Quantity
|
Total quantity to produce (measured in the warehouse unit).
|
View: BEASV_WORKORDER_POS.QuantityWhsUnit
|
Quantity Produced
|
Sum of the quantities that have been produced or received (measured in the warehouse unit).
|
View: BEASV_WORKORDER_POS.QuantityProduced
|
Warehouse Unit
|
Warehouse unit.
|
View: BEASV_WORKORDER_POS.WhsUnit
|
Quantity progress (%)
|
A blue bar that represents the percentage of the quantity produced out of the total quantity.
|
Calculated field in dashboard:
[QuantityProduced] * 100 / [Total Quantity]
|
Delivery Date
|
Delivery date.
Red: A position that had to be delivered (before the current day), but the total quantity has not been produced.
|
View: BEASV_WORKORDER_POS.DELIVERYDATE
|
Work Time (min)
|
Total time of work in minutes for the position.
|
View: BEASV_WORKORDER_POS.WORKTIME
|
Customer Code
|
Customer code.
|
View: BEASV_WORKORDER_POS.CardCode
|
Customer Name
|
Customer name.
|
View: BEASV_WORKORDER_POS.CardName
|
MSSQL examples of the Work order progress - Positions grid queries
-- All positions (opened and closed) between the previous day (at 00:00) and the next 7 days:
(("BEASV_WORKORDER_POS"."StartDate" > DATEADD(DAY, DATEDIFF(DAY, 1, GETDATE()), 0)
AND "BEASV_WORKORDER_POS"."StartDate"< (GETDATE()+7) )
-- All the open positions from open work orders only with start date in the past (before the previous day)
OR ("BEASV_WORKORDER_POS"."StartDate"< DATEADD(DAY, DATEDIFF(DAY, 1, GETDATE()), 0)
AND "BEASV_WORKORDER_POS"."PositionClosed" != 1
AND "BEASV_WORKORDER_POS"."WorkOrderClosed" != 1 )
--All the positions with delivery in the last 5 days and until the next day
OR ("BEASV_WORKORDER_POS"."DELIVERYDATE" > (GETDATE()-5) AND "BEASV_WORKORDER_POS"."DELIVERYDATE" < (GETDATE()+1)))
HANA examples of the Work order progress - Positions grid queries
-- All positions (opened and closed POSITIONS) between the previous day at 00:00 and the next 7 days)
(("BEASV_WORKORDER_POS"."StartDate" > add_days(current_date, -1)
AND "BEASV_WORKORDER_POS"."StartDate"< add_days(current_date, +7) )
-- All the open positions (FROM OPEN WORK ORDERS ONLY) with start date in the past (before the previous day)
OR ("BEASV_WORKORDER_POS"."StartDate" < add_days(current_date, -1) AND
"BEASV_WORKORDER_POS"."PositionClosed" != 1 AND "BEASV_WORKORDER_POS"."WorkOrderClosed" != 1 )
--Delivery date: All the positions with delivery in the last 5 days and until the next day
OR ("BEASV_WORKORDER_POS"."DELIVERYDATE" > add_days(current_date, -5)
AND "BEASV_WORKORDER_POS"."DELIVERYDATE" < add_days(current_date, +1)))
More information on the date and time functions:
SQL: https://docs.microsoft.com/en-us/sql/t-sql/functions/date-and-time-data-types-and-functions-transact-sql?view=sql-server-2017
Hana: https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/209f228975191014baed94f1b69693ae.html
Help URL: https://help.beascloud.com/beas202106/index.html?positions_area.htm
|