‎2007 Jun 18 4:21 PM
Hi :
I am working on Plant Maintenance module, i extracted work orders ( aufnr ) from AUFK based on some conditions, i am wondering to know how to code date condition for these.In the selection screen i have s_date option where the user can give any date range .my question is ...after selecting all the work orders i want only those work orders whose status is conformed and date condition is " For the calender week X, work order actual end date ( getri ) should not be later than the week ending of sunday night 11:59pm " .
I am able to extract work orders whose status is conformed , but i need logic for tha date condition.
points will be rewarded ..
Thx.
Raghu
‎2007 Jun 18 4:27 PM
Hi
For selecting records between date range, s_date-low and s_date-high for a record which contains begin date field as begda and end date field as endda (This is for HR tables).
We give date conditions as endda >= s_date-low AND begda <= s_date-high.
When the user clicks on the checkbox, change the s_date-high to the appropriate date and you can filter records accordingly.
Regards
Navneet
‎2007 Jun 18 4:27 PM
Hi
For selecting records between date range, s_date-low and s_date-high for a record which contains begin date field as begda and end date field as endda (This is for HR tables).
We give date conditions as endda >= s_date-low AND begda <= s_date-high.
When the user clicks on the checkbox, change the s_date-high to the appropriate date and you can filter records accordingly.
Regards
Navneet
‎2007 Jun 18 4:48 PM
My question is , how to calculate date condition where date should not be later than some time say 11:59p.m
‎2007 Jun 18 4:59 PM
Hi
You can use the FM 'DATE_COMPUTE_DAY' to get the day. The value 7 means sunday.
After 11:59PM, the next day starts. So, give the end date condition to less than that date.
18/6/2007 will give you some value x (1) with FM. Add 7 - X to get Sunday.
Regards
Navneet