thespot4sap.com independent sap information
 

get SAP Access - pay monthly

SAP Tutorials    Online SAP Training    SAP CBT's    SAP Forums    SAP Articles    SAP Jobs    SAP Resumes
  SAP Access    SAP Blogs    SAP Books     Links     SAP Vendor Directory     Submit Content    Search
Previous posts in SAP ABAP
Page 5420 of 5660

Get Last Date of Month in ABAP/4

Blogger : howforge.com - Share Know-How
All posts : All posts by howforge.com - Share Know-How
Category : SAP ABAP
Blogged date : 2006 Jan 09


*&---------------------------------------------------------------------*
*&     Form get_last_date_of_month
*&---------------------------------------------------------------------*
*      get last date of month
*----------------------------------------------------------------------*
*     -->P_BEGDA is the date in month that you want to know last date

*     <--P_ENDDA last date of month that system will return to you
*----------------------------------------------------------------------*
form get_last_date_of_month using   p_begda
                           changing p_endda.
CALL FUNCTION ’LAST_DAY_OF_MONTHS’

EXPORTING
   day_in                = p_begda
 IMPORTING
  LAST_DAY_OF_MONTH      = p_endda
 EXCEPTIONS
  DAY_IN_NO_DATE         = 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.

endform.                   " get_last_date_of_month



Read comments or post a reply to : Get Last Date of Month in ABAP/4
Page 5420 of 5660

Newest posts
New Page 1

 

 

About Us   Contact Us   Privacy   Disclaimer   Feedback   Email Discussion   Newsletter  

Copyright © - Independent SAP Information
Learn XML, Guesthouses and B&B's