ABAP Logic - This Month This Year to This Month Last Year problem
Hi All,
I have a following requirement ... the report currently compares This Month This Year to This Month Last Year. But this is not a valid comparison for the user until the end of the month is reached as only then is it comparing 2 full months. We would like to use a formula replacement path variable to work out which proportion of data we have for this month. ie. if its day 15, we have 50% of data (if there are 30 days in the month - this just an example), therefore we should only show 50% of This Month Last Years column so that the comparison between the 2 is sensical.
So I'd like the formula variable to return a ratio or percentage which I can then use in a calculated key figure in the query to pro-rata the last year data.
The query currently displays data by Fiscal Period, so when working out the ratio I would need to check which Fiscal Period we're in and also consider that the data is loaded every night, so on the 1st day of a Fiscal Period we are comparing everything up until yesterday.
Can anyone see in problem with the logic of this, or better yet, has anyone done this before and maybe has some code for me? Is there another way I could be doing this?
Edited by: Julius Bussche on Sep 19, 2008 4:31 PM
Have you tried google for this Error Message...
http://support.microsoft.com/kb/959077
Similar Messages
-
Using Fiscal/Year Period to get last year all months data
Hi,
Had a requirement to get Last Years 1-12 months data based on Fiscal/Year Period. So here i am using Fiscal/Year period as my input. Please let me know with code.
Regards,
VishnuHi ,
Where you want to write code ?
Well the basic logic will be like :
TYPES: BEGIN OF ty_range,
sign TYPE c LENGTH 1,
option TYPE c LENGTH 2,
low TYPE c LENGTH 8,
high TYPE c LENGTH 8,
END OF ty_range.
DATA : t_range TYPE TABLE OF ty_range,
w_range LIKE LINE OF t_range.
DATA :v_lastyear type c length 4 .
v_lastyear = sy-datum(4) - 1 .
w_range-sign = 'I'.
w_range-option = 'EQ'.
concatenate v_lastyear '001' t into w_range-low.
concatenate v_lastyear '012' t into w_range-high.
APPEND w_range TO t_range.
****it will select data from source package for last one year .Internally year and period store like YYYYPPP (2011001)
select SOURCE_PACKAGE WHERE 0fiscper IN t_range.
you can modify selection statement as per your requirement .
hope this will be helpful .
Regards,
Jaya Tiwari -
Has anyone had this problem? Any solution(s) welcome!
Thanks for the info. I'll have to check this later this evening, since I'm in my office presently.
However, I do think it is (was) indexing. -
Asset retired/deactivated in current year pending adjustment from last year
Hi Guru's,
My user have one adjustments to do from previous fiscal year.
As we have some invoices in which we can do direct payment in Non-sap and for information purpose we enter the transaction in SAP. My user did a goods receipt in MIGO but have not created any invoice for the Vendor and done the payment. Now when I run MIRO with material document and PO, it is giving me message " You cannot post to this asset (Asset XXXXXXXXXXX deactivated)".
Note: Now the above asset X was retired current year and balance was carried forward to another Asset Y .
Option1. I tried activating asset in AS02 but it is in display mode. From where I can make it optional mode, plz give me the t.code.
Option2. While posting in MIRO, is it possible to change the Asset X to new Asset Y.
or if you have any other option please let me know.
Your help will be highly appreciated
Kind regard
LSHi Viswa & Siva,
Thank you very much guys for your quick reply.
The problem is not solved yet.
Viswa - In 2. Posting Information - FG 12 Deactivation is already flagged as Optional, MnNo. is ticked, Sbno. is ticked.
FG 13 Planned deactivation is flagged as Optional, MnNo. is ticked, Sbno. is unticked.
So this is not helping me out, am I missing something?
Siva - I tried again in MIRO, I am not able to change asset number. It is greyed out.
Please let me know what should i do?
Thanks
LS -
Calculating this month of last year revenue
Hi,
i am preparing a new dashboard like below
month total revenue total revenue of last year (january - 2011)
january 125.00 120.00
can you please share your experience how can i do this?Hi,
If you always want to show the previous years data (ie not only last year, but last two/three/.. years) then you can use AGO function in
RPD.
Refer for AGO-
http://gerardnico.com/wiki/dat/obiee/ago
OR,
But if you are using for a single last year then in the column formula use - 'January'||cast(year(current_date)-1 as char)
(If its always January you want)
Hope this helped/ answered.
Regards
MuRam
Edited by: MuRam on Jun 12, 2012 5:08 AM -
I'm a small user.
I guess that was a honeymoon rate last year?>honeymoon rate last year
When you joined the Cloud there SHOULD have been notice of an introductory price... and that it would go up after a year
Cloud Plans https://www.adobe.com/products/creativecloud/buying-guide.html
-and subscription terms http://www.adobe.com/misc/subscription_terms.html -
Can any body help me in providing the logic (ABAP logic-infopackage) for extracting data for 6th month considering sydatum.
Logic should be on Caday.
Example: If I am executing I/P today i.e. 13.01.2012, I should get the data of 01.06.2011 to 30.06.2011.
Please help.
Thanks in Advance.
Maddali VSKPHi,
As I am not core ABAPER, I tried below logic in the development. Logic is working fine. I am getting expected results.
DATA: l_cur_month(2) type n,
l_pre_month(2) type n,
l_cur_year(4) type n,
z_ppredat type DATS,
z_ppredat1 type INT1,
z_ppredat2(8) type n,
z_ppredat3(2) type n,
l_pre_year(4) type n.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CALDAY'.
l_idx = sy-tabix.
l_cur_month = sy-datum+4(2).
l_cur_year = sy-datum(4).
l_pre_year = sy-datum(4).
if l_cur_month >= 7.
l_pre_month = l_cur_month - 7.
endif.
if l_cur_month <= 6.
l_pre_year = l_cur_year - 1.
l_pre_month = 12 - ( 7 - l_cur_month ).
endif.
break-point.
concatenate l_pre_year l_pre_month '01'
into z_ppredat.
CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
EXPORTING
IV_DATE = z_ppredat
IMPORTING
EV_DAYS = z_ppredat1 .
z_ppredat3 = z_ppredat1.
concatenate l_pre_year l_pre_month z_ppredat3
into z_ppredat2.
concatenate "l_pre_year l_pre_month z_ppredat1" into z_ppredat2
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = z_ppredat.
l_t_range-high = z_ppredat2.
modify l_t_range index l_idx.
p_subrc = 0.
Request you to help me to validate the logic.
Thanks in Advance,
Maddali VSKP -
Unable to log into Facebook for BlackBerry 10 since last year
Please help me understand why the facebook app for BlackBerry 10 doesn't allow me to login at all. See the attached screen shot which may not successfully load (error message reads as follows "sorry, an unexpected error occurred. Please try again later), I haven't had the chance to even submit my login credentials. This has happened every single time I click the app for several months now.
Bought my Z30 last year summer/ fall and love it except for the lack of app selections.
However no luck even after the two BlackBerry 10 OS updates to 10.2.1 and the last two Facebook for BlackBerry 10 updates to 10.4.0.12. Un-installing, re-installing, deleting from phone and also removing from My BlackBerry World account did not work.
I have no problems logging into the facebook app made for iPhone, iPad. I'm able to login into my Facebook on Mac computer. Windows computer and even on the BlackBerry browser.
I have already exhausted my options with hours on the phone with tech support at Phone company.
I am hoping I can get some help without having to wipe my phone completely or having to send it into the phone company.
In addition, they will give me a loaner which so far I'm told all their stores only have z10 and no Z30s to give me while my Z30 will be in for repairs.
Any useful advice would be appreciated. Please read the above in its entirety before responding so you will know what I have already done.
Thanks in advance.Photoshop.com is gone. If you had photos stored there, you should have received a series of emails about their being moved to Revel. You can't sign in because there's nothing to sign in to.
-
Posting Depreciation for last year in the current year
Hi,
We have a situation in which we have to book depreciation for assets that were put into service since last year in the current year. The depreciation expense was accrued and reported when the year was closed out. However SAP wouldnt allow us to calculate the depreciation for anything before 01/01/2009. The assets were put into service in July of last year and hence we need to post 6 months of depreciation that we accrued last year in this posting period (when we will be capitalizing those assets). How do we go about doing this?
Here is what we tried:
1. Manual Depreciation: Doesnt work. The depreciation key we are using (LINA) doesnt allow manual depreciation
2. Changing the ordinary dep start date: You can change this date to last year but it wont calculate the depreciation from last year. It just starts the useful life from last year. The depreciation that is being caught up starts from 01/01/2009
3. Unplanned Depreciation: This is not an option because it goes to a different G/L account. The client wants it to be in the regular depreciation expense account only.
Any suggestions?
Thanks!Hi,
So far my knowledge goes there is no way wherein you can capitalise assets in currnet year and account for dep from the previous year unless you go for post capitalisation vide ABNAN.Let me try to explain it by the following example.
FY: April to March
APC 10000/
Rate od dep 10%
Ord dep Start 01.10.08.
Asset capitalisation date 01.10.08 but posted in the system on, say 01.04.09.
Line items for ABNAN
70 Asset A/c 10000
75 Acc Dep 500(on 10000 @ 10% for 6 months)
50 Rev for post capitalisation 9500.
FB60 Line items.
31 Vendor Account 10000
40 Prior per dep 500
40 Rev from post capitalisation 9500.
I do hope you will be able to clear your confussion.
With best wishes
Monoj
Edited by: MONOJ SARKER on Aug 5, 2009 12:11 PM -
How to show current year and last year sales in a WEBI Report
Hi Guys
How can show current YEar Sales in one column and Last YEar Sales in the other column based on a user prompt for the Current YEar Column.
For Example is user enter 2010 for Year how can i show a Column for Sales-2010 and Sales 2009.
ThanksIf you can modify your Universe add an object named New Object Last Year whose SQL is:( yourTableName.Year + 1)
Then in WebI create two distinct queries in your query Pane. In the first one you could do this:
Query 1:
objects: Year, Sales ... etc.
filters: Year Equal to '1. Prompt Year'
Query 2:
objects: Year, Sales ... etc.
filters: New Object Last Year Equal to '1.Prompt Year'
Then in your report you can drag each object on their respective columns.
If you don't want to use two distinct queries, use one like this:
Query 1:
objects: Year, Sales ... etc.
filters: Year Equal to '1. Prompt Year'
Or
New Object Last Year Equal to '1.Prompt Year'
Edited by: PadawanGirl on Jun 23, 2011 6:28 PM -
Line Chart to Compare Current Year vs Last Year
I am on BI 7 SP9. I need to create a line chart that shows 2 lines to compare revenue for the current year against last year. The first line should show the revenue for the current year. The second line should show the revenue for last year. In my BEx query, I have the fiscal period values in the row and the revenue key figure in the column. Questions:
1. How can I show 2 lines in the chart to compare revenue for the current year vs last year?
2. There are 2 variables for the fiscal period - one for current year and one for last year. The user can enter any value range in the fiscal period variables at query runtime, but the fiscal periods for each of the 2 years must be the same. This means the number of fiscal periods that appear in the query result rows will vary (e.g.. 3 periods for a quarter or 12 periods for a full year). The user has to enter the same fiscal periods for the current year and last year variables. How can I determine the fiscal period values to plot in the line chart for the current year and then last year when the number of rows in the query results will fluctuate?
The legend at the bottom of the chart should show JAN, FEB, MAR...DEC instead of the fiscal period values like 001/2007, 002/2007. Is there an exit I have to change to get this to work?
Thanks for any help you can give!You can do it in multiple ways
1.
SELECT COALESCE(t1.Company,t2.Company) AS Company,
COALESCE(t1.Sales2015,0) AS CurrentYearSales,
COALESCE(t2.Sales2014,0) AS PriorYearSales
FROM Sales2015 t1
FULL JOIN Sales2014 t2
On t2.Company = t1.Company
2.
SELECT Company,
MAX(CASE WHEN YearVal = 2015 THEN Sales ELSE 0 END) AS CurrentYearSales,
MAX(CASE WHEN YearVal = 2014 THEN Sales ELSE 0 END) AS PriorYearSales
FROM
SELECT Company,Sales2015 AS Sales,2015 AS YearVal
FROM Sales2015
UNION ALL
SELECT Company,Sales2014 AS Sales,2014
FROM Sales2014
)t
GROUP BY Company
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
YTD , Last year YTD help needed in OBIEE 11g
Hi all,
I have a report which looks this way
Banner Name
*Sales YTD*
*Sales Last year YTD*
YTD values are based on actual date of running report.
*so ex: the report is ran on 10-feb-2013, the Sales YTD will be from
01-Jan-2013 till 10-Feb-2013.*
* Sales Last year YTD will be 01-Jan-2012 till 10-feb-2012.*
I have achieved Sales YTD with my Time dimension.
My time dimension has the data for Last year , year ago date!
Can you please help me out on how to proceed for the Last year YTD
calculation?
Its helpful to share any syntax..
Regards
KumarHi,,
you can use Todate Function.
Take a Look @ this http://mkashu.blogspot.in/2013/08/obiee-model-time-series-in-obiee.html
Regards,
VG -
Getting last year column value from a single table
I am having the following columns in my table
BRANCH_CD
YYMM
VNDR#
VGROUP#
SALES_TRGT_AMT
SALES_ACTL_AMT
CUM_TRGT_AMT
CUM_ACTL_AMT
i need to get sales_actl_amt from this year and sales_actl_amt from last year from a single table
pls help
thank you
Edited by: 960991 on Nov 19, 2012 11:13 PMHi ashish,
but i can't use unions in my reports.
once view my query :
select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
sum(nvl(t.sales_actl_amt,0)) sales_actl_amt
from inv_sales_trgt_val t,branches b,vendor v where
t.branch_cd=b.branch_cd and
t.vndr#=v.vndr# and
(t.yymm between :fiscal_month and :fiscal_month2) and
(:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
t.vndr# between :from_vndr and :to_vndr
group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
order by t.vndr#,t.branch_cd;
how can i get last year sales_actl_amt . -
I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07. When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help..
Thank you for your reply. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07. When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help.
-
I have an iphone4 and that I have had for four years and they are saying that I am not eligible for an upgrade until the end of July 2015. That is four years and 3 months after I purchased this phone. "Customer service" said I had an upgrade at the end of July 2013, which I did not. She said that in the system my husband took an upgrade July 29th 2013. He didn't even have a Verizon phone, he had a work phone with T-mobile. I have asked what device he supposedly upgraded to since no phones have been activated and we all still have our same phones and numbers. Remember at the time, said husband had a work phone with T-mobile. I still have the very same phone as do all of the rest of my family members. No one has upgraded. I spoke with "customer service" for more than a half an hour today, Char promised me that her supervisor (Emily) would call me back by 7:30 tonight to clear up this problem. Well guess what? No call back so where should I go from here? Any advice or help would be greatly appreciated. Thank you for your help.
someone swapped upgrades. Phone could have been sold For quick cash.
Maybe you are looking for
-
Font Management Software Switch
I recently ran into a font problem after installing Adobe Photoshop upgrade 12.0.4. The process of reconciling this required that I uninstall my old copy of FontExplorer X, organizing my 4,500 fonts into a single and the proper location, and then val
-
Lightning to 30-pin Adapter - - will it be available in Black as well?
The reason I ask, is that if it only comes in white, it is going to look rubbish when used on a B&W Zeppelin. Black speakers, black iPhone 5 - white adapter. Not a good look at all. Apple - if you haven't produced one in Black - please do so!! I am
-
Before posting questions about the Ajax Framework use by the SAP NetWeaver Portal, please refer to SAP Note 1166135. You will need a logon to the SAP Service Marketplace before you can access this note!
-
Hi, I've been having a problem trying to set up an RSS feed through XSL transformations and PHP. I'm using Dreamweaver CS3. The server has PHP5 on it. Based on the error messages I don't think I have access to create an includes/ folder at the root l
-
Migrating from Oracle to portal to Oracle Webcenter
I have been trying to find information on migrating from Oracle portal to Oracle webcenter. So far I have been unsuccessful in my search. I have raised this question on My Oracle Support to see if they could assist but their response/only suggestion