11-21-2005 10:42 PM
I would like, your help writing a code, to:
Determine ZFISCYTD: Number of Calendar Days from the First Day of Current fiscal period to Today Date (including weekend days)
If needed, I already have:
Variable 0P_FPER: return either Previous Business Day or Last day of the entered period
11-21-2005 11:00 PM
Use the following function module to get the first day of the period. Then subtract from today.
data:
period type t009b-poper,
year type t009b-bdatj.
data: number_of_days type i.
data: first_day_of_period type sy-datum.
year = sy-datum+0(4). " Year
period = '01'. " Fiscal Period
call function 'FIRST_DAY_IN_PERIOD_GET'
exporting
i_gjahr = year
i_monmit = 00
i_periv = 'YT' "Variant
i_poper = period
importing
E_DATE = first_day_of_period.
number_of_days = sy-datum - first_day_of_period.
Welcome to SDN!! Please reward points for helpful answers and mark your posts as solved when solved. Thanks.
Regards,
Rich Heilman
11-21-2005 11:00 PM
Use the following function module to get the first day of the period. Then subtract from today.
data:
period type t009b-poper,
year type t009b-bdatj.
data: number_of_days type i.
data: first_day_of_period type sy-datum.
year = sy-datum+0(4). " Year
period = '01'. " Fiscal Period
call function 'FIRST_DAY_IN_PERIOD_GET'
exporting
i_gjahr = year
i_monmit = 00
i_periv = 'YT' "Variant
i_poper = period
importing
E_DATE = first_day_of_period.
number_of_days = sy-datum - first_day_of_period.
Welcome to SDN!! Please reward points for helpful answers and mark your posts as solved when solved. Thanks.
Regards,
Rich Heilman
11-21-2005 11:02 PM
Hi
Use FM FIRST_DAY_IN_PERIOD_GET to get first day in period, Difference betwn the FM date and current date would be what you need.
Regards
Kalpana