This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
SAP Netweaver BW. For more information, visit the Business Intelligence homepage.
Summary
In quite a few of the Sales requirement, users will ask for Calendar week analysis and reports based on Calendar week. Such requirements will be satisfied using standard time characteristics viz 0CALWEEK, 0CALQUARTER.
But in certain scenarios, users will ask for Fiscal Week and to achieve the same we need to write logic based on the Date, Fiscal Year and Fiscal Year variant. This article addresses the requirement of Fiscal Week and Fiscal quarter in BW/BI Reports.
Author: Sohil Shah
Company: Deloitte Consulting India Pvt. Ltd.
Created on: 7 September 2010
Author Bio
Sohil is working as SAP Netweaver BW consultant at Deloitte Consulting India Pvt. Ltd. He has an experience around 6 years in the field of SAP.
He is the technical reviewer of an SAP Press book “A Practical Guide to SAP Netweaver Business Warehouse 7.0”
Business Requirement ........................................................................................................................................ 3
Step by Step guide ............................................................................................................................................. 3
Other useful Function Modules for dates: ....................................................................................................... 9
Related Content ................................................................................................................................................ 12
Disclaimer and Liability Notice .......................................................................................................................... 13
Step by Step Guide to Fiscal Week and Fiscal Quarter
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
This article addresses the requirement of Fiscal Week and Fiscal quarter in BW/BI Reports.
Business Requirement
In quite a few of the Sales requirement, users will ask for Calendar week analysis and reports based on Calendar week. Such requirements will be satisfied using standard time characteristics viz 0CALWEEK, 0CALQUARTER. But in certain scenarios, users will ask for Fiscal Week and to achieve the same we need to write logic based on the Date, Fiscal Year and Fiscal Year variant.
Difference
If, for a given client, the Fiscal Year (FY) is not same as that maintained in standard SAP system then Fiscal week and Calendar week would be different. For example, if SAP standard FY Variant K4 is used then the FY would be January to December but if for a client the Fiscal Year is, say July to June, and say defined FY Variant is “XY” then in BW we can neither directly use 0CALWEEK for Weekly reporting requirements nor can directly have any time conversion, instead we need to derive Fiscal Week code based on the Date, FY and FY Variant.
Step by Step guide
1. Create a custom InfoObject “ZFISCWEEK” of Data Type “NUMC” length 6. 2. Add “ZFISCWEK” in the given DSO / Cube. 3. Create the transformation rule with type “Routine” with Date (in our example FKDAT – Bill date)
and FY Variant (PERIV) as Source Field Assignment.
Step by Step Guide to Fiscal Week and Fiscal Quarter
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
Enter the Shift unit i.e. “Shift by DAY”, “Shift by Week” etc. (I_SHIFT)
Enter the Shift Unit i.e. 1,2,3…etc (I_SHIFT_UNIT)
Enter the Option i.e. LT (Less Than), GT (Greater Than) etc. (I_OPTION)
FIMA_DATE_SHIFT_WITH_WEEKDAY: To get the Next day as well next week days
Enter the date (I_DATE).
Enter the Shift unit in I_WEEKDAY. If value is „1‟ then it will show Monday of the Next week and if any other number then it will show the according day.
Enter, if required, Number of weeks shift in I_NUMBER_OF_WEEKDAYS.
If you want to stay in the current month only then only make I_FLG_STAY_IN_MONTH = X else leave it blank.
Step by Step Guide to Fiscal Week and Fiscal Quarter
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.