Get Previous N Working days

ABAP Structure

Sample program which will provide you with previous n working days. Any calendar id can be specified in the “called”, you can check the list of configured calendars in the tcode SCAL.

DATA: days TYPE i.
DATA: calid LIKE tfacd-ident value 'Z1'.     
DATA: newdate LIKE sy-datum.
days = -5.
      i_date      = sy-datum
      i_days      = days
      i_calendar1 = calid
      e_date      = newdate.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: