Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date Condition

Former Member
0 Likes
781

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
686

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

3 REPLIES 3
Read only

Former Member
0 Likes
687

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

Read only

0 Likes
686

My question is , how to calculate date condition where date should not be later than some time say 11:59p.m

Read only

0 Likes
686

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