Time Conversion from 0CALDAY
to 0FISCPER
How to derive 0FISCYEAR, 0FISCPER & 0FISCPER3 from
0CALMONTH?
Use formulas in the update rules which are avilable under
TIME CHARs.
Go to your update Rules > select Time Chars
Code For 0FISCPER
* fill the internal table "MONITOR", to make monitor entries
data: l_fiscper type rsfiscper.
call function 'FISCPER_FROM_CALMONTH_CALC'
exporting
iv_calmonth = COMM_STRUCTURE-calmonth
iv_periv = 'K4'
importing
ev_fiscper = l_fiscper.
* result value of the routine
RESULT = l_fiscper.
Code for 0FISCPER3
data: l_fiscper3 type t009b-poper.
call function 'FISCPER_FROM_CALMONTH_CALC'
exporting
iv_calmonth = COMM_STRUCTURE-calmonth
iv_periv = 'K4'
importing
ev_fiscper3 = l_fiscper3.
* result value of the routine
RESULT = l_fiscper3.
Code for 0FISCYEAR
data: l_fiscyear type t009b-bdatj.
call function 'FISCPER_FROM_CALMONTH_CALC'
exporting
iv_calmonth = COMM_STRUCTURE-calmonth
iv_periv = 'K4'
importing
ev_fiscyear = l_fiscyear.
* result value of the routine
RESULT = l_fiscyear.
Just copy and paste the code in your system.
Note: K4 is the Variant. Change Variant according to
your requirement.
Get help for your SAP BW problems
SAP
BW Forum - Do you have a SAP BW Question?
SAP Business Warehouse Books
SAP
BW Books - Certification, Interview Questions and Configuration
SAP BW Tips
SAP BW Tips and
Business Information Warehouse
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com
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.
|