‎2006 Jul 19 12:07 PM
hi all,
i got a requirement as given below
(A) If job run date is July 13, 2006 (Thursday) 2:00 AM, report should fetch the data from July 10, 2006 (Monday) 2:00AM till July 13, 2006 1:59AM.
(B) If job run date is July 10, 2006 (Monday) 2:00 AM, report should fetch the data from July 03, 2006 (Monday of last week) 2:00AM till July 10, 2006 1:59AM.
Can u pls ell me the logic behind this
‎2006 Jul 19 12:11 PM
use function module
BWSO_DATE_GET_FIRST_WEEKDAY
and enter the date u will get the first day of the week
time i think u can hard code and fetch the required jobs in it
Harish
reward if useful
‎2006 Jul 19 12:11 PM
use function module
BWSO_DATE_GET_FIRST_WEEKDAY
and enter the date u will get the first day of the week
time i think u can hard code and fetch the required jobs in it
Harish
reward if useful
‎2006 Jul 19 12:16 PM
1) pass job run date to the fm GET_WEEK_INFO_BASED_ON_DATE, to get the last monday
Regards,
ravi
‎2006 Jul 19 12:19 PM
Hello,
You can use the FM WEEK_GET_FIRST_DAY to get the first day (monday) fo the week. You have to pass the week to get the date. Use FM 'DATE_GET_WEEK' to get the week.
Fill the range as I BT 'date of monday' 'sy-datum'.
Select the date of latest monday and do the selection.
Reagrds,
Naimesh
‎2006 Jul 19 12:31 PM
Hi,
I think your requirement is to fetch the data from the week's first day.
You can use function module WOD1_GET_FIRST_DAY
to get the first day of the week. Use the Job run date and get first day of week using this function module. If the Function module returns the same day as first day, then consider the previous weeks first day.
Example - When Job run on July 13th, the function module would return Jul 10th as first day.
When the Job run date is Jul10, function module would return Jul 10 itself. In this case, feed Job run date - 1 to the function module, so that you get previous week's first day.
Hope this helps.
Regards,
HR