Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

get last date of the current month

Former Member
0 Kudos

Hi all,

Is there any FM used to get the last date of

sy-datum.

Regards,

bala

1 ACCEPTED SOLUTION

Former Member
0 Kudos

data : v_lastdate type sy-datum.

CALL FUNCTION 'LAST_DAY_OF_MONTHS'

EXPORTING

DAY_IN = sy-datum

IMPORTING

LAST_DAY_OF_MONTH = <b>v_lastdate. <--Gives you the last day of a Month</b>

Message was edited by: Srikanth Kidambi

5 REPLIES 5

Former Member
0 Kudos

How about FM: SG_PS_GET_LAST_DAY_OF_MONTH

Kind Regards

Eswar

0 Kudos

check..

RE_LAST_DAY_OF_MONTH

SG_PS_GET_LAST_DAY_OF_MONTH

parameters: p_fdate like sy-datum.
DATA: M_DATE LIKE SY-DATUM,
CALL FUNCTION 'LAST_DAY_OF_MONTHS' "#EC EXISTS
EXPORTING
DAY_IN = P_FDATE
IMPORTING
LAST_DAY_OF_MONTH = M_DATE.
case mdate+3(2).
when 30.
write: '30 days'.
when 28.
write: '28 days'.
when 29.
write: '29 days'.
when 31.
write: '31 days'.
endcase.

Former Member
0 Kudos

data : v_lastdate type sy-datum.

CALL FUNCTION 'LAST_DAY_OF_MONTHS'

EXPORTING

DAY_IN = sy-datum

IMPORTING

LAST_DAY_OF_MONTH = <b>v_lastdate. <--Gives you the last day of a Month</b>

Message was edited by: Srikanth Kidambi

Former Member
0 Kudos

Hi

Use FM SG_PS_GET_LAST_DAY_OF_MONTH

Regards,

Raju

anversha_s
Active Contributor
0 Kudos

hi,

use this FM - >

SG_PS_GET_LAST_DAY_OF_MONTH

HRVE_LAST_DAY_OF_MONTH

SLS_MISC_GET_LAST_DAY_OF_MONTH

rgds

anver

if hklped mark points