2008 Feb 01 10:19 AM
Hi all,
Do we have any function module which Convert Period & Year to the first date of that period & year?
For Eg. 02 2008 gets converted to 01.02.2008
Thanks and regards
Swati
2008 Feb 01 10:22 AM
Use function module FIRST_DAY_IN_PERIOD_GET if you have the society.
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = w_gjahr " Year
i_periv = t001-periv " Fiscal year variant
i_poper = w_poper " Period/Month
IMPORTING
e_date = w_date
EXCEPTIONS
OTHERS = 1.
Else, for pure calendar, concatenate year, period and '01' in a DATS field.
w_date+0(4) = w_year.
w_date+4(2) = w_period.
w_date+6(2) = '01'.
Regards
2008 Feb 01 10:22 AM
Use function module FIRST_DAY_IN_PERIOD_GET if you have the society.
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = w_gjahr " Year
i_periv = t001-periv " Fiscal year variant
i_poper = w_poper " Period/Month
IMPORTING
e_date = w_date
EXCEPTIONS
OTHERS = 1.
Else, for pure calendar, concatenate year, period and '01' in a DATS field.
w_date+0(4) = w_year.
w_date+4(2) = w_period.
w_date+6(2) = '01'.
Regards
2008 Feb 01 10:22 AM
hi Swati,
you can try FM FIRST_DAY_IN_PERIOD_GET
hope this helps
ec
2008 Feb 01 10:23 AM
Hi,
Check this FM PERIOD_DAY_DETERMINE
Check this Code, Given in another thread
report zrich_0001 .
data: start_date type sy-datum,
end_date type sy-datum.
parameters: p_spbup type spbup.
start-of-selection.
start_date = p_spbup.
start_date+6(2) = '01'.
call function 'LAST_DAY_OF_MONTHS'
exporting
day_in = start_date
importing
last_day_of_month = end_date.
write:/ start_date, end_date.
Regards,
Satish
Edited by: Satish Panakala on Feb 1, 2008 10:24 AM
2008 Feb 01 10:23 AM
Please check FM - FIRST_DAY_IN_PERIOD_GET, Pass period + year + fiscal year variant (T009B table)
Regards
Nilesh Shete
2008 Feb 01 10:25 AM
Hi,
FIRST_AND_LAST_DAY_IN_YEAR_GET
Import parameters Value
I_GJAHR 2007
I_PERIV 24
Export parameters Value
E_FIRST_DAY 01.01.2007
E_LAST_DAY 31.12.2007
2008 Feb 01 10:27 AM
Hi,
You can use the below FM :
FIRST_DAY_IN_PERIOD_GET
Thanks,
Sriram Ponna.