01-25-2008 10:14 AM
hi all,
can anyone help me to find how many days are there for given period that I enter
pls help me on this
points will be rewarded
thanxs & Regards
Rajan Mehta
01-25-2008 10:30 AM
Hello,
Check thsi sample:
DATA: G_F_DIFF TYPE I.
CLEAR G_F_DIFF.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = ENDATE
I_DATUM_VON = STARTDATE IMPORTING
E_TAGE = G_F_DIFF
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2.
Cheers,
Vasanth
01-25-2008 10:17 AM
HI,
THIS MIGHT HEALP YOU OUT
HR_AUPBS_MONTH_DAY
Calculate the years, months, days & cal days between 2 dates.
01-25-2008 10:17 AM
Hello Raja,
Use the Function Module
"NUMBER_OF_DAYS_PER_MONTH_GET" for your query.
And you can use "HR_E_NUM_OF_DAYS_OF_MONTH" also
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
Edited by: Sasidhar Reddy Matli on Jan 25, 2008 3:48 PM
01-25-2008 10:18 AM
hi,
SD_DATETIME_DIFFERENCE
Give the difference in Days and Time for 2 dates
Hope this is helpful, Do rewad.
01-25-2008 10:25 AM
Hi Rajan,
Please look into this, In this FM u can get Days, months and years.
HR_SGPBS_YRS_MTHS_DAYS
regards,
ravi shankar reddy
Edited by: Ravi Shankar Reddy S on Jan 25, 2008 3:56 PM
01-25-2008 10:30 AM
Hello,
Check thsi sample:
DATA: G_F_DIFF TYPE I.
CLEAR G_F_DIFF.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = ENDATE
I_DATUM_VON = STARTDATE IMPORTING
E_TAGE = G_F_DIFF
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2.
Cheers,
Vasanth
01-25-2008 10:34 AM
Hi Rajan
this function module tells yoy the last day of month
means automatically you get how many days in month
RP_LAST_DAY_OF_MONTHS
code:
data: date like sy-datum,
date1 like sy-datum.
date = sy-datum.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = date
IMPORTING
LAST_DAY_OF_MONTH = date1
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2
.
write: date1.