Using variable 0P_FPER to calculate YTD Fiscal period
Could someone please explain the procedure for creating a variable which will use the value entered from the variable 0P_FPER - Period/Fiscal Year (Single Value Entry, Required) to calculate the YTD Fiscal Period.
Regards,
Craig Stephen
You have to create a Customer Exit variable for this :
<b>Customer Exit - > YTD from Fiscal Period</b>
<b>Let ZVCCYTDX be the tech name of Customer Exit Variable & 0P_FPER be the user entered variable for Fiscal Year Period.</b>
User Exit: ZVCCYTDX
Input: 0P_FPER
Output: Jan of Accident Year Range
Logic Description:
WHEN 'ZVCCYTDX'.
if i_step = 2.
clear loc_var_range.
loop at i_t_var_range into loc_var_range WHERE vnam = '0P_FPER '.
if sy-subrc = 0.
curr_year = loc_var_range-low(4).
concatenate curr_year '001' into jan_accidentyear.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = jan_accidentyear.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
append l_s_range to e_t_range.
exit.
**endif.
endloop.
endif.
**Coding is not required if you can enhance the Datatarget with Fiscal Year and Posting Period.
Similar Messages
-
Variable default period should be currenct fiscal period
Expert's,
Here is a requirement from ousite folks.where in the variable default should be current fiscal period.
I have to write a code in CMOD.Please any one give the code so, that I can pasted and modify based on my requirment.
Points will definitely assigned .
Thanks in advance.
vasu.Hi Vasu,
<u><b>Sample Code.</b></u>
When <Variable Name>
Data : l_p_range_test TYPE rrrangesid.
data: l_peri like T009B-POPER,
l_year like T009B-BDATJ.
IF I_STEP = 1.(This is for default value) before query execution.
--> use following function module to derive period from system date(sy-datum)
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
I_DATE = sy-datum
I_PERIV = <Fiscal variant>
IMPORTING
E_BUPER = l_peri
E_GJAHR = l_year
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4
Concatenate l_peri l_year into l_p_range_SSS-low.
l_p_range_test-sign = 'I'.
l_p_range_test-opt = 'EQ'.
APPEND l_p_range_test TO e_t_range.
endif.
Just written code, check datatypes and systax check.
Hope it Helps
Srini -
Option to show values up to last closed fiscal period or up to current date
Hello,
How would I create a query that would ask if I want it to calculate values 'up to the current date' or for the 'latest closed fiscal period'.
Currently I have setup a report, within which, has restricted key figures that will give the 'Period to date', 'Year to Date', and 'Last Year Year to Date' values for some RKFs, however, it would be very helpful if this report could be setup so that the user could choose whether the report provides:
1. Values only through the last closed fiscal period
or
2. Values up to the current date.
<b>For example</b> if we are in period 7 of 2006, the user could have the report show all values up to the last closed fiscal period, which in this case would be period 6 of 2006.
Or the user could have the report show all the values up to the current date.
Hopefully I have been clear,
Thanks,
Nick
Message was edited by:
Nick BertzNick,
What is the problem you are facing? As San mentioned you can only report till Last Fiscal Period using Customer Exit Variables(Calculate Current Fiscal Period using Current Month and Fiscal Year Variant).
Or as you mentioned you can create restricted Key Figures using Date or month (YTD etc)
If i miss your requirement, please guide me.
Regards,
Nagesh Ganisetti.
*Assign Points if it helps. -
12 Fiscal Periods forward NOT including current
Hi Friends,
I want to create a custom variable to calculate 12 Fiscal Periods forward NOT including current. Can anyone help me to get the code for creating this variable to be used in BeX query.
Thanks and Regards
Vishwanathcheck this
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60a7dc10-c8a8-2b10-cc97-e667a38aa91a?QuickLink=index&overridelayout=true -
How to extract numeric equivalent of closing fiscal period?
Hello gurus,
We have a requirement to calculate YTD returns by using the numeric equivalent of closing fiscal period for eg jan would be 1, feb would be 2 etc.
What's the easiest way to do this? Appreciate your help.
MalliThank you for the response Ashish.
The source infoobjects of Time dimension that we have are fiscal year/period (of the format 002.2005,003.2005 etc)and posting period (of the format 1,2,3,etc)Both of these require user inputs.
Our requirement is to get the numeric equivalent of the closing period that the user enters.
I am not sure how to do it with our info-objects.
Would appreciate your help. -
Error when using SAP Exit Variable for Current Fiscal Period (0FPER)
Hi Friendz,
My requirement is to execute a query for the current fiscal period. I am using the SAP Exit Variable 0FPER.
I placed this variable on char. Fiscal year/period 0FISCPER.
When I execute the Query, it is returning the error: No value could be determined for variable ZVBSYCUR; Variables Contain Invalid Values.
Please give inputs on how to use this variable.
Regards...
GaneshHello Dipika,
I am also getting the same error.
ERROR: Variable 0FPER could not be replaced.
Yesterday we created one customer exit. But this should not affect the SAP Exit right? Till yesterday the 0FPER variable was working fine. I tried re-installing from BI content, but still getting the same error. If anybody has a clue please let me know.
Thanks,
Harshal -
Variable to load data upto a fiscal period
Hi gurus ,
i had created a customer exit variable Such that it gives the data from first month of the fiscal year to the period which is feed by the user in a user entry variable 0P_FPER.
our fiscal year start from october (2009001).
let user feed the value in a user entry variable 0P_FPER = 2009003 (dec 2008).
so According to my code it should pickup the data from 2009001 to 2009003.
but my code is giving data from 2009001 to current month (2009004).
i am not good at Abap, so there may be some error in my code.
plz check my code shown below, and plz throw some light.
WHEN 'ZCE_YTFP'.
clear l_p_range_SS1.
DATA: V_YEAR9(4) TYPE n,
v_fsyear10(7) TYPE n,
V_fsyear11(7) TYPE n.
CLEAR loc_var_range .
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range.
IF loc_var_range-vnam = '0P_FPER'.
V_fsyear11 = loc_var_range-low.
V_YEAR9 = loc_var_range-low+0(4).
Concatenate V_YEAR9 '001' into v_fsyear10.
l_p_range_SS1-Low = v_fsyear10.
l_p_range_SS1-high = V_fsyear11 .
l_p_range_SS1-Sign = 'I'.
l_p_range_SS1-Opt = 'BT'.
APPEND l_p_range_SS1 TO e_t_range.
endif.
endloop.
Endif.
Thanks.Hi Surabh,
try rhis
WHEN u2018ZCE_YTFP' '.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM = '0P_FPER'.
V_fsyear11 = loc_var_range-low.
CONCATENATE V_YEAR9 -LOW+0(4) '001' INTO v_fsyear10-LOW.
l_p_range_SS1-Low = v_fsyear10-LOW.
l_p_range_SS1-high = V_fsyear11-SIGN .
l_p_range_SS1-Opt = 'BT'.
APPEND l_p_range_SS1 TO e_t_range.
endif.
Rgds
SVU123
Edited by: svu123 on Jan 24, 2009 9:13 PM
Edited by: svu123 on Jan 24, 2009 9:16 PM -
Adding previous Fiscal Period YTD KF
Hi Gurus,
I have data in 2 IC as below:
IC : Current
*FiscalPEriod Amount* YTD
2011.01 100 100
2011.02 100 200
2011.03 100 300
2011.04 100 400
2011.05 100 500
2011.06 100 600
2011.07 100 700
2011.08 100 800
2011.09 100 900
2011.10 100 1000
2011.11 100 1100
2011.12 100 1200
2012.01 100 100
2012.02 100 200
IC Forecast :
*Forecast Version Fiscal Period Amount* YTD
2011.04 2011.04 200 200
2011.04 2011.05 200 400
2011.04 2011.06 200 600
2011.04 2011.07 200 800
2011.04 2011.08 200 1000
2011.04 2011.09 200 1200
2011.04 2011.10 200 1400
2011.04 2011.11 200 1600
2011.04 2011.12 200 1800
2011.05 2011.05 300 300
2011.05 2011.06 300 600
2011.05 2011.07 300 900
2011.05 2011.08 300 1200
2011.05 2011.09 300 1500
2011.05 2011.10 300 1800
2011.05 2011.11 300 2100
2011.05 2011.12 300 2400
2011.05 2012.01 300 300
2011.05 2012.02 300 600
2011.05 2012.03 300 900
2011.05 2012.04 300 1200
2011.05 2012.05 300 1500
Master Data for Forcaste Version:
Forecaste Version FLAG
2011.04 Prior
2011.05 Current
Now while creating Query, I need one KF called "Current Forecast YTD", So I need to go to master data and see forecast version against 'Current' and go to forecast cube abd select YTD under that Forcast Version. I did it with the help of Customer exit variable on Forcast Version. its displaying data as below:
2011.01 2011.02 2011.03 2011.04 || 2011.05 2011.06 2011.07 2011.08.......... 2012.01 2012.02 2012.03
300 600 900 1200 300 600 900
But I need query output as below:
2011.01 2011.02 2011.03 2011.04 || 2011.05 2011.06 2011.07 2011.08.......... 2012.01 2012.02 2012.03
700 1000 1300 1600 300 600 900
If you notice 700 = 300 from Forecast IC + 400 from Actuals IC for Fiscal Period 2011.04
1000 = 600 from forecast IC + 400 from Actuals IC for Fiscal Period 2011.04
so on..but when new year starts ( 2012)..it will only take data from forecaste IC. So basically we need to add YTD KF of month 2011.04 ( this reference Fiscal Period will be decided from master data) from actuals IC to coming months in forecast IC.
How can we achieve this?
Please guide me.
Regards
Aman
Edited by: AmanSharma123 on Jun 22, 2011 8:43 AMHi Rooki Sapbi,
Thanks again..Seems like this the way to do this, but still one more complexity. My structure of the query is as below:
Columns
|
| fiscal year
| Fiscalyear Period
| KF's
| Formula Current Forecast YTD (Formula1)
| |_Actual YTD filtered by FV1
| |_ RKF1
|
Rows |
GL_ACCOUNT
By you logic, I can get Kyfigure for 2011.04 but which against GL_account? There are many GL_Account, profit centers etc in the Actuals IC, I can find Keyfigure value for Fiscal period 2011.04 with the help of formula Variable, don't i need to provide GL_Account information etc?
Thanks again for your help. Waiting for your reply!
Have a good day!
Regards
Amandeep -
BEx Fiscal Period variables not working in Webi
Hello,
We have an BEx user entry variable for Fiscal period, that works correctly in BEx. In the prompt LOV, I get values from year 2003 to 2013.
When I run it in Webi, the LOV starts from year 0000 to 2040. Also there are 16 periods in a year, wheras the LOV displays 24 period, even after restricting on fiscal variant.
Has anyone successfully been able to make Webi work with BEx fiscal period variants?
Thanks,
NikhilI created a universe objects with following in the
"Select"
[0P_FPER].[NAME]
"Where" condition
<FILTER KEY = "@Select(Fiscal year Period\LovPeriod_Fiscal Year)">
<CONDITION OPERATORCONDITION = "Greater">
<CONSTANT CAPTION = "AB1000001"/>
</CONDITION></FILTER>
When I create a report with this object, I get no data.
I change the above to
"Select"
[0P_FPER].[NAME]
"Where" condition
<FILTER KEY = "@Select(Fiscal year Period\LovPeriod_Fiscal Year)">
<CONDITION OPERATORCONDITION = "Less">
<CONSTANT CAPTION = "AB1000001"/>
</CONDITION></FILTER>
I tried changing the CONSTANT CAPTION values, everytime "Less" works but "Greater" does not. Does "Greater" not work? -
Formula variable on Fiscal period
Hi All,
I am writing a query where I want to pass fiscal period (only period, not the year) in a formula.
I have crested a formula variable for the same and used the characteristic variable of fiscal year/period (SAP exit).
The code that I applied is as follows:
WHEN 'ZCURFP1'.
IF I_STEP = 1.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = '0P_PRFP1'. //(previous period of current fiscal year)
CLEAR L_S_RANGE.
PERIOD = LOC_VAR_RANGE-LOW+4(3).
PERIOD = PERIOD + 1.
L_S_RANGE-LOW = PERIOD.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.
ENDIF.
But this code is not giving me current period.I am not good at ABAP
Pl help me with the code.
Thanks and Best regards,
SharmishthaHi,
[I have been reviewing the whole thread and as far as I understood you want to have the current period value (based on the current date) passed to your formula variable, correct?
Then then code below should work
you should use standard function modules for that;
try the following:
DATA:
ld_gjahr LIKE T009B-BDATJ,
ld_poper LIKE T009B-POPER.
WHEN 'ZCURFP1'.
IF I_STEP = 2.
CLEAR L_S_RANGE.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = SY-DATUM
* I_MONMIT = 00
i_periv = 'K4' "enter your fiscal variant here
IMPORTING
e_buper = ld_poper
e_gjahr = ld_gjahr.
L_S_RANGE-LOW = ld_poper.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
hope this helps....
Olivier.
Message was edited by:
Olivier Cora -
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 -
Truncate fiscal period text variable 0FYTCFP
Hello Everyone,
I am using variable 0FYTCFP and it displays, for example, 001.2006. I would like it to only display 06. Is there anyway to do this?
Thanks so much,
ColleenHi,
create a Ztextvar of length 2 and in the customer Exit code just truncate the Fiscal period to 5(2) . then u will get last 2 chars of fiscal period.
regards
santosh -
Using fiscal period and Fiscal quarter reporting seemlessly in a BI Query
Hi,
We have a very specific issue. Reporting the Fiscal Period( in our
case we have 53 fiscal periods) and Fiscal Quarter( we have 4 quarters)
in the same query seamlessly as we would have done using Calander Month
and Calander quarter in other reports that uses SAP delivered standard
time dimensions.
However unlike the Calander time dimension (SAP provided all
possible...0CALDAY, 0CALWEEK, 0CALMONTH, 0CALQUARTER, 0CALYEAR) where you have all of these inside your info provider, you can get
aggregation on week, month, quarter etc in your query seamlessly, The Fiscal Year/Period offers a problem in doing report seamlessly.
When we delve into Fiscal realm, SAP only provided with 0FISCVARNT,
0FISCPER, 0FISCYEAR and a special period 0FISCPER3. It doesn't provide
anything like 0FISCQUARTER etc and rightly so, because you can have
only one 0FISCVARNT in the Time dimension and can have related periods
(0FISCPER) only for a Row of data in your infocube. For example if you need to model as per the Fiscalweek, you can create a custom Fiscal year variant (Say z1) and can configure to have only 53 periods (Mapped to 0FISCPER) representing
53 Fiscal WEEK. Similarly for mapping Fiscal Quarter you can create
another fiscal year variant (Say Z2) and have only 4 periods (mapped to
0FISCPER also in this case) to represent the 4 Fiscal Quarter. However
the issue is that for one record you can only map either of those and
not both since you can only have one Fiscal year variant in one row of
data in the info provider.
For example
If I have two rows OF DATA coming from different sources (One FOR
Fiscal Week and another for Fiscal Quarter) I can have the following in
my info provider.
1> Example data in Fiscal
Char1 Char2 0CALDAY 0FISCVARNT 0FISCPER Quantity
X ...... y .....10/22/07 ....Z1 .... 432007 .......10
X ....... Y .....10/22/07 ....Z2 .... Q32007 .......20
The issue is how do I report the Quantity in a query in Quarter Q3 as
(10 + 20 = 30) since both the rows corresponds to FISCAL Q32007?
(Please note that Fiscal week 432007(For VARIANT Z1 ) actually is
Fiscal Quarter Q32007( For Fiscal Variant Z2) as per our
configuration of Fiscal Year Variant configuration Z1 and Z2)
The same is very simple when I have infoprovider with CALENDAR Time
dimensions , for example if we dont have any fiscal reporting
requirement and just report on calendar time dimension the record in
the info provider would look like the following ( example)
2> Example Data in CALENDAR DIMENSION
Char1 Char2 0CALDAY 0CALWEEK 0CALQUARTER Quantity
X ........ y .......10/22/07 .......432007 .......Q32007 .......10
X ........Y .......10/22/07 ....... 442007 .......Q32007 .......20
Here we can use both 0CALQUARTER and get the data aggregated on the
quarter level in addition to the 0CALWEEK.
To solve this issue, One option that we are thinking of Using 0CALQUARTER to represent the
Fiscal Quarter and use Update rule to populate this one. For example
THE example 1 can be as follows.
1A> Example of using 0CALQUARTER along with 0FISCVARNT and 0FISCPER
Char1 Char2 0CALDAY 0FISCVARNT 0FISCPER 0CALQUARTERE Quantity
X .......y .......10/22/07 ..............Z1 .......432007 .......Q32007 ..............10
X .......Y .......10/22/07 ..............Z2 .......Q32007 .......Q32007 ..............20
In this case we would populate the 0CALQUARTER by the actual Fiscal
Quarter and then can use both as per example 2 above. But this is not a
smooth option since we have various other info providers to join and
report based on solely Fiscal Quarter etc
I am certain that this issue have already been solved by somebody as this bound to happen in any finance application.
Would appreciate if we can get some light on this regarding the data modelling, reporting etc.
Thanks
Arun G.You have yourself suggested a solution, which is fine,
Other option is to have a new characteristic Fiscal Qtr in all the infoproviders ans update the same using a routine in the updaterule depending on the fiscal year variant.
for eg. for transaction with variant Z1 in one case you can say if fiscal week 01 between 01 to 13 the Fiscal Qtr should be update with1 and if it is between 14 to 26 then update fiscal qtr with 2 and so on.
For other Variants Z2 you write a different login in the routine ans so on.
so for all the data irrespective of the variant you will have the qtr as either 1 or 2 or 3 or 4 and you can report on this fiscal qtr.
assign points if it helps.
regards
Venkata Devaraj -
Defining an exit variable for a specific day based on Fiscal Period
If I do not have Calendar Day time dimension available for reporting is it possible to define a customer exit variable for a specific day. The days are the first and last day of the financial year?
Example
User Input for Fiscal Period: 2009004
The exit is to define a value for 01.01.2009 and 31.12.2008 (end of last year)
ThanksHello Niten,
yes it is possible. Procedure:
- add a new column in the report structure
- hide this column
- create a new text variable in this column (for customer exit)
- now you can fill this variable during query execution based on 0FISCPER
You don't want to filter by this variable. Right?
Buy,
André -
Function module reqd for fiscal period using current date
Hi,
Is there any function module which gives fiscal period using current date.
Thnaks,
MaheedharHi Maheedhar,
Try the code below.
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
Regards,
Amit.
Maybe you are looking for
-
Will I loose all my things saved on iCloud if I delete the account?
I cant remember the login to my iCloud account and was wondering if I were to delete that account and set up a new account if I will loose all my saved things?
-
IPTComm 2010 Call for Papers: Deadline Extended
CALL FOR PAPERS: DEADLINE EXTENDED 4th ACM Conference on Principles, Systems and Applications of IP Telecommunications IPTComm 2010 http://www.iptcomm.org August 2-3, 2010 Leibniz Supercomputing Center Munich, Germany IMPORTANT DATES ================
-
Different bars in column chart
Hi All I want to show a column/bar chart with huge amount of data. Here each bar should be in different colors. May be five to six colors dynamically changing regularly. Is there any way to add custom bars to the chart like renderer for datagrid. Any
-
Get column names into a VB program, for an SQL query that joins tables
use [mydatabase] select * from InvNum inum left join _btblInvoiceLines ilin on inum.autoindex = ilin.iinvoiceid left join stkitem s on ilin.istockcodeid = s.stocklink where InvNumber = 'IVQ0834' or InvNumber = 'IVQ0835' I need to get out the column n
-
Reading mails from Zimbra inbox.
Hi, I have a basic program to read the inbox of a zimbra mail user. i have supplied the necessary information like username passwd, Can someone please tell me what is the pop server required for the Zimbra mail client. i know it is somethign do with