2008 Jun 13 6:12 AM
Hi,
Could anybody assist me, My requirement is to determine delay of delivery date is equal to (goods receipt posting date u2013 planned delivery date) based on the Factory calender as well as Pulic holidays i.e it should not consider both.Is there any function module to find out the date diffrence. The difference should be '+' or '-' OR 'ZERO'. I have used function module 'DAYS_BETWEEN_TWO_DATES' but it is not useful.
Thanks in advance.
Regards.
I.Reddy Prasad.
2008 Jun 13 6:19 AM
Hi,
Check these FM's:
HR_HK_DIFF_BT_2_DATES
HR_99S_INTERVAL_BETWEEN_DATES
Regards,
Narasimha
2008 Jun 13 6:29 AM
Hi Narasimha,
Thanks for your response. I need to find difference between two dates based on the factory calender.please do the needful.
Thanks and Regards.
I.Reddy Prasad.
2008 Jun 13 6:19 AM
Hi,
Check these FM's:
HR_HK_DIFF_BT_2_DATES
HR_99S_INTERVAL_BETWEEN_DATES
FIMA_DAYS_AND_MONTHS_AND_YEARS
Regards,
Narasimha
Edited by: narasimha marella on Jun 13, 2008 7:20 AM
2008 Jun 13 6:20 AM
hi there....
i tried with a simple logic.. lets c if this helps...
declare a variable var of type p.
den do
var = date1 - date2.
this will calculater the difference in days and put it in the variable var.
do reward if helpful.
2008 Jun 13 6:20 AM
hi,
check these func. modules.
CATS_CHECK_FACTORY_DATE
DATE_CONVERT_TO_FACTORYDATE Calendar function: Returns factory calendar date for a date
FACTORYDATE_CONVERT_TO_DATE Calendar function: Returns date for a factory calendar date
LAST_FACTORYDATE_GET Calendar function: Return last factory date for a factory calendar
reward points if hlpful.
2008 Jun 13 6:37 AM
Hi,
CALL FUNCTION 'FI_PSO_DAYS_MONTHS_YEARS_GET'
EXPORTING
i_date_from = gv_budat
i_date_to = gv_eindt
IMPORTING
e_days = gv_diff
e_months = lv_diff_months
e_years = lv_diff_year.
regards
Susheel
2008 Jun 13 6:38 AM
Hi,
Use below logic to solve your problem.
Find the difference between the dates.
g_no_days = date1 - date2.
c_date = date1.
DO g_no_days TIMES.
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
Input: Correct option : '+'
Date : c_date
Factory calendat : 'XX'
Output :
Date : c1_date.
If c_date = c1_date.
count = count + 1.
endif.
c_date = c_date + 1. (increase date by 1 day)
ENDDO.
If holidays or weekend occurs, the c1_date will not be same as C_date.
Hope this help you.