on 12-11-2006 8:42 AM
hi,
can anyone tell how to find first and last day of particular month, where iam going to enter date in selection screen.
First day is always 1 , so give v_first_day = '1'.
to get last day
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = sy-datum
IMPORTING
LAST_DAY_OF_MONTH = v_last_date.
also check this
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
You can use the FM 'RP_LAST_DAY_OF_MONTHS' for getting the last day of the month.
First day of every month is 1.
Hope this helps!
Regards,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can use SG_PS_GET_LAST_DAY_OF_MONTH
to get last day of month.
And 1 will always be the first day of month .
regards,
guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please use the following method
<b>CL_RECA_DATA=>GET_DATE_INFO.</b>
Please use the following FM by passing date as input
<b>REAL_ESTATE_CALC_DATE_SLST</b>
Regards
Bhupal Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please see the following code.
Parameters: p_date type sydatum.
data:
lv_month_begin type sydatum,
lv_month_end type sydatum.
CALL FUNCTION 'REAL_ESTATE_CALC_DATE_SLST'
EXPORTING
I_DATE = p_date
* I_DAY_OFFSET = 0
* I_MON_OFFSET = 0
IMPORTING
* E_DATE_POST_END =
E_DATE_MONTH_BEG = lv_month_begin
E_DATE_MONTH_END = lv_month_end
* E_MONTH =
* E_YEAR =
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
Message 'Error' Type 'E'.
ENDIF.
write: lv_month_begin,/ lv_month_end.
Please have look in method code.
Parameters: p_date type sydatum.
data:
lv_month_begin type sydatum,
lv_month_end type sydatum.
CALL METHOD cl_reca_date=>get_date_info
EXPORTING
id_date = p_date
* ID_MONTH_OFFSET = 0
IMPORTING
ED_DATE_MONTH_BEG = lv_month_begin
ED_DATE_MONTH_END = lv_month_end
* ED_MONTH =
* ED_YEAR =
EXCEPTIONS
ERROR = 1
others = 2
.
IF sy-subrc <> 0.
Message 'Error' Type 'E'.
ENDIF.
write: lv_month_begin,/ lv_month_end.
Regards
Bhupal Reddy
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.