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
Similar Messages
-
Routine in DTP to load data from previous fiscal period - current
Hi Friends,
I want to load data for previous & current fiscal period and I want to write a routine in DTP to automate this process, can any one help me with this routine!
Thanks & Regards,
vidiyalaHi Bilal,
We cant create ABAP routine in DTP, instaed we can create in Info package.
$$ begin of routine - insert your code only below this line -
data : v_date like sy-datum.
data : v_new_date like sy-datum.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = ' '.
l_idx = sy-tabix.
v_date = sy-datum.
l_t_range-low = v_date+0(6).
CALL FUNCTION 'DATE_CREATE'
EXPORTING
*anzahl_jahre =
anzahl_monate = 8
*anzahl_tage =
datum_ein = v_date
IMPORTING
datum_aus = v_new_date.
l_s_range-sign = 'BT.
l_s_range-opt = 'I'.
if l_idx 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
$$ end of routine - insert your code only before this line -
Date range From Fiscal period range
Hi All,
How can we get the date range for a given fiscal period range?
please help.
Thanks
Gaurav Mittalhi
good
pls check this code
declare a range like
ranges: r_date for s021-spmon. (declare as per your data type for the date)
in initialization event write.
r_date-low = '012007'. (enter the required lower range of value)
r_date-sign = 'I'.
r_date-option = 'BT'.
r_date-high = '122007'.
append r_date.
now use the r_date field in the program code.
thanks
mrutyun^ -
Variable to display data from Current Fiscal Year to the MONTH entered
Hi Friends,
In the Quey Designer I require a CHARACTERISTIC VARIABLE for the 0CALMONTH which should have the following features:-
1.Input Month(e.g JUN 2008)
2.Mandatory
3.Ready for Input
The query should show the following OUTPUT:-
The data should be displayed from the CURRENT FISCAL YEAR to the value of the Input MONTH entered.
e.g For Input = DEC2008
Output = from APRIL 2008 to DEC2008.
Do we have a standard variable for this or we have to go for a Customer Exit??
Thanks in Advance!!!
VivekHi,
Create a customer exit as follows.
WHEN 'ZCMTD'.
you variable name
data: ZCMTD_LOW like sy-datum.
ZCMTD_LOW = sy-datum.
ZCMTD_LOW+4(2) = '04'.
*replacing last two symbols (month) in the current month with '04'
CLEAR L_S_RANGE.
L_S_RANGE-LOW = ZCMTD_LOW.
*initializing low interval limit
L_S_RANGE-HIGH = SY-DATUM.
*initializing high interval limit
L_S_RANGE-SIGN = 'I'.
*defining interval as inclusive
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDCASE.
Thanks,
Ashok -
How to get starting date and ending date of the given Fiscal Period
Hi Friends,
In my Selection screen parameter, I've Fiscal year and Period , I want to get the starting date and ending date with the Fiscal period.
How to get and throught which FM.
Pls advise.
thanks®ards
Sankar.Hello Sankar,
Check the FM PERIOD_DAY_DETERMINE.
DATA :
l_periv TYPE periv,
l_blart TYPE blart,
l_fday TYPE bkpf-budat, "First day in period
l_lday TYPE bkpf-budat. "Last day in period
* Fetch the fiscal year variant from T001
SELECT SINGLE periv INTO TABLE l_periv
FROM t001
WHERE bukrs EQ p_bukrs.
* Get first day/last day
CALL FUNCTION 'PERIOD_DAY_DETERMINE'
EXPORTING
i_gjahr = p_gjahr
i_monat = p_monat
i_periv = l_periv
IMPORTING
e_fday = l_fday
e_lday = l_lday
EXCEPTIONS
error_period = 1
error_period_version = 2
firstday_not_defined = 3
period_not_defined = 4
year_invalid = 5
OTHERS = 6.
Hope this helps.
BR,
Suhas
Edited by: Suhas Saha on Jan 9, 2009 2:08 PM -
Loading Data to Multiple Targets in BI
Hi Experts,
I have one doubt regarding data load to multiple targets in BI. I explain clearly- the scenario is to load the data coming from one source system to multiple Data Targets in BI. Like in BW, we will just create multiple update rules from InfoSource to different targets. In InfoPackage maintenance screen, under Data Targets Tab, we will select the respective targets which we want to load and we run the InfoPackage, it will updates the data to all the selected targets in the infopacakge.
But in BI, how we will implement this scenario, bcoz here we need to create the individual DTPs, and there is no options to load the data simultenaously to multiple targets.
So, is there any solution to implement this scenario in BI, plz expalin.
Thnaks in Advance
Ragards
Ramakrishna KamurthyHi Dennis,
No worries at all. I've been trying different approaches and strangely it does seem to load data packages faster when going via an InfoSource. (I don't understand why). However, it doesn't want to do it parallel.
Whereas when I went loaded direct from the DataSource to DataSource, it processed data packages twice as slow but three at a time. The result being without the InfoSource was faster. This can be seen in the DTP Process Monitor and in SM50.
Both DTPs had the default setting in Settings for Batch Manager of 3 parallel processes.
Our batch queues in SM50 have not been blocked with other processes.
Has anyone else had problems with parallel processes when loading via an InfoSource?
Thanks
Adrian
P.S.
I think I've discovered two cases where InfoSource may bring performance improvements:
Filtering Records
Transformation A includes the common and more simplistic transformations. e.g Sets a flag "Relevant" for certain conditions being met.
Transformation B includes the complex transformations. At the beginning of B, you include a Start Routine that filters out records not marked "Relevant". That way it only does the complex work on relevant records.
Time Conversion
If your Data Source has Fiscal Period, but you wish your DataTarget to have Calendar Month, you need to write a routine to covert if you extract direct from DataSource to DataTarget.
Whereas, if the Fiscal Period is passed to an InfoSource, you can use Time conversions or formulas to convert Fiscal Period to Calendar Month in a transformation between InfoSource and DataSource
Edited by: Adrian Bell on Jul 31, 2008 9:33 AM -
How to Create Dynamic Columns based on Fiscal Period
HI BI World;) We are on BI &.0
I have a requirement to create a time series BI query
It must take the variable value (range) from the user abd create all months within this range in a time series displaying the key figure value for the respective periods.
I have so far added the fiscal year period characteristic to the columns with the key figure under this and the fiscal/year period is on a restiction in the filter area by a variable (range)
When I run this query it only shows the fiscal periods which have a value for the key figure. Is it possible to show all fiscal periods and have blank columns where there is no value for the respective key figure/period.
I have tried using master data for the fiscal period but this does not work as has some junk values.
Any ideas? I need to show alll periods between the dates whether they have values or not.
Best,
Stevo
Points will be awarded.
Thanks in advanceHi,
Try restricting the fiscal period inside the keyfigure and in the output format try drill across of fiscal period.
in tne fical period char properties try masterdata relationship option.
Thanks,
Arun. -
Hi
I am trying to compare Prior Year vs Current year revenues for a particular period. My input parameter is Fiscal period.
I have created two Restricted key figures.
First one is Revenue key figure restricted by Fiscal period. (User input period)
Second one is Revenue key figure restricted by Fiscal period with offset -12.
But I am getting same results in both columns though Cube has data for two fiscal periods.
For e.g. If user enter 007/2010 i need to see revenues for 007/2010 and 007/2009.
But i am getting revenues for 007/2010 in both columns.
Do I need to use Exit variables or will it work with Offset?
Thank you
SreeHello Sree,
I think you can easily get this by using structure for fiscal periods.
Try to visualize the query designer structure as:
Revenue
Structure
Fiscal period
Fiscal period - 12
This will give you the output in format
Revenue
2010 2009
xxx yyy
Regards,
Pratap Sone -
Report to forecast based on fiscal period
Has anyone done any financial reports which display data based on fiscal periods? The ProjectData service doesn't expose fiscal period (neither does the REST API under _api/ProjectServer). I saw a previous post (http://social.msdn.microsoft.com/Forums/en-US/7999cdf1-16fd-4efd-b7de-964bfeceb8f6/utilization-reports-by-fiscal-period?forum=projectserver2010general)
that said to use the BI Center in PWA.
In the case of Project Online I think what it means is that I need to use the Time entity from Timesheet actuals. Is this correct?
Thanks,
RolandHi Roland,
Indeed I couldn't find any fiscal year in the
project odata references. Maybe other folks on the forum could give you a different answer. But if it turns to be true, you'll either have to deal with the time dimension, or to extract the raw data by day
then do a transformation with Excel formula, code, VBA...
Hope this helps,
Guillaume Rouyre, MBA, MVP, MCP | -
Is there a way to use the 13 months setting for a fiscal year, but have the periods defined as 4-3-3-3, instead of 4 for all?
Tom,
It is more manual work, but you could define a 13 month model, and the manually edit the end dates of each Fiscal Period, as necessary, to match with your period definition.
Cheers,
Prasanna Adavi, Project MVP
Blog:
Podcast:
Twitter:
LinkedIn:
-
Year To Date for Current Fiscal Year
Hi All,
I have installed BC variable Year To Date for Current Fiscal Year 0I_CFYTD..
foloowing error occurs
Variable 0I_CFYTD could not be replaced..
Do i need to write any code or Please help.....Hi,
Please check if fiscal year variant is used in the filter. Else the BC variable throws an error. Drag fiscal year variant to the filter area and set a value or variable input for the same.
Regards,
Satya -
Hi,
I'm using minisap BW NW2004s with supportpackge 008. I created a infocube with all components necessary to upload a file to it: source system, data source, infopackge, transformation (datasource to infosource), infosource, transformation( infosource to infocube) and the infocube. All components are ok and active, but when I push the button "Start" in the infopackge it send me a message "Data was requested" but nothings happen, no record on the monitor and the infocube remains empty. I can read and display the file on the datasource. Can you help me?
Thanks a lot!
MarcusHi Marcus,
I think you ignored the DTP(data transfer protocol) which is used to load the data from the datasource to the cube. Create a DTP for the transformations and load the data from the DTP it is like infopackage and loads the data within the BI system.
In BI-7 infopackage does'nt load data upto the cube it only loads data into the datasource(PSA) from here on u need to use the DTP to load the data.
Hope this helps,
regards -
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. -
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... -
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
Maybe you are looking for
-
Keep losing my wi-fi connection when I plug my macbook into my tv.
I just recently started plugging my macbook into my tv to use it as a dual display. Once I plug in, my wi-fi connection just disappears, and I can't seem to connect to anything. When I plug back out it's back to normal. Does anyone know what's going
-
How do I make a form compatible in all versions of Adobe Reader and various browsers?
I have created a fillable form in Adobe Live Cycle Designer ES 8.2 and the form is available for download on our company's website. Many users are experiencing trouble with the fields not being able to be filled in. I have Adobe Acrobat 9 on my compu
-
How to map the node id to the node name in database view just like "V$GES_RESOURCE"
i have a rac with 3 nodes,and the node id is from 1 to 3,i can check it with command olsnodes. $ olsnodes -p -n -i tdsdb1 1 tdsdb1-priv tdsdb1-vip tdsdb2 2 tdsdb2-priv tdsdb2-vip tdsdb3 3 tdsdb3-priv tdsdb3-vip and i
-
Need help with SQL Query with Inline View + Group by
Hello Gurus, I would really appreciate your time and effort regarding this query. I have the following data set. Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amo
-
Using two Actiontec routers with two coax lines
Hello all- I currently have one Actiontec router with coax plugged in near my TV (best wifi distribution in house) and my PC in my home office using wireless. A while back the router had been installed in my home office, and another coax cable was pu