ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

Get Previous N Working days

Print This Post Email This Post Written by jimstex on May 20th, 2009 | Filed under: ABAP Programs, SAP General

Sample program which will provide you with previous n working days. Any calender id can be specified in the “calid”, 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.
 
CALL FUNCTION 'BKK_ADD_WORKINGDAY'
    EXPORTING
      i_date      = sy-datum
      i_days      = days
      i_calendar1 = calid
    IMPORTING
      e_date      = newdate.
Share

If you like this post, you may as well like these too:

  1. ABAP in 21 Days Download the entire book:- Link Removed – Sorry...
  2. ABAP in 21 days SAMS Teach Yourself ABAP in 21 Days – Download Here(rapidshare)...
  3. Posting to the Previous Period During the first period of the new fiscal year, postings can still be made to the last period of the previous year. Note that you must therefore close inventory adjustment...
  4. Spacebar does not display previous entered values Many times, to retrieve the previous entered value you just press the space bar and that lists all the previous entered values. like this But in rare circumstances, the previous...



Leave a Reply