‎2008 Jun 11 6:23 AM
Hi All,
i lke 2 knw no of dys bt a gvn dt's, is thr any fm or logic.
thanks and regards
Sharma
‎2008 Jun 11 6:27 AM
hi,
use this func mod HR_SGPBS_YRS_MTHS_DAYS.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 4:08 PM
‎2008 Jun 11 6:27 AM
‎2008 Jun 11 6:28 AM
hi deepti,
declare a variable of type p (packed integers).
then do as folows
p = dt1 - dt2.
this will give the number of days between the 2 dates.
<REMOVED BY MODERATOR>
regards
Prem Sharma
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 4:09 PM
‎2008 Jun 11 6:31 AM
‎2008 Jun 11 6:33 AM
Hi, Use following FM
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = fromdate
i_date_to = todate
IMPORTING
e_days = no_days.
‎2008 Jun 11 6:34 AM
Hi,
You can try the below FM too.
report zastest.
Data: l_day type i.
start-of-selection.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = sy-datum
i_datum_von = '20080601'
* I_KZ_EXCL_VON = '0'
* I_KZ_INCL_BIS = '0'
* I_KZ_ULT_BIS = ' '
* I_KZ_ULT_VON = ' '
* I_STGMETH = '0'
* I_SZBMETH = '1'
IMPORTING
E_TAGE = l_day
* EXCEPTIONS
* DAYS_METHOD_NOT_DEFINED = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
write : l_day.
ENDIF.
‎2008 Jun 11 7:03 AM
Hi,
Use function module HR_SGPBS_YRS_MTHS_DAYS.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 4:09 PM
‎2008 Jun 11 7:30 AM
Hi Sharma,
Try this FM's
date_convert_to_factorydate,
hr_hk_diff_bt_2_dates.
Regards
Adil
‎2008 Jun 11 7:37 AM
‎2008 Jun 12 4:50 AM
Hi All,
i forgot 2 mention excluding holidays
thanks and regards
Sharma
‎2008 Jun 12 5:09 AM
i dont think you need a FM to do this:
no of days = ( date2 - date1 )
oh forgot to mention:
new no of days = ( no of days - holidays )
pk
‎2008 Jun 12 7:43 PM
Hi,
thanks for ur replies.
points are awarded for appropriate answer.
thanks
D.Sharma