ROLL UP WITHOUT A FUNCTION
HI, I have a typical Query requirement, which needs to do roll up but I cant use any of the analytical function . Thats a restriction . Here is the detail of my requirements.
Now lets say there are two tables. One stores the WBS Detail. The second one stores the Allocation Amount for the WBS. Now the WBSs are categorized into two differrent types. One as INPUT and the second one as NON INPUT. now assme the the WBS in a tree structure . So only the LEAF WBSs will have the AMOUNT . Now lets say there are 5 LEAF WBSs. Each LEAF WBS will have differrent start period ex: WBS 1.1 starts in January 2003 and goes for 48 periods . WBS 2.1 starts in November 2003 and goes for 35 periods . WBS 3.1 starts in March 2004 and goes for 52 periods. and so on .
Now as there is no Allocation Amount entry for all other WBSs except the LEAF WBSs. So how do I get the roll up . For example if you imagine the parent of WBS 1.1 is WBS 1 , and the parent of WBS 2.1 is WBS 2 and the Parent of WBS 3.1 is WBS 3 , and the parent for WBS 1, WBS 2, WBS 3 is "ROOT WBS". As I said there is no entry for WBS 1, WBS 2 , WBS 3 and the "ROOT WBS". So how do I have a roll up of the Leaf WBS data for their parent WBSs.
Now if u think of the data in a matrix report, the WBSs and the COST CATEGORY will be the row values, the Period Numbers will the column values and the Allocation Amount will be the cross values. so lets say the WBS 1 has got two leaf nodes, WBS 1.1 and WBS 1.2 then WBS 1 will have the summed amount for each period starting the minumum period of the two of its leaf nodes and for all the cost categories of both the leaf nodes. and the "ROOT WBS" will have all the cost categories of al the Leaf nodes . for all the periods , period wise.
I cant use any of the default analytic functions . So how do I do it using only SQL .
-feroz
I know John , its a pain in the neck . Buts thats the limitation I have to live with . Is there any way out ?
-feroz
Similar Messages
-
Opportunities in account overview without partner function dependency
Hello,
on the account overview page we can see the opportunities as well as the interaction history for a account.
In the interaction history frame we can see every activity and opportunity where the account is involved.
In the opportunities frame we could only see these opportunities where the account has a special partner function in the opportunity.
For example the main account role is prospect.
This account is involved in several opportunities with several different partner functions in the opportunities.
We can only see these opportunities in the account overview where he is assigned with the role prospect.
We did a customization for the time-frame in IMG: Customer Relationship Management => Master Data => Business Partner => Specify Display Options for Business Transactions.
Is there a similar way to customize the partner function dependency for display?
Or is there another way to show all the opportunities (in the opportunity frame) where the account is involved, without partner function dependency?
Best regards and thanks in advance
Matthias BreuerMatthias,
I believe you could influence this via the BADI CRM_BP_UIU_BT in enhancement spot CRM_UIU_BP_ENHANCEMENT. You can edit the selection criteria CT_SELECTION_PARAM as needed.
You can review the code CL_BUPA_IL_OPPORTUNITY_COMP to determine what criteria is being pouplated before the BADI is being called. In addition the filter value of the implementation needs to be 'BPQOPP'. From what I have seen SAP is hard-coding the partner type selection for the opportunity selection.
Take care,
Stephen -
currently, we face a issue, given PO amount 3230.58, after calling function "round", it becomes 3231.00, this is ok, but if PO amount 3230.12, after calling function round, it becomes 3230.12, it should be 3230.00,how to fix this?
if without calling function round, can any piece of code to fix the issue? thanksHi, Please try the following code
DATA: v_two_decimal type i VALUE '100',
v_amount1 TYPE MAXBT VALUE '100.12',
x_amount1 TYPE maxbt.
CALL FUNCTION 'HR_IN_ROUND_AMT'
EXPORTING
amount = v_amount1
rndoff = v_two_decimal " round off precision 2 decimal places
RNDLMT = 'N'
IMPORTING
RETAMT = x_amount1.
x_amount1 will give 100.00
if the value of v_amount1 is 100.58,
it will give 101.00 -
Find location without GPS function
Can the user have their location detected via a WAP site without the use of GPS? In the case of search for nearby locations via a directory service on WAP without GPS functionality (when user cannot download app version).
Thanks!This cannot be done directly. Phones with GPS will have the 'network positioning' feature which helps to obtain a GPS fix if satellite signals are poor, but I'm pretty sure it can't be used as standalone location method.
Any phone could theoretically know its approximate location based on which network base-station it is connected to (this is how network positioning works in GPS phones), but there is no software that I know of to put this information to use in the way you suggest.
Message Edited by mccbleue on 06-Apr-2009 04:55 PM -
Xperia S upper menu rolls down without touching the screen
Hello all! I have a Xperia S with the lastet firmware. The error is the following: the upper menu, where there is a sound, wifi icon, date, etc, rolls down without touching the screen. If i touch the screen for texting for example, the upper menu rolls down and i cannot keep texting. I have to touch the power button to block the screen, and touch it again to enable the screen. Is then when i can roll up the menu y try to use the phone. I can do this for a short time because the menu goes crazy again. From Sony Care told me that i can repair it by using The Repair Phone/Tablet option from the Sony Companion software(lastest version). It hasn't repaired my phone. I'm really concerned about, what else can i do? It is a software issue or a hardware one? Thanks for your time! Greetings!
Hello Quester, Regarding the cover, it has one, but i removed it when the issue appeared for the first time. It has factory cover only.Hmmm, i'm really concerned about it. I don't want to believe that is a hardware issue, but maybe it is. I've tried to make a downgrade of the firmware. Once, it worked and the issue disappeared but after a couple, and while i was installing some apps, the issue appeared again. I was thinking that may be an app could cause the issue but after applying the repair tool from Sony Companion, the issue remains and the phone is cleared, without any 3rd apps. Thanks and Regards,Pat.
-
How do you Remove a photo from the camera roll album without deleting from other albums
How do you Remove a photo from the camera roll album without deleting from other albums
If it was originally on the camera roll try this: take another unimportant photo for test purposes, copy it to any special folder you have created within Photos, connect your iPad to your computer, locate it as any other external device, and most likely that Photos folder will be the only thing that will show up, locate the photo, delete it and then sync your iPad.
If the test photo is gone from the camera roll but still in another folder within the app then you know that the system works so go ahead with the process. I understand that there are other photo apps which might let you achieve your goal much quicker.
Hope thi helps. -
How can one develop "view only" client applications in Lookout?This is to develop remote monitoring without control functionality.
We have 10 Client Nodes in the field and we need two "View Only" functionality in Client machines located on Supervisory Desks.I have done this. There are many ways to approach this but I will offer what I think is the easiest. This will work ONLY if you have been assigning security levels to your objects (objects that actually control devices in the field) greater than zero AND allowing a security level of zero to view all panels. When I develop interfaces I do this just for creating a non control client.
Basically, you remove all users from the Lookout client in the user manager. You will not be able to remove the built-ins, "Guest" and "Administrator". Now when the end users tries to login using his normal login he will be denied. Consequently, he will not be able to control. But, he will still be able to view all the information since a no login can view a panel with a viewing se
curity level of zero. You must ensure any pushbuttons that are used to open panels have a security level of zero.
Now you can copy this security profile by finding the lookout.sec file and copying it to another non-control client computer. In Windows NT this file is located in the system32 directory.
There are many other ways but I find this the easiest.
Regards,
Tommy Scharmann -
ORA-00978 without group function
I've experienced a strange problem with oracle 11g.
I've retrieved the oracle exception ORA-00978 even if there was no group function in my query.
I supposed was a problem in the optimizer so I rebuild the tables statistics, after that the query was execute successfully.
Does anyone has an idea what the problem is?
Is possible that a bug exists in the 11g optimizer?
My oracle version is:
Oracle Database 11g Enterprise Edition 11.1.0.6.0 64bit Production
the query i tried is:
SELECT *
FROM TBCALENDAR Cal,
VWCALENDARACTIVITY CA,
VWSE R,
TBSCHEDULERPARTITION P,
TBREGION REG,
TBRESOURCE RES ,
TBZIPCITY z
WHERE Res.id=Cal.RESOURCE_ID
AND R.RESOURCE_ID=RES.ID
AND Cal.ACTIVITY_ID=CA.ID
AND CA.SCHEDULING=1
AND Cal.SCHEDPARTITION_ID IN
(select item.PARTITION_ID
from tbidcprofile prof,
tbidcpartitem part,
tbschedpartitem item
where prof.USERPROFILE_ID=4
and prof.IDCPARTITION_ID=part.PARTITION_ID
and part.BUSINESSUNIT_ID=item.BUSINESSUNIT_ID
and part.REGION_ID=item.REGION_ID )
AND TRUNC(Cal.START_DT)=trunc(sysdate)
AND P.ID=Cal.SCHEDPARTITION_ID
AND REG.ID(+)=Cal.WORKREGION_ID
AND Z.GEOLOCATION_ID(+)=Cal.HOMEGEOLOC_ID;
VWCALENDARACTIVITY and VWSE are two views, but I can select from them without any problem.
I've also tried to remove one view at a time an the error occurs only when the query uses both view at the same time.
Thanks
Renzouser479513 wrote:
VWCALENDARACTIVITY and VWSE are two views, but I can select from them without any problem.
I've also tried to remove one view at a time an the error occurs only when the query uses both view at the same time.
What are the views definition ?
Nicolas. -
Top n analysis without analytical function or rownum
Hi
I am working on Oracle 9i and i have the following query.
My data is like as
Year Type Total
1996 A 23
1996 B 34
1996 C 19
1996 D 11
1996 E 45
1996 F 32
1997 A 12
1997 B 11
1997 C 34
1997 D 45
1997 E 67
1997 F 11
My requirement is to get the top 4 value year wise from the above data. All i need is without the use of ROWNUM as well as other analytical functions like RANK, PARTITION BY etc.
The required result set is
Year Type Total
1996 E 45
1996 B 34
1996 F 32
1996 A 23
1997 E 67
1997 D 45
1997 C 34
1997 A 12
Thanks
MSMaybe you can try this:
SQL> WITH TABLE_A AS
2 (
3 SELECT '1996' COL1, 'A' COL2, 23 COL3 FROM DUAL
4 UNION ALL
5 SELECT '1996' COL1, 'B' COL2, 34 COL3 FROM DUAL
6 UNION ALL
7 SELECT '1996' COL1, 'C' COL2, 19 COL3 FROM DUAL
8 UNION ALL
9 SELECT '1996' COL1, 'D' COL2, 11 COL3 FROM DUAL
10 UNION ALL
11 SELECT '1996' COL1, 'E' COL2, 45 COL3 FROM DUAL
12 UNION ALL
13 SELECT '1996' COL1, 'F' COL2, 32 COL3 FROM DUAL
14 UNION ALL
15 SELECT '1997' COL1, 'A' COL2, 12 COL3 FROM DUAL
16 UNION ALL
17 SELECT '1997' COL1, 'B' COL2, 11 COL3 FROM DUAL
18 UNION ALL
19 SELECT '1997' COL1, 'C' COL2, 34 COL3 FROM DUAL
20 UNION ALL
21 SELECT '1997' COL1, 'D' COL2, 45 COL3 FROM DUAL
22 UNION ALL
23 SELECT '1997' COL1, 'E' COL2, 67 COL3 FROM DUAL
24 UNION ALL
25 SELECT '1997' COL1, 'F' COL2, 11 COL3 FROM DUAL
26 )
27 SELECT COL1, COL2, COL3 FROM
28 (
29 SELECT
30 COL1,
31 COL2,
32 COL3,
33 (SELECT COUNT(1) FROM TABLE_A B WHERE A.COL1 = B.COL1 AND B.COL3 > A.COL3) ORDER_NUM
34 FROM
35 TABLE_A A
36 ORDER BY
37 COL1, COL3 DESC
38 ) WHERE ORDER_NUM < 4
39 /
COL1 C COL3
1996 E 45
1996 B 34
1996 F 32
1996 A 23
1997 E 67
1997 D 45
1997 C 34
1997 A 12 -
Rolling months - Time series function
Hi,
I am new to OBIEE and this forum, and wondering someone could guide me through this requirement.
I have a requirement that User needs to see inventory for rolling past 13 months, and should display inventory numbers(snapshot) for the first day of the month.
Date Inventory $
1-Jan-12 46652
1-Feb-12 25145
1-Mar-12 78542
1-Apr-12 45215
1-May-12 24156
1-Jun-12 98541
1-Jul-12 21478
1-Aug-12 25144
1-Sep-12 26545
1-Oct-12 48855
1-Nov-12 45698
1-Dec-12 12546
1-Jan-13 26586
How can I get past rolling 13 months in OBIEE? I have a variable created for "Rolling 13 months" and "First Day of month", but I guess they are not working when combined. Please advise.
Thanks,
PIf I understand correctly, I'd put a filter on the Date column using the Timestampadd function available in OBIEE. Something like:
"Table"."Date">= Timestampadd(SQL_TSI_MONTH, -13, MONTH("Table"."Date")
Let me know if this is not what you were looking for.
Please award points if helpful/correct. -
Behaviors without helper functions
Hi all, I'm trying to create a behavior that doesn't require
a behavior
function, is this possible using the behaviors API?
Dreamweaver requires a behaviorFunction() function in
behaviors, and
returnig an empty string results in a message "The Action
will not be
applied".
Is it possible to insert behaviors without a
behaviorfunction?
Sure I can create proxy functions that in turn call the
actual command (eg
alert()) but this seems a lot of overhead to put into the
document.
Joris"E Michael Brandt" <[email protected]> wrote
in message
news:fb3rqv$qv3$[email protected]..
>
> If you read the Extension help you'll see that certain
functions are
> indeed required by each type of Extension, whether
Behavior, Command, or
> Object. And certain methods are disallowed by each type
as well.
>
Yes i have the manual in front of me, i'm building a behavior
to call
commands in the AIR runtime, the air object is just available
in the
document when the AIRAliases.js is included, it doesn't need
a "helper"
function.
So what i'm doing now is inserting a proxy function to call
the original
function, return the name of the proxy function from
behaviorFunction and
wrap the call, that just seems like a lot of overhead.
Joris
function AIR_exec(cmdName) { //v1.0
if(typeof air != 'Object'){
alert('ERROR: AIR object not loaded, please include
AIRAliases.js');
} else {
var cmd = 'air.'+cmdName+'(';
for(var i=1; i<arguments.length; i++){
cmd += (i==1) ? arguments
: ','+arguments;
cmd += ')'
eval(cmd);
//Return the name of the function that we want to be inserted
into the
user's document.
function behaviorFunction(){
return "AIR_exec";
//Returns the actual function call string that will be
inserted into the
event handler
function applyBehavior() {
addAIRAliases();
return
"AIR_exec('trace',"+document.theForm.traceMessage.value+")"; -
Pivot type query without aggregate function. Transposing
Hi experts,
Oracle 11g.
I have a table (see code example to reproduce), that has a date, a grouping, and the count of that grouping (determined in another query). I need a pivot type query, but, without the aggregate functions. This is just for a report display. I can not seem to figure this one out. Thanks for your help.
CREATE TABLE temp_task
AS
SELECT TO_DATE ('15-NOV-2012') validation_date,
'GROUP 1' AS group_number,
42 AS monthly_count
FROM DUAL
UNION ALL
SELECT TO_DATE ('14-DEC-2012') validation_date,
'GROUP 1' AS group_number,
33 AS monthly_count
FROM DUAL
UNION ALL
SELECT TO_DATE ('15-NOV-2012') validation_date,
'GROUP 2' AS group_number,
10 AS monthly_count
FROM DUAL
UNION ALL
SELECT TO_DATE ('14-DEC-2012') validation_date,
'GROUP 2' AS group_number,
32 AS monthly_count
FROM DUAL
UNION ALL
SELECT TO_DATE ('15-NOV-2012') validation_date,
'GROUP 3' AS group_number,
7 AS monthly_count
FROM DUAL
UNION ALL
SELECT TO_DATE ('14-DEC-2012') validation_date,
'GROUP 3' AS group_number,
9 AS monthly_count
FROM DUAL;Using only SQL I need to return the following:
VALIDATION_DATE | GROUP 1 | GROUP 2 | GROUP 3
11/15/2012 | 42 | 10 | 7
12/14/2012 | 33 | 32 | 9Hi
You always need to use an aggregate function while pivoting.
Even if you don't really need any aggregation, that is, when what you see in the table is what you'll get in the result set, you still have to use an aggregate function. If there will only be one value contrinuting to each cell, then you can use MIN or MAX. It won't matter which; since there's only 1 value, that value will be the highest of the 1, and it will also be the lowest. For NUMBER columns, you could also use SUM or AVG.
SELECT *
FROM temp_task
PIVOT ( MIN (monthly_count)
FOR group_number IN ( 'GROUP 1'
, 'GROUP 2'
, 'GROUP 3'
ORDER BY validation_date
; Output:
VALIDATION_ 'GROUP 1' 'GROUP 2' 'GROUP 3'
15-Nov-2012 42 10 7
14-Dec-2012 33 32 9It sounds like you're doing real aggregation someplace, to get monthly_count. Maybe it would be simpler and more efficient to do the pivoting at that point. What is the big picture here? Post some sample data as it is before you compute monthly_count, and the results you want from that data (if different from what you've already posted), and then let's see if we can't aggregte it and pivot it at the same time. -
GROUP BY without GROUP functions
I red in Oracle university book that you can use the GROUP BY clause without using a group function in the SELECT list, can someone give me an example using the popular table 'employees' OR 'departments'
I cannot think of why or how such a query would be useful except it you selected the same column you grouped on you would be doing the equilivent of a select distinct:
UT1 > select deptno from emp group by deptno;
DEPTNO
10
20
30
HTH -- Mark D Powell -- -
Firefox is fantastic except when I have a problem. I must be real stupid. I have sent questions about different issues in the past and I see I got a lot of help. Unfortunately I cannot read any results. That is why I quit Firefox for a while. I just decided to give it another try; Firefox is worth it.
I have had Firefox installed on my "Win 7 Home" laptop for some time without updating it. It contains all my bookmarks from some time back. I just came back to Firefox and installed it on both my desktop machines with Win 7 Pro. The new Firefox sync and pairing are different. I cannot pair my old laptop with my new machines to copy all my bookmarks. I also cannot pair my two desktops.
What makes it worse, I cannot get the laptop to join the same home group my desktops are in. I tried different combinations with each computer and laptop creating the home group, but I could not get either desktop to be in the same home group as the laptop. The desktops would join each other's home group but not the laptop's. I can see all machines are connected to my home network. This dummy needs help.Hi watashi,
Welcome back :-) I would be very happy to help you out. The new version of Firefox 29 has a new sync. It just came out, so there is no worries about not knowing. Almost easy as pie: [[How to update to the new Firefox Sync]]
If anything is confusing, please post back so we can help you further and make that article a little more clear if need be :-) -
Trying to purchase Mountain Lion without a functioning hard drive
Hello,
My hard drive recently failed. Like an idiot, I misplaced the OS Snow Leopard disk in a move. I'd like to replace the hard drive & subsequently upgrade to Mountain Lion. Is there any way to purchase Mountain Lion without being able to access the app store?
I have a copy of Leopard, so I was thinking I might install the old OS, purchase Mountain Lion, back up the new OS, wipe the drive & then install Mountain Lion. However, am I correct in assuming that it is not compatible with Mountain Lion?
I'd really rather not have to buy Snow Leopard (again) and then buy Mountain Lion in order to achieve my goal.
Thank youAt least the price is low, scant comfort I know.
Maybe you are looking for
-
I can't insert a jpeg photo.Photoshop General Discussion
-
Change material code in process order or delete process order
Hi experts, While creating a process order in COR1 transaction code, wrong material code was entered. Can we change the material code in process order. If not, what is the complete procedure to cancel or delete the process order. Request you to reve
-
Removing G5 2.7 motherboard
I need to replace the motherboard on the G5 Dual 2.7. Do I need any special tools?, I have some experience with macs so am not worried about the job, I'm just wonderingt if there is a specific tool I may need before I start.
-
Cashier cannot see the some documents for cheque printing
Some Payment proposals have been made but the Cashier cannot see the documents for cheque printing. They are showing complete when you check with T.code SWIA. What could be the reason? Regards, Chansa
-
Shuffle doesn't work for one playlist
I followed this article: http://docs.info.apple.com/article.html?artnum=61574 and made sure I have the right settings, but it still doesn't shuffle one of the playlists. All the rest of the playlists seem to shuffle, but this one always shows only in