Friday, November 19, 2010

Function Module gives the Quarter start date and end date.

 l_month = sy-datum+4(2).

* Set quarter
  ex_quarter-q = trunc( ( l_month - 1 ) / 3 ) + 1.
 ex_quarter-q = ex_quarter-q - 1
* Set year
  ex_quarter-year = sy-datum(4).

* the below Function Module gives you the Quarter start date and end date.
call function 'HR_99S_GET_DATES_QUARTER'
    exporting
      im_quarter       = ex_quarter-q
      im_year          = ex_quarter-year
    importing
      ex_begda         = ex_quarter-begda             " Quarter Start date
      ex_endda         = ex_quarter-endda.            " Quarter End date

No comments:

Post a Comment