Formulas and restrictions on characteristics in a query
Hi Guys
This might seem like a strange question but can you perform formulas on characteristics in a query or just key Figures.
For instance for one query I have to substring the key to just the last two characters and on another I'd like to be able to display the product id twice based on the product type (like a restricted key figure)
I can't see how to do this in the query is there a way or should this be done in the info cube or in the report once the results have been obtained?
hi rachel,
u can create in routine in either transfer rules or the update rules that would restrict your characteristic value to only the last two characters.Now it is up to you to decide whether to restrict the original characteristic or create another characteristic which gets its value from these routine.
for the second part of your question i think the restricted keyfigure will do its job.
reward if it helps,
ajay
Similar Messages
-
Bringing in Calculated and Restricted Key Figs
How do I bring in calculated and restricted key figs from one query to another in BI 7.0? When I created these key figs it said that they were reusable.
ThanksHello Atif
When you make CKF or RKF at query level which means right hand side in your column these are local to your query and not useable.....but when you make them global by defining in left hand side they can be reused in other query....so when u willl create another query...these CKF and RKF will be available...just drag and drop them they will work
Thanks
Tripple k -
Restricted KFs , Formulas and Summations
Dear Experts,
I'd like your help on the following issue :
I have 2 Restricted KFs defined in a query , eg R1 and R2. I have a formula which does a simple multiplication, eg. F1 = R1 *R2. The query is drilldowned by Material Group1, MaterialGroup2 and Material. The result is correct on the material level. On the two higher levels, the result is
FMatGrp1 = SumofR1 * SumofR2. I want to be FMatGrp = SumF1.
That is :
R1 R2 F1
MaterialA 100 2 200
MaterialB 100 3 300
Query Result MaterialGroup1 : 200 5 1000 - Instead of 500
I have searched a lot in the forum, I have seen a lot of similar questions, but most of them are not answered. I have tried almost every possible solutions from calculated kfs to aggregation levels.
I'm not sure if there is any answer in this problem. I'm using BW 3.5
Thank you a lot in advance.
DinaHi Dina,
Have u tried making the 'calculate result as' in the properties for F1 as 'total' or 'summation'?
That should help here.
Thanks & Regards,
Rathy -
Annoying behavior in Query Designer (formulas and selections moving a lot)
Hi guys,
I hope you can help me with this issue which is very annoying.
We are using SAP GUI 7.10 SP 5.
We have a lot of queries with 2 structures: one in the columns and another one in rows. In each structure we have a lot of Calculated and restricted key Figures in the specific order we need them, some of them nested to simulate navigation, some of them are hidden and some visible. Very frequently when we do any change (add a new key figure, move one specific key figure, copy and insert a key figure, etc.) Some key figures we are not touching change their position in the structure. This is happening to all my team mebers who work in 6 different computers, some in Spanish some in English with different versions of Windows .
At the beginning was not a problem but now that our queries are bigger, make a small change could spoiled sorting of an entire query
Has anyone experience this? I would really appreciate any advice on this issue.
Regards,
Raimundo AlvarezAny ideas? Has anyone faced this issue?
Thanking you in advanced,
Raimundo Alvarez -
Limitation of Characteristics in a Query
Hey Guys,
Is the limit of characteristics in a query restricted to 50? I have an error message stating that: "Maximun number (50) of drilldown characteristics is exceeded".
Please advise.
Timi JonesHi,
Read note 1117281 "reasons and Prerequisites".
Rgds
Manoj kumar -
How to remove pound symbol # and preserve leading zeros in BEx Query
Hi,
I have two questions regarding the display in BEx Query.
1. How can I remove the pound symbol # for blanks in BEx Query?
2. How can I preserve leading zeros? At the moment, value "001" will be displayed as "1". But I need the leading zeros.
Thanks.
JoonHi ,
You can apply these settings in Bex query designer.
If you need to remove pound symbol jsut make a new formula and use NODIM function you will find this function under data functions.
So NODIM(Your price keyfigure) this will remove the Pound symbol.
For # just find out against which characterstic you are getting # then go to default values panel there you will find all your characterstic which you are using in report---Rt click -Restrict-single valuesdirect input-#-Move to selection(That forward arrow)--select that # and choose exclude from selection (That red square icon).
And yes for leading zeros check out this thread
Leading zeros not displaying
Hope it helps you.
Regards,
AL
Edited by: AL1112 on Jun 9, 2011 1:43 PM
Edited by: AL1112 on Jun 9, 2011 1:47 PM -
Effect of Restricted Keyfigure & calculated keyfigure in query performance
Hi,
What is the effect of Restricted Keyfigure & calculated keyfigure in Query Performance?
Regards
AnilAs compared to formulas that are evaluated during query execution, calculated key figures are pre-calculated and their definitions are stored in the metadata repository for reuse in queries. The incorporation of business metrics and key performance indicators as calculated key figures, such as gross profit and return on investment (which are frequently used, widely understood, and rarely changed), improve query performance and ensure that calculated key figures are reported consistently by different users. Note that this approach improves query runtime performance but slows InfoCube or ODS object update time. As a rule of thumb, if multiple and frequently used queries use the same formula to compute calculated fields, use calculated key figures instead of formulas.
RKFs result in additional database processing and complexity in retrieving the query result and therefore should be avoided when possible.
other than performance, there might be other considerations to determine which one of the options should be used.
If the RKF's are query specific and not used anywhere in majority of other queries, I would go for structure selections. And from my personal exp, sometimes all the developers end up with so many RKF and CKF's that you get easily lost in the web and not to mention the duplication.
if the same structure is needed widely across most of the queries, that might be a good idea to have global structure to be available across the provider, which might considerable cut down the development time. -
Can we use formula column in lexical parameter in sql query ...
hi
can we use formula column in lexical parameter in sql query ...
as example
i want to give
select * from & c_table
forumula
function c_table
if :p_sort = 1 then
return 'dept'
else
return 'emp'
end;
c_table formula column
is this possible ...
i have such example in oracle apps reports
if i try in ordinary report usinf emp table it show error ..
how we can give formula column...
please help me in this regard...
Edited by: 797525 on Feb 20, 2012 9:31 PMthanks sir,
iam not exactly saying select * from &c_table but some thing that like columns in select stmt also will be populated in user_parameters ,there are lot of table select.......from mtl_demand md, mtl_system_items msi, mtl_txn_source_types mtst, mtl_item_locations loc &C_source_from &C_from_cat
&c_source_from and &c_from_cat formula column and there are defined at report level only ......
pl/sql code &c_source_from is
function C_source_fromFormula return VARCHAR2 is
begin
if :P_source_type_id = 2 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id = 3 then return(',GL_CODE_COMBINATIONS gl');
else if :P_source_type_id = 6 then return(',MTL_GENERIC_DISPOSITIONS mdsp');
else if :P_source_type_id = 5 then
if :C_source_where is null then
return NULL;
else
return(',WIP_ENTITIES wip');
end if;
else if :P_source_type_id = 8 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id is null then
return(',MTL_SALES_ORDERS mkts,
MTL_GENERIC_DISPOSITIONS mdsp,
GL_CODE_COMBINATIONS gl ');
else null;
end if; end if; end if; end if; end if; end if;
RETURN NULL; end;
this is forumula column i hope that you understand what iam saying
please help me in this regard....
thanking you... -
Using join and batch reading in the same query
Hi,
I wonder if it is possible to use "Joining" and "batch reading" in the same query.
For example I Have
A -> 1-1 B
A -> 1-1 B
B -> 1-M C
This is the case where I have two separate 1-1 relationships to the same class B from A. Toplink 10.0.3 can manage it nicely through joining.
Now, I would like to read a set of As (with its 2 Bs) and all Cs for each B.
It seems that the following configuration does not work:
A -> 1-1 B (use joining)
A -> 1-1 B (use joining)
B -> 1-M C (Batch read)
Any help would be greatly appreciated
Tony.James,
Would you be so kind to look at the following code?
Am I formulating it correctly to achieve my desired behavior?
Trip.class -> 1-1 PickupStop
Trip.class -> 1-1 DropoffStop
PickupStop and DropoffStop extend Stop and use same table (STOP)
Stop -> 1-M StopEvents
I would like to fetch all Trips, with their Stops and all StopEvents in 2 queries:
1. Trip joined with Stop
2. Batchread StopEvents
Code:
ReadAllQuery raq = new ReadAllQuery(Trip.class);
Expression qexp1 = new ExpressionBuilder();
Expression qexp2 = new ExpressionBuilder();
raq.addJoinedAttribute("pickupStop");
raq.addJoinedAttribute("dropoffStop");
raq.addBatchReadAttribute(qexp1.get("pickupStop").get("vStopEvents"));
raq.addBatchReadAttribute(qexp2.get("dropoffStop").get("vStopEvents")); -
ASO MDX member formula and performance
Hi,
I am doing some testing about MDX formulas and performance. I found a performance issue but I can not understand why is taking so long time a report.
The situation is:
I create a report or a MDX query with:
6 dimensions in row and 1 dimension in column
rows:
Period - Filtered using a member
Year - Filtered using a member
Relationship Manager - Filtered using a member
Report Type - Filtered using a member
Local Relationship Manager - 4400 members level 0
Global Relationship Manager - 10400 members level 0
Column:
Account dimension, only a member
The member selected for Report Type (RM.Local) has a formula
My Report Type dimension has 10 members, there is one member where I store data called : RM.Input
My first test was
RM.Local his formula is [RM.Input] , the report is run in 1 second
RM.Local his formula is ([RM.Input],[MTD]) where MTD is a member level 0 store in my view dimension. The report run in 20 minutes. I was not expecting so bad performance when I only pointing at [RM.Input],[MTD]
Do you consider this time is reasonable when I am using this formula?
The mdx report is:
With
set [_Local Relationship Manager3] as 'Descendants([All Local Relationship Managers], 2)' = level 0 members
set [_Global Relationship Manager4] as '[Global Relationship Manager].Generations(4).members' = level 0 members
set [_Period0] as '{[Period].[Oct]}'
set [_Relationship Manager4] as '{[Relationship Manager].[Dummy1)]}'
set [_Report Type0] as '{[Report Type].[RM.Local]}'
set [_Year2] as '{[Year].[FY-2013]}'
select
{ [Account].[Expenses]
} on columns,
NON EMPTY {crossjoin({[_Local Relationship Manager3]},crossjoin({[_Global Relationship Manager4]},crossjoin({[_Period0]},crossjoin({[_Relationship Manager4]},crossjoin({[_Report Type0]},{[_Year2]})))))} properties MEMBER_NAME, GEN_NUMBER, [Global Relationship Manager].[MEMBER_UNIQUE_NAME], [Global Relationship Manager].[Memnor], [Local Relationship Manager].[MEMBER_UNIQUE_NAME], [Local Relationship Manager].[Memnor], [Relationship Manager].[MEMBER_UNIQUE_NAME], [Relationship Manager].[Memnor], [Period].[Default], [Report Type].[Default], [Year].[MEMBER_UNIQUE_NAME], [Year].[Memnor] on rows
from [DICISRM.DICISRM]Ok Try this one
But here you have to change the MDX formula every month.
Year
--FY2009
--FY2010
--FY2011
--FY2012
Period
--TotalYear
----Qtr1
-------Jan
-------Feb
-------Mar
Let say if you're CurrentYear is FY2011 and you're Current Month is March then you're MDX will be
case when contains([Year].CurrentMember,MemberRange([FY2009],[FY2010])) and contains([Period].CurrentMember,MemberRange([Jan],[Feb]))
Then
B
else
C
end
For the Next month you just have to make a change in the MemberRange I.e.,(Replace Feb with Mar)
*case when contains([Year].CurrentMember,MemberRange([FY2009],[FY2010])) and contains([Period].CurrentMember,MemberRange([Jan],[Mar]))*
Then
B
else
C
end
I tested it and Its working fine.
I think this will solve you're problem but there might be a more elegant solution out there.
Regards,
RSG -
How to restrict the quantity in bex query?
Hi all,
i have created a query using infosets and it looks like this :
material cost tax amount units
madhb 21,693 1,443.42 99 each.
I want to restrict the query in such a way only one unit value need to be displayed.
How to restrict it by showing only single unit.
The expected result should be like this??
material cost tax amount units
madhb 293 144 1 ea
Can anyone let me know how to restict the quanity so the query will display the results only for one unit.
thanxs
harithaHi Pradiba santosh,
I have created a conditions and restricted the key figured.
zunit equal 1.
and i have saved and executed the query. But still it displayed for all the units. And it didnt display the query for one unit. Why is that so?
can you let me know what went wrong on it?
thanxs
haritha -
Drag and Drop not working properly in Query
Hi,
In my Query, I have Material and Segment as characteristics in the rows. I have Calendar day in Free char. After executing the query, If I drag Calendar day and drop it between material and segment, Instead of coming in between the two characteristics, Calendar day always moves to the first position(Ahead of Material). I think this probably because of patch upgrade.Have anyone faced this issue?
Regards,
KrishnaHi Krishna,
In my opinion it can be because of a patch upgrade or may be some files were installed afresh for Bex. If possible you can try by installing the Business Explorer once again. It should resolve the problem.
Regards,
VA -
Restricted/Calculated Key Figures in Query vs MDX?
Hello All,
We are embarking on our first project utilizing SAP BW as the Data Warehouse and Web Intelligence as the presentation tool.
We plan on creating the universes on BW Queries.
What are the pros and cons of using Restricted and Calculated Key Figures in the query versus creating them in the Universe? Also from a performance impact point of view if there is any?
Best Regards,
Dan KriegHi Dan,
I would suppose that there is no big influence on performance. If the calculation for the calculated key figures are very complex I would propose to calculate them on query level. So its easier to use them also in other environments.
Please take into consideration that OLAP universes are not supported in Crystal Reports. More information you find in the thread [OLAP universes and Crystal Reports|OLAP universes and Crystal Reports;.
Regards,
Sebastian -
Restricting Users access to BW Query based on Criteria
Hello ,
Haven't found much help with the security implementation documents , i have been given a objective to create Profiles/roles and which would be used only for reporting on 1 single Cube by users from multiple departments.
Create profile/Roles and provide access to users for Query ZREP_C0_1 .
User belonging to comp_code1 & region4 & plant6 should be able to view only his data and none other even if the user wishes to see Compcode2 & region3 & plant4.
( Reporting with restrictions over the User authorizations on Region/Compcode )
Creating the Role has been the easy as it was just to provide access to the infoarea , cubes, infobjects , query and authorization objects to execute query. However i am stuck on how to proceed further on the above scenario regarding restricting the users.
Your help is much appreciated .
Regards
RajaHi Pratheesh,
If you are going to use client authentication in SSL and if client authentication fails since not all users will have client cert provided by you, SSL handshake will not complete and hence no access. But this is a performance impacting option. Restricting access on FW would be a good option.
During the flow of a normal SSL handshake, the server sends its certificate to the client. The client verifies the identity of the server through the certificate. However, the client does not send any identification of its own to the server. When you enable the client authentication feature on the ACE, the ACE requires that the client sends a certificate to the server. The server then verifies the following information on the certificate:
The CA has not revoked the certificate.The certificate signature is valid. The valid period of the certificate is still in effect. A recognized CA issued the certificate.
You can specify the certificate authentication group that the ACE uses during the SSL handshake and enable client authentication on this SSL proxy service by using the authgroup command in SSL proxy configuration mode. The ACE includes the certificates configured in the group with the certificate that you specified for the SSL proxy service
Regards,
Kanwal -
Hierarchy nodes as characteristics in a query
Hi all,
I would like to ask if there is a way to use hierarchy nodes of InfoObject 0cost_elemnt as characteristics in a query.
In other words I have a grouping of cost elements in R/3 and uploaded this group as a hierarchy in BW. Now the users want to have the ability to drag and drop in a query report any node of this hierarchy.
Can this be done?
Thanks in advance,
PanosHi,
I guess, if I am getting you correctly the user wants to see teh hierarchy levels individually or on adhoc basis.
Is that right?
Regards,
Ray
Maybe you are looking for
-
Problem with Lovs in same row of table
Hi all, I am using two lovs in a row of advanced table.In first lov I am searching for few attributes and storing on of the values in a formValue(by using addLovRealtions(....,...,...,LOV_RESULT,...)). Based on this value I am using LOV_PASSIVE_CRITE
-
Invoiced quantity is smaller than ordered quantity
HI Everyone, When i'm doing archiving for the object MM_EKKO.The following message i got "Invoiced quantity is smaller than ordered quantity". Please can any one tell me how to close this type of purchase orders and continue archiving Regards subhash
-
While browsing online tonight my Wi-Fi failed and then after restarting I noticed that I can no longer swipe "back" on websites...when I swipe back to go to a previous page the browser just freezes – can't click anything or navigate to another site –
-
Difference between tRFC and RFC
Hi Experts, Can any one help me in details to differentiate tRFC from RFC in their application perspective. And also let me know the role of ALE and BAPI in both the connection log.ie,Where we have to use ALE and BAPI. Regards Kumar
-
Get table partition name dynamically for given date range
Dear All, Could you please tell me how to get the partition name dynamicaly for given date range ? Thank you.