2009 Feb 06 3:30 PM
Hi guys,
I have a Requirement to calculate the First day in a Week in a Fiscal year .
The FM GET*FIRST_DATE and all are for Calender year.
Is there any FM to calculate the First in a Week in a Fiscal year.
For eg. They will give 200826.
In this 26 is the Week.
I need to find the First date value in that Week.
Thanks,
Gokul
2009 Feb 06 3:35 PM
You can use FM 'WEEK_GET_FIRST_DAY' to get the first date in that week.
Pranav
2009 Feb 06 3:35 PM
You can use FM 'WEEK_GET_FIRST_DAY' to get the first date in that week.
Pranav
2009 Feb 06 3:39 PM
A simple search in SE37 would return FIRST_DAY_IN_PERIOD_GET.
~Suresh
2009 Feb 06 4:09 PM
Hello ,
U can check with HRFIRSTdATE*
oR U CAN find some FMS where it will take BUKRS as export parameter from u r program so that u can get the date with refernec to the Fiscal Year .
Regards
2009 Feb 06 5:11 PM
hi,
This can be achieved in the following way too...
considered the first day of gregorian calendar that is 01011900, subtract this date from the first date of the fiscal year,
The result you get take mod of it towards 7 i.e
day = res mod 7.
The above result varies from 0-6, which is mapped to sun-sat using a case statement.
I have used the similar method in one of the requirement and it worked for me.
Hope it helps you..
Thanks
Sharath
2009 Feb 07 6:14 AM
Hi Gokul...
Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
Its similar to the above one but instead of writing case statement you can achive the following.
data : w_res type i,
w_data type d,
w_res = w_date mod 7.
w_date = w_date - w_res.
write w_date.
This works.
Regards,
Siddarth