Sunday, December 26, 2010

REPORT  ZTEST_NOTEPAD.
DATA:
      date1 LIKE sy-datum,
      date2 LIKE sy-datum,
      day   TYPE p.


START-OF-SELECTION.

  date1      = sy-datum.
  date1+6(2) = '01'.
  date1      = date1 - 1.
  day        = date1 MOD 7.
  IF day = 0.
    day = 7.
  ENDIF.

  day   = day - 1.
  date2 = date1 - day.

  WRITE: 'Last sunday of previous month is', date2.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.