ABAP function to convert Current Date to Current Period
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*              http://www-erpgreat.com
*
* Find current period of your Company based on current date
*
REPORT ZPERIOD.

DATA: X_PERIOD LIKE T009B-POPER,
      X_YEAR   LIKE CSSL-GJAHR.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
     EXPORTING
          I_DATE         = SY-DATUM
*         I_MONMIT       = 00
          I_PERIV        = 'K4'
     IMPORTING
          E_BUPER        = X_PERIOD
          E_GJAHR        = X_YEAR
     EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.

WRITE: / 'Your Company Current Period', X_PERIOD, X_YEAR.

*-- End of Program

Read Also
Simple Program that Create Internal Table Dynamically

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.