05-13-2008 9:36 AM
Hi,
i have 2 date in yyyymmdd and i wont to find all time how month Between them what is the best way to do that ?
Regards
05-13-2008 9:39 AM
05-13-2008 9:38 AM
05-13-2008 9:39 AM
05-13-2008 9:47 AM
Hi,
i need if i put 01/012/008 - 01/05/2009 Get 15 month there is Fm that do that?
Regards
05-13-2008 9:51 AM
05-13-2008 9:53 AM
If you input
01/05/2009 and 01/01/2008 the difference would be 16 months
subtract 1 from the result .. (as it includes both months)
pass '04' to parameter OUTPUT_FORMAT in the FM ...
05-13-2008 9:58 AM
hi,
i try it with :
01012008
01052009
04
and i get : Exception INVALID_DATES_SPECIFIED
what i miss?
Regards
05-13-2008 10:00 AM
05-13-2008 9:39 AM
Hi,
Use any of the function modules.
HR_GBSXP_GET_MONTHS
HR_PT_GET_MONTHS
Edited by: Velangini Showry Maria Kumar Bandanadham on May 13, 2008 10:57 AM
05-13-2008 9:40 AM
05-13-2008 9:41 AM
Hi,
Use the FM HR_CALC_YEAR_MONTH_DAY or HR_HK_DIFF_BT_2_DATES
Regards,
Santosh
05-13-2008 9:43 AM
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
05-13-2008 9:50 AM
05-13-2008 9:42 AM
hi check this..
HR_HK_DIFF_BT_2_DATES".
or
SD_DATETIME_DIFFERENCE
or CSCP_PARA1_GET_PERIODS
or HR_CALC_YEAR_MONTH_DAY
or HR_HK_DIFF_BT_2_DATES
report zrich_0003
no standard page heading.
data: duration_in_months type i.
parameters: s_date type sy-datum,
e_date type sy-datum.
call function 'DURATION_DETERMINE'
exporting
unit = 'MON'
factory_calendar = 'P6' " Your factory calendar
importing
duration = duration_in_months
changing
start_date = s_date
end_date = e_date
exceptions
factory_calendar_not_found = 1
date_out_of_calendar_range = 2
date_not_valid = 3
unit_conversion_error = 4
si_unit_missing = 5
parameters_not_valid = 6
others = 7.
write:/ duration_in_months.
regards,
venkat
05-13-2008 9:52 AM
Hi,
Use FM
CALL FUNCTION 'FIMA_DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_von = it_crmd_orderadm_h-zzrodate
i_datum_bis = v_sydatum
i_kz_incl_bis = '1'
i_kz_ult_bis = 'X'
i_stgmeth = '2'
i_szbmeth = '6'
IMPORTING
e_tage = no_days.
Award point if it helps