Filters in the Query
Hi,
I have a requirement where the business users needs to analyse the data by filtering the values on 2 characteristics. And the filters which has been used on these characteristics should work like an OR condition.
For Example : Origin & Destination are 2 characteristics in my query and the data looks as shown below
Origin Destination
BOM DEL
DEL BOM
BOM MAA
BOM HYD
DEL AMD
Based on above sample data, user requirement is, if he filter the value to BOM for Origin and BOM for Destination, Output should work like where Origin=BOM or Destination = BOM. In this case, he should get BOMDEL, DELBOM, BOMMAA, BOMHYD.
But currently it is working as an AND condition. The moment user select Origin as BOM all the records are filtered where ORIGIN=BOM.
Can anyone please help in resolve this issue.
Regards
Ramesh Ganji
Hello Ganesh,
Can you elaborate on this please? Like where the code must be written and if possible the logic of capturing the values. Thanks!
Regards,
Prem.
Similar Messages
-
Hi All,
We have a query which has fixed filters, say 001, 002 and 003, on a characteristic, say ZCHAR. I have to add 004 and 005 to these fixed filters as the business has created these 2 new values.
The issue is, the business might often create new values or even delete the existing values and I have to always change the query to reflect the business changes. This is a bit hectic thing to do as I have to change the query and transport it all the way through to the production.
I am in the process of finding a better way to do this, instead of using fixed filters, to overcome this issue like maintaining the values as a master data and reading them in customer exit and populating the variable at runtime etc.
Any inputs would be highly appreciated.
Many Thanks,
James.James,
Sometimes if it works in your report - you could use hierarchies. While you do have to maintain the hierarchy, you wont keep having to remember to go into reports to change things there.
Also consider the use of Restricted key figures if appropriate. Again all you will have to do is amended the restricted key figure by adding or removing filter values and wherever that RKF is in your report it will pick the change up.
House keeping is always a pain
Regards
Gill -
Hi Experts,
Iam new cell definitions in the query. can anyone please explain an easy example scenario using cell definition and the reason why we go for it eventhough we can do all the filters in the query definition windows as well.
Thanks,
DVBefore you create cell, you need to have two structures only then the cell icon will be enabled.
The value of the cell is dynamically getting calculated using formula, example,.. in your struct:
KF
PLANT1-----10
PLANT2-----20
But you wanted to get plant1 divided by Plant 2 and vise versa for the other plant, you can achieve this only by using cell.
After creating the two structures, then the cell icon will be enabled once you double click that, that is the time you can do all the manipulation for the cell.
hope that helps.
Thanks.
Wond -
Another BW question about filter in the query definition
Hi ,
I have another question about filter in the query definition.
<u>Question:</u>
Which of the following objects can be filtered in the query definition?
A. characteristic
B. Key figure
C. Structure
D. Units
E. Hierarchy
My answer is A,B,D,E.
The answer in the book is A,B,D
Can anybody tell me which one is wrong?
Thanks in advance,
Liu JiaHI
1.The answer could be A,B,D.you can not apply filters on hierarchies
2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
sri -
Filters in the aggregation level
Hello
I use IP 7.0.
I set up a filter in the aggregation level (Calendar month between 05.2007 and 07.2007). But this filter is not taken into account when I run the query? Why?Filters on the aggregation level are automatically available to be used in the query; but not necessary to use. You can set your own filters in the query. If you ned to use the filter set on the aggregation level, then you need to physically darg it and to the query definition side. In a way it is like a structure.
Ravi Thothadri -
Result of the query is not filtered as value given in Select Option variabl
Hello ,
A Select option Variable is created on Navigational Attribute( ZINV_PROG) of 0WBS_ELEMT.
The Compound Key for object ZINV_PROG(Investment program) is APPR_YEAR( Approval Year)
This ZINV_PROG object does not bear Master data.
The values in the field get populated as you load Master data of 0WBS_ELEMT.
The values for this objects is as shown below:
APPR_YEAR ZINVPROG
2005 ESCCCAPS
2007 ESCCCAPS
2008 FIRE
2006 CAPITAL
A select option variable is craeted on this Navigational attribute.
When you execute the query , On the selection screen of the query..
If you provide i/p for Investment programm field as 2007 ESCCCAPS, the data should ideally be filtered for this values only.
But the result of the query shows data for both values 2005 ESCCCAPS and as well as for 2007ESCCCAPS.
Let me know how to sort this issue.
Points will be assigned for the correct and helpfull answere.
Thanks,Thanks Srini for your prompt explanation.
My Question is if Approval year is a compounded key of ZINV_PROG object why data would not get filter out directly.
I mean on the screen for this particualr variable i take help - F4 to see values there you are able to see all the values of Investment programm along with the apprroval year.
If i select value as 2005 ESCCCAPS from the help F4 screen then ideally data should be fileterd out for this particular value. But it is not happening so.
Is that so in Query desgining that if you creating a variable on Nav Attribute, and that particular Nav attribute has a compound key then if you want to filter out the data for this Nav attribute correctly you would also require to create a variable for Compound key also.
Please let me know
Thanks -
Error While Filtering a Particular Value in the Query Navigation
Hi ALL,
we have a time charecteristic 0FISCPER in our query and the output of the query is fine until we filter this on the variant V3 ,system is throwing an error
"System error in program SAPLRRK0 and form SORT_END_TRUE-01- (see long text)"
i have tried to fix this in "analysis and repair of infoobjects " by mentioning the name of the infocube then the system is showing the inconsistancies by the following messages
>>InfoCube XFIGL_C11 was marked as a Cube with an inconsistent time dimension.
>>Record with the DIMID 44 contains non-fitting time characteristics
>>This DIMID is used by 2475 records of the fact tables
>>No master data found for characteristic of test described subsequently
>>Time characteristic 0FISCPER value 102006000 does not fit with time char 0FISCPER3 val 0
this error is there both on the development and also the production servers. any light thrown on this issue is a awewlcome and i promise to reward points,
regardsHi,
There are a couple of threads on the same issue.
Refer to these, just might be handy.
Re: Uncaught_exception in Report Designer
Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION in Report
Good Luck!
Sandeep Tudumu -
Data Mining on data specified and filtered by the user in runtime
Hi Experts,
i am new to Data Mining in SAP BI (we are on BI 7.0 SP Level 20). I familiarised myself with APD and Data Mining by reading some interesting and useful threads in this forum and some other resources. Therefore I got a understanding about the topic and was able to create basic data mining model for an association analysis and an corresponding APD for it and write the results into a DSO by using the data source. But for now I was not able to find a solution for a concrete customer requirement.
The user shall be able to select an article, a retail location and a month and get the top n combinations sold with that article in the particular location and month. For that he may not access the data mining workbench or any other SAP internal tools but he shall be able to start the analysis out of the portal (preferable a query).
We had some thoughts on the scenario. The first idea would be to create an APD for every location for the last month. As we need to cover more than 100 locations, this would not be practicable. Therefore I think it would be necessary, that the user can select the particular filters, and the data mining would then be executed with the given input.
The other idea was to use a query as source. The user would start this query and filter location and month in it. The result of the query could then be used as the source for the APD with the association analysis. Therefore we would need to create a jump point from that query, which starts the APD with that results. After that the user should be able to start a result query, which displays the result of the association analysis (ideally this result query would start automatically, but starting it manually would be ok, too).
So, I have the following questions for these scenarios:
1.) Is it possible to create variants of a single APD, for automatically doing the data mining for the different locations?
2.) is it possible to start an APD out of a query, with the particular results regarding filtering?
3.) Can we place a query directly on the data mining results (how?) or do we need to write the data mining results in a DSO first?
4.) What about the performance? Would it be practicable to do the data mining in runtime with the user waiting?
5.) Is the idea realistic at all? Do you have any other idea how to accomplish the requirement (e.g. without APD but with a query, specific filter and conditions)?
Edited by: Markus Maier on Jul 27, 2009 1:57 PMHi ,
you can see the example : go to se 80 then select BSP Application ,SBSPEXT_HTMLB then select tableview.bsp , you will get some idea to be more clear for the code which you have written
DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
tv ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'tableView'
id = ''tbl_o_table" ).
IF tv IS NOT INITIAL.
DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
tv_data = tv->data.
IF tv_data->prevSelectedRowIndex IS NOT INITIAL.
FIELD-SYMBOLS: <row> LIKE LINE OF sflight.
READ TABLE ur tablename INDEX tv_data->prevSelectedRowIndex ASSIGNING <row>.
DATA value TYPE STRING.
value = tv_data->GET_CELL_ID( row_index =
tv_data->prevSelectedRowIndex
column_index = '1' ).
endif.
endif, -
While running the query how much time it will taken, I want to see the time
Hi Folks
I would like to know ... While running the query how much time it will be taken, I want to see the time? in WEBI XI R2.....
Plz let me know the answer.......Hi Ravi,
The time a report runs is estimated based on the last time it was run. So you need to run the report once before you can see how long it will take. Also it depends on several factors... the database server could cache some queries so running it a second time immediately after the first time could be quicker. And there is the chance of changing filters to bring back different sets of data.
You could also schedule a report and then check the scheduled instance's status properties and view how long a report actually ran.
Good luck -
Problem in running the query on ODS
Hi All,
I have been trying to run the query which consists of only 25 fields and doen't contain much calculations and routines and trying to restrict even 7000 records.
That too result in system failure reporting on storage parameters somtimes giving dump as well.
Could you please suggest me the solution for this as this is urgent requirement.
Thanks
SuryamHi,
Are you using a filter / restrictions in the query,if So create a Secondary index which can be suitable(same order) to this filterations/restrictions.
You can find the order in where cluase in the sql statement used in the query execution.you can see it in SM50.
With rgds,
Anil Kumar Sharma .P -
Error in while Executing Query in the Query Designer
Hi,
I created info Set based two info object and three Data Store Objects. and join condition is Left Outer Join.
there are Business Partner info object, CRM BP Sales View Info Object and Data Store Objects are BP: Roles (0BP_ROLE),Partner: Industries(0BP_IS),CRM Marketing Attributes for Business Partner(0ATR_DS01)
I given some Selection Parameters while executing query in the Query Designer. in That i given city is selection parameters
and i creted variable for this info object.
it gives the Error Messages
Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
Der Wert "New Delhi " von Merkmal 0CITY40 enthält an der 10.ten Stelle einen Fehler
it is very urgent , can any one help me regarding this.Hi Reddy,
The Error message in english is this
While reading the data mistakes have appeared. Navigation is possible
The value " New of Delhi " from sign 0CITY40 contains a mistake at the 10.ten place
and i think you need to run the change run and run the report with out selecting the variable option.and navigate in the report by filtering the report for your requirement.
Try this and let me know.
Thanks,
RK -
Populating cascading listboxes without processing the query in HIR 8.3
I have 2 listboxes. First listbox populated using Group Number. Second Listbox should contain all account numbers corresponding to the Group Number selected in the first listbox, I need to do this without processing the query. I tried this way :
1. Created a query section “Query” and in that created a limit Group Number. Through this limit I am populating the first lisbox.
2. Created another query section “Query2”. In that created Group Number as first limit and Account Numbers as another listbox.
3. After selecting the Group Number from listbox1, I am passing this value to the first limit of “Query2”.
4. I am doing RefreshAvailableValues on the second limit of “Query2”. Now I am expecting the records corresponding the selected account number in the second limit of “Query2”. But I’m getting all the available values.
What is wrong in the above or any better solution is available please suggest.
Edited by: user13386590 on Jul 12, 2010 9:32 PMWhy do you want to do this without processing a query.
Each time you execute the script RefreshAvailableValues you are essentially executing a query...look at the Query log.
As for the issue in # 4 you will want to change the properties on the Data Model. From menu select
DataModel
- Data Model Options
check the Filter/Limit tab and try out different options
--- below is from 11.1.1.1 help
Data Model Options: Filters
Use the Filters tab to specify filter browse level preferences and to select global filter options.
When you use Show Values to set filters, you may sometimes need to sift through a lot of data to find the particular values you need. Filter preferences enable you to dictate the way existing filters reduce the values available through the Show Values command.
For example, you want to retrieve customer information only from selected cities in Ohio. However, the database table of customer addresses is very large. Because Interactive Reporting applies a default filter preference, once you place the initial filter on State, the Show Values set returned for City is automatically narrowed to those cities located in Ohio. This saves you from returning thousands of customers, states, and from all sales regions.
You can adjust this preference so that the initial filter selection has no effect on the potential values returned for the second filter (all cities are returned regardless of state).
Filter Options
Show Minimum Value Set—Displays only values that are applicable given all existing filters. This preference takes into account filters on all tables and related through all joins in the data model (which could be potentially a very large and long running query).
Show Values Within Topic—Displays values applicable given existing filters in the same topic. This preference does not take into account filters associated by joins in the data model.
Show All Values—Displays all values associated with an item, regardless of any established filters.
Tip:
When setting these preferences for metatopics, be sure to display the data model in Original view.
Global Filter Options (Designer only)
Show Values—Globally restricts use of the Show Values command in the Filter dialog box, which is used to retrieve values from the server.
Custom Values—Globally restricts use of the Custom Values command in the Filter dialog box, which is used to access a custom values list saved with the Interactive Reporting document file or in a flat file.
Custom SQL—Enables the user to code a filter directly using SQL.
Note:
The Topic Priority dialog box is displayed only if you first select join in the data model.
Note:
Since most data models do not have the same set of topics, you cannot save changes to the topic priority as default user preferences. (For more information on default user preferences, see Saving Data Model Options as User Preferences.)Often times if I am trying to load controls for parameter screen I will have a seperate query and results section for that purpose. Then I use the Filter/Limit on the Results section to control the cascade feature you are trying to accomplish. In your case your results would contain the distinct list of Group Number and Account Number.
Wayne -
Legend needs to display Prompt values / Remove filters from chart query
Hi
I have 2 questions for the same chart so I hope it's OK to add them in one post.
Firstly I have created a chart & added three Select List filters which work fine, the query is below, problem is that when I change back to '-ALL-' I get no data, it has filtered out all records as no data matches the value of '-ALL-' does anyone know the code to get around this?
My chart query;
select null link, P_MONTH AS MONTH, SUM(CALLS) AS data
from DATA.MAIN_DATA
WHERE WAREHOUSE = :P1_WAREHOUSE
AND ANS_UNANS = :P1_ANS_UNANS
AND PRODUCT = :P1_PRODUCT
GROUP BY P_MONTH
As I will have several queries like the one above for different options on the same chart, I would like the Legend to show what the user has chosen each time the options are changed ie;
Something like the bolded text in the query to display the chosen values in the legend;
select null link, P_MONTH AS MONTH, SUM(CALLS) AS *'P1_WAREHOUSE' || 'P1_ANS_UNANS' || 'P1_PRODUCT'*
from DATA.MAIN_DATA
WHERE WAREHOUSE = :P1_WAREHOUSE
AND ANS_UNANS = :P1_ANS_UNANS
AND PRODUCT = :P1_PRODUCT
GROUP BY P_MONTH
Any ideas/suggests?Woof777 wrote:
Any ideas/suggests?Try the APEX forum ;) -
How to ignore a variable defined in a query when the query gets executed
Hi SAP guru, I am creating a query, which has a user input variable, say A, and a replacement path variable, say B, Bu2019s value is determined by A and the whole purpose of A is letting user entering an initial value and A must be ignored when the query gets executed. How can I achieve this in query designer?
ThanksHi, thanks for the reply. Actually this is not my problem. My problem is the query should be filtered by a variable, say B, but B is not allowed to be entered directly by user (i.e. B could be a replacement path variable or user exit type). So B has to be derived from another user input variable, say A. However if I defined A in the query, A is by default used as one of the filters, which is not desirable because A is a subset of B in my case and should be ignored.
Is there options (settings) that allow the query ignore a specified variable (A) ? If not is there other ways to get around this?
Thanks
MichScott -
Using RSRT to find the Query properties
Hi All,
Can anyone let me know to find out the Query properties using RSRT if we dont have access to BEX Analyser etc.,
The properties like:
<b>1.Variables built
2.Exceptions built
3.Conditions built
4.Cell definitions built
5.Types of Key figures built
6.Query properties like Scaling factors, Show negative values as etc.,</b>
As we have in RSRT for seeing List of Objects in Free Characteristics, Filters, Rows, Columns etc.,
Will be waiting for Answers on this.
Points will be rewarded for sure.Please go to RSRT --> select your query --> Selct query display as "HTML" and execute.
The next page you will the actual resule display on HTML page with all properties like Exception, Condition ,Properties, etc
Hope this helps...
Regards
Pankaj
Maybe you are looking for
-
Unable to replicate the Vendor Master Records
Hi I am using the transaction BBPGETVD to transfer the Vendor Master Records from R/3 ro SRM...but could not able to transfer it as I am getting an error "Organizational unit - does not exist; check entries", even through I have created Organisation
-
Cant download Mountain Lion, I get an error every time
I have a 2012 mac book pro 13 inch model and I cant get mountain lion to download, It keeps coming up with an error. What am i not doing right, its a brand new computer and I shouldnt be having this trouble. the operating system is 10.7.4 currently.
-
Nokia N8 "Video" Update: what does it consist of?
..as in subject..
-
I'd like to design MIDP GUI on netbeans. Is there any manual or Tip to develop MIDP GUI screen on netbeans? Thanks in advance.
-
Oracle Linux TNSLISTENER NL-00051 Error
I recently installed the Oracle8.0.5 Web download on a SuSe6.0 Linux machine. Database starts okay, can connect using SQL*PLUS on the server but get the error below when starting the listener oracle$ lsnrctl start LSNRCTL for Linux: Version 8.0.5.0.0