Re: Fiscal period to calender year
Hi Experts,
Please can ayone shed light on how to convert fiscperiod to calender year.If there is a routine please do give me the code.
Regards
Madhu
Hi Anil,
Thanks for the solution. Do we really need to sort the table it_tab.Can you tell whether the following code i wrote is the one you mentioned.
Please find whether the following code in startroutine and update routine is fine.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
DATA: BEGIN OF it_tab OCCURS 0,
BDATJ LIKE T009B-BDATJ,
BUMON LIKE T009B-BUMON,
POPER LIKE T009B-POPER,
PERIV LIKE T009B-PERIV,
END OF it_tab.
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CSu2019myinfosource nameu2019.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
select * from T009B into corresponding fields of
table it_tab. * if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
my update routine-------
ROGRAM UPDATE_ROUTINE.-----calender year in update routine
$$ begin of global - insert your declaration only below this line -
DATA: BEGIN OF it_tab OCCURS 0,
BDATJ LIKE T009B-BDATJ,
BUMON LIKE T009B-BUMON,
POPER LIKE T009B-POPER,
PERIV LIKE T009B-PERIV,
END OF it_tab.
$$ end of global - insert your declaration only before this line -
FORM compute_key_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS8YPSC_02
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/VYCSI_002T-PROFIT_CTR
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
clear it_tab.
READ TABLE it_tab WITH KEY
POPER = COMM_STRUCTURE-POPER.
PERIV = COMM_STRUCTURE-PERIV.
RESULT = it_tab-BDATJ.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
If this is okay i will go ahead.The table t009B has four keys--why do we need to sort the internal table. is it not sufficient if we do a read on it directly after being filled in start routine.
Kindly advice. I will assign you all the points.
Regards
Madhuri
Similar Messages
-
How to create the above Fiscal period & Client Calender
Hi All,
I want to create Client Factory Calendar in BI System.
Source is MS SQL DB(UD Connect) not ECC.
I got the below information from the Business Group:
For the moment we need to implement the Client Calendar. So periods should be according to Client Fiscal Periods. We do not need to implement public holidays, as they donu2019t affect periods.
Client periods always contain complete weeks, starting Monday, finishing Sunday. Periods contain the following number of weeks: 5-4-4-5-4-4-5-4-4-5-4-4.
Please calsri fy the below:
>> Holiday calender is not required. but w/o holiday calender how we can define Factory calendor? Is it possible?
>> How to define the fisacl periods?.
>> When can we use these fiscal periods in the Factory Calender?.
Please provide me step wise procedures..how to create the above Fiscal periods & Client Calender.
Thanks in advance,
Sri.hi siri.
please go though these links
calendar
difference b/n Factory Calendar and Public Holiday Calendar
hope this will help u.
thanks -
Fiscal period to calender month FM
Hi Friends,
Is there any function module to pass the fiscal period and fiscal year value and get calender date, month and year.
Thanks & Regards,
Vallamuthu.mHi,
There are FMs for fetching first and last day of fiscal period.
* This Function Module will get Start date based on the Period, Year and
* Fiscal Year Variant
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = rlv_gjahr
i_periv = rlv_periv
i_poper = rlv_poper
IMPORTING
e_date = lv_mfdate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
* This Function Nodule will get End date based on the Period, Year and
* Fiscal Year Variant
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = rlv_gjahr
i_periv = rlv_periv
i_poper = rlv_poper
IMPORTING
e_date = lv_mldate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
Ganga -
Issues with statistical modeling in calendar months vs 13 fiscal periods
In our demand planning, we plan at the fiscal period level (13 fiscal periods across a year - not matching with calendar months or year). We are having issues (strange results) trying to run the statistical modeling at the fiscal period level versus the calendar month level. Is there a way to run the stat modeling over fiscal periods rather than calendar months? Can we run stat modeling over a specific date range rathn than including the current month?
Hi Stephen, I guess I can assume the following:
1) In the master forecast profile, you have maintained the period indicator and the fiscal year variant
2) You are choosing a forecast strategy in univariate profile (?) that makes use of seasonality, and you are trying to maintain the number of periods in a season as 13 (in our case, our periods are custom, but there are still 12 periods, so different from your case)
3) Your history horizon in master forecast profile is more than the number of periods in the season i.e. history has more than 13 periods of data
If above things are already done and you still face issue when you try to use 13 periods in a season, looks to me like a SAP bug, and it would be best to raise an OSS message to SAP. -
Difference between calender year and fiscal year
Hi Experts,
Can you please let me know What is the difference between calender year and fiscal year?Hi Suresh,
Calender year begins on January 1 and ends on December 31.
A fiscal year (or financial year or accounting reference date) is a 12-month period used for calculating annual ("yearly") financial statements in businesses and other organizations.It can be any 12-month period that a company uses for accounting purposes.
hope its clear
Cheers
Sunil -
How to get total number of days in current Fiscal period/year
Hi,
I need to get total number of days in current Fiscal period/year (current month) and assign it to an infoobject. I need a routine for this. Is there any function module to get this.If possible pls paste the ABAP code also for this task. Thanks in advancehere is the FM:
LAST_DAY_IN_PERIOD_GET
KJ!!! -
Problem with BI-IP and Offsets in Fiscal Period/Year
Hi freinds,
I got a request that is linked to BI-IP and Query design.
The request is that the users should always see a complete year by Fiscal Periods (001.2010...012.2010).
Now the BI-IP should be dynamic. This means in 007.2010 the user should plan 008.2010...012.2010, the previous month are supposed to be the actuals.
Problem: I do not want to change the query each month in order to move the planning month. I tried to use an offset with 11 month actuals. Saying "current month/Year", -1,-2,...,-11 using 11 restricted key figures. Same I did for the planning month. I now limited the Data to 2010 in the filter and anywhere I could. However, the result columns are showing all 22 Month. 001.2010...007.2010 are the only once which carry data. all other columns are empty.
I just do not want to see the columns that do not belong to the current year.
Any ideas or How to's I can use?
Thanx and best regards
JoergSorry, but I can't imagine how that should work.
I have two Cubes combined under a Multicube. One containing the Actuals and one for the Forecasts. To show the actuals I have to create a restricted key figure that shows the actuals and for the forecast I have to select differently.
What is the exit variable supposed to do? I could use a SAP Provided variable to find out about the first month and the actual month, but since it will be a restricted keyfigure it will be shown as sum between the two month. I need for each month of the year a column, and the "open" Month should be input ready. And this should be dynamic.
Thanks for helping
Joerg -
HOW TO GET FISCAL PERIOD WISE DATA BY GIVING FISCAL YEAR AS INPUT
Hi All,
I am creating a report where input field is FiscYear(0FISCYEAR). My fiscal year is Oct to Sep and 4 spl periods.
If we give input as 2014 (current FY) it has to show all fiscal periods as on date. i.e., Oct’13 to Feb’14. Which should show in columns each period
separately, like Oct 13, Nov’13, …. Feb’14.
If we give 2013, it has to show all fiscal periods separately each period in columns. i.e., Oct’12 to Sep’13.
InfoProvider Data: We have a cube, containing data for 0CALMONTH and Fiscal Year. No fiscperiod in the cube.
Could any one assist here as it’s a bit odd scenario never come across. All your suggestions and assistance are highly appreciable.
Best Regards
Venkat...Hi Anshu,
I am getting the below error when I try to execute in Analyser.
"No value could be determined for variable". Here is my code in CMOD.
*Variables for ESAS Project
DATA: curr_yy TYPE /BI0/OICALYEAR,
input_yy TYPE /BI0/OICALYEAR,
prev_yy TYPE /BI0/OICALYEAR,
zmonth(2) TYPE N.
WHEN 'ZCALMONTH_ESAS'.
IF i_step = 2. "tried with i_step 1 also, same error message is showing
READ TABLE i_t_var_range INTO loc_var_range
WITH KEY vnam = 'ZFISCYEAR_ESAS'.
IF sy-subrc EQ 0.
curr_yy = loc_var_range.
prev_yy = curr_yy - 1.
zmonth = SY-DATUM+4(2).
IF SY-DATUM+0(4) = curr_yy.
CONCATENATE prev_yy '10' into l_s_range-low.
CONCATENATE curr_yy month into l_s_range-high.
ELSEIF prev_yy EQ loc_var_range.
input_yy = loc_var_range.
prev_yy = input_yy - 1.
CONCATENATE prev_yy '10' INTO l_s_range-low.
CONCATENATE input_yy '09' INTO l_s_range-high.
ENDIF.
l_s_range-opt = 'BT'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDIF.
Everything is fine in CMOD. However, its giving error in execution. Any idea on this pls...
Best Regards
Venkat... -
Get Fiscal Period based on Fiscal Year
Hello Experts,
I have one query. I wanted to get fiscal period based on fiscal year entered in selection screen.
I tried to find the FM for it but didn't get it. Can you suggest me any FM which gives in Fiscal period based on fiscal year in FI?
Regards,
NehaHi,
Check the following link:
How to get fiscal period based on date and Fiscal year?
http://www.sapdev.co.uk/fmodules/fms_fiscalyr.htm
Regards,
Bhaskar -
To get Fiscal period based on Fiscal Year
Hi Guys,
Can anybody tell me how to get Fiscal period based on Fiscal Year?
Thanks,
ArpanHi Anshu,
Have a good day.
I need to convert fiscal year(2011) to fiscal period(2011001).
Fiscal year(key field in data source) mapped to the fiscal period(key field in infoprovider).
But in the transformation when I have mapped these fields, data is not coming propperly into the infoprovider because in the transformation its not converting fiscal year to fiscal period.
This is the scenario. Please help.
Thanks,
Arpan -
Fiscal year variant V3 is not maintain for calender year
Hi,
when i was entered capitalization date in asset master (t.code AS01) the system given error message
(Fiscal year variant V3 is not maintain for Calender year) message No FGV002
I cheked the fiscal year setting and also assign the fiscal year variant to company code.
Its very urgent.
thanks
Kareemhi
Check your FYV settings. some inconsistency might be there
refer at
http://help.sap.com/saphelp_40b/helpdata/es/95/e42c7dd435d1118b3f0060b03ca329/content.htm
regards
Srilakshmi -
Standard Field for Fiscal Period/Year
Hi
Is there any standard table field for <b>Fiscal Period/Year</b> so that i can use it to type my select-option field in the selection screen.
Thanks and Regards,
NavaneethHi,
Check field BKPF-GJAHR and BKPF-MONAT .
And/or BSEG-ABPER ( period ).
Erwan
Message was edited by:
Erwan LE BRUN -
Missing Future Fiscal Period/Year
One of the material - in MM03 Costing 2 Tab
- Future Fiscal Period/Year is blank but Planned Price exist.
Can someone explain the scenarios as to to how this could happen?
Thanks!Hi Arun,
Well ! There are 2 steps in Material Standard Cost Eistmate...
1st step is Marking and 2nd one is Releasing .. First you do the Marking for the material, after Marking, the Future Planned Price and Period/Fiscal Year will be updated in the Material Master Costing 2. After you will Release the standard cost estimate for that materiallk. Once you Release the standard cost estimate, The Future Planned Price will be moved to Current Planned Price in the material master Costing 2 View.
Once the above is happend, The Future Planned Price & Period/Fiscal year will be blank. Current Planned Price will be update.
I hope you will have clear idea now..
Thanks
Fit 4 Nothing -
Fiscal year period displaying previous years records tooo....
Hi,
I have built a query, which displays all the metrics like Year to date(YTD) Actuals and Plan, Month to date (MTD) Actuals and Plan, YTD Variance, MTD Variance, Remaining Balance etc... The query uses a customer exit to calculate the above metrics.
Input filters are:
Company Code: single value, mandatory,
Fiscal Period: single value, mandatory
Along with other characteristics , Fiscal period is also provided in free characteristics.
Upon Execution (for eg:-) with input of fiscal period as 003/2008, the query displays the correct output for that year ie; 003/2008.
But when the Fiscal Period is dragged from Free characteristics to the columns fields, it displays all the metrics for all the previous years records too. ie; it displays the values of 003/2007 along with 003/2008. The client does not want this to happen. It should display the values only for the period given as input.
The client wants the fiscal period be provided in the free characteristics and not to remove it.
Can anyone advise what could be done to prevent the query from displaying results of previous dates.
Thanks in advance.
MaddyWhat info-object are you using 0FISCPER or 0FISCPER3? Because 0FISCPER3 is just the fiscal period without year. So If you select Fiscal Period 3 it will give you the total for all years. If you are using 0FISCPER3 please change to 0FISCPER or user 0FISCPER3 together with 0FISCYEAR.
-
How to Create a selection variable for Fiscal period/year range
How to Create a selection variable for Fiscal period/year range. The idea is to filter the query results using a fiscal period/year range user input rather than a full fiscal year input.
Hi Priya,
Open the query in a query designer -> in the left hand side you would find the fiscal year period under the time dimension -> right click -> create variable -> create the variable.
The better option would be use any of the SAP provided variable. You would find them under the Fiscal year period in the left hand side in the query designer.
Bye
Dinesh
Maybe you are looking for
-
Lightroom Slideshow into Dreamweaver?
How do you embed a slideshow made in Lightroom and put into a page in Dreamweaver?
-
Generate accounting document by reference to Controlling Doc
Hi Experts, Please share any enchancement (BAPI, exit) to generate accounting document (doc type ST) by reference to CO document? example: -CO- Dr. Material Operations(Cost Center) 12 Cr. Material Operations(Order) 12 -FI- generated b
-
Config and test scripts of SOP
Hello All, I am working on configuration of Flexible Planning. I will have to start on the test scripts/cases soon and I am halfway with the config.It would be great if anybody could help me out with the config as well as test cases documents. Tha
-
Execution of catch blocks in WS-BPEL
Hi, If there are two faults thrown (say A & B) and correspondingly caught by two different catch blocks (CatchA & CatchB), then does these catch blocks execute in parallel or in sequence(if so how is the sequence defined). Further, is this behavior d
-
Hi, I have a 800,000-row table with unique ID. Recently we're given criteria for record duplication based on 7 out of 20 table's columns. We would like know which record ID has duplication value based on the exact match of those 7 columns. Example ID