12-15-2006 2:49 PM
How to get a first day for a year like if i have year as 2006 ...the date should be 1.1.2006 and i need to add 5 years and display should be 1.1.2011.
12-15-2006 2:51 PM
12-15-2006 2:54 PM
12-15-2006 2:57 PM
also check
'HR_JP_MONTH_BEGIN_END_DATE'
IF you have the year why dont you just concatenate '0101' to the year
CONCATENATE year '0101' to get the first date of the year.
12-15-2006 2:54 PM
12-15-2006 2:55 PM
Hi Saranya,
Use FM 'FIRST_AND_LAST_DAY_IN_YEAR_GET' and pass GJAHR as '2006' and PERIV as '24' or 'C1'.
Regards,
Vivek
12-15-2006 2:56 PM
Hi,
Use Fm :FIRST_AND_LAST_DAY_IN_YEAR_GET and pass GJAHR as 2006 and PERIV for fiscal year variant.
12-15-2006 2:59 PM
Here it is,
REPORT zkb_test3.
PARAMETERS: p_year(4) TYPE c, "Year
p_noyr(4) TYPE c. " No of Years to add
START-OF-SELECTION.
DATA: v_year_begin TYPE sy-datum,
v_year_new TYPE sy-datum.
v_year_begin(4) = p_year.
v_year_begin+4(4) = '0101'.
v_year_new(4) = p_year + p_noyr.
v_year_new+4(4) = '0101'.
WRITE:/ v_year_begin, v_year_new.
Regards
Kathirvel
12-15-2006 3:00 PM
Hi Saranya,
Use function module <b>HR_PSF_GET_BEGIN_END_OF_YEAR</b> to get the first and last date of the year.
Just pass date to this fm and it returns first and last day of the year.
DATA:
V_BEGIN_DATE TYPE SY-DATUM,
V_END_DATE TYPE SY-DATUM.
CALL FUNCTION <b>'HR_PSF_GET_BEGIN_END_OF_YEAR'</b>
EXPORTING
imp_begda = SY-DATUM
IMPORTING
EXP_BEGDA = V_BEGIN_DATE
EXP_ENDDA = V_END_DATE.
WRITE:/ 'START DATE: ', V_BEGIN_DATE.
WRITE:/ 'END DATE: ', V_END_DATE.
Thanks,
Vinay
12-15-2006 3:00 PM
check this ..
execute the code.
data : v_date like sy-datum.
data :next_Date like sy-datum.
v_date = sy-datum.
v_date+4(4) = 0101.
write:/ v_date. "first date in a yr
*to get the next date after 5 yrs
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = v_date
days = 00
months = 00
SIGNUM = '+'
years = 05
IMPORTING
CALC_DATE = next_date.
write:/ 'date 5 yrs aftr', next_date.
regards,
vijay
Message was edited by:
Vijay