on 08-22-2007 12:29 PM
Hi Guys.
I need a function module that converts the given date into the nth. day of the year. For example, if i give 02-Feb,2007 it will return 33. This function needs to be done vice versa so that the nth day can again be converted back to the date of the year.
Thanks a lot for your answers.
Hi,
Use thhe following FM.
<b>Create date = 1/1/2007 hard code it.
prdate = date you supply.
your o/p = day</b>CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
EXPORTING
beg_da = creadate
end_da = prdate
IMPORTING
NO_DAY = day
NO_MONTH =
NO_YEAR =
no_cal_day = days
EXCEPTIONS
dateint_error = 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.
ENDIF.
<i><b>regards
Debjani
Reward points for all helpful answer</b></i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Try this:
DATA: gv_date LIKE sy-datum,
gv_year_start LIKE sy-datum,
gv_days TYPE i.
CONCATENATE sy-datum(4) '0101' TO gv_year_start.
CONCATENATE sy-datum(4) '0203' TO gv_date.
gv_days = gv_date - gv_year_start.
Regards
Tamás
Message was edited by:
Tamás Nyisztor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This function module should solve your problem.
' RP_CALC_DATE_IN_INTERVAL'
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check function module- FIMA_DAYS_AND_MONTHS_AND_YEARS
<b>-Alpesh</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.