Query selection variable problem
Hi ,
We have a material "89-9712" . When running a query in the query designer (on portal) with material as selection variable we are having problems. When we enter "89-9712", we are getting an error "enter single values and not a range"...is the fact that there is a "-" in the material key causing the problem. What can we do?
Thanks,
Anita.
Hi,
Having a '-' while entering the material value shouldn't pose a problem in case the same fromat is adopted while storing the material , or does two no. i.e. 85-39876 , 85 refers to some " material grooup" or category , and the real material no is 39876 in that case it may pose a problem.
While making an entry make sre you are not putting any sapce other than '-' sice space is not permitted.
Hope this will be expedite.
Thax & Regards
Vaibhave Sharma
Edited by: Vaibhave Sharma on Sep 17, 2008 11:35 PM
Similar Messages
-
I have a ViewObject with bindvariable GroupnameItemname.
In JHeadstart AppDef this item is not bound to model, but included in Quick Search and Advanced Serach, as in "7.2.5. Using Query Bind Variables in Quick or Advanced Search"
First I get an error saying GroupnameItemname*Var* is not found on ViewObject, so I changed the bindvariables to GroupnameItemnameVar
Is something changed here? We are using JHeadstart 10.1.3.3.75 / JDeveloper 10.1.3.4.0
After changing the bindvariablename I have another problem:
I get an error in JhsApplicationModuleImpl.advancedSearch on these lines:
boolean isBindParam = !viewCriterium.isAttributeBased();
AttributeDef ad = isBindParam ? null : vo.findAttributeDef(attribute);
The first line returns false for my bindvariable, so the second line raises an error like "JBO-25058: Definition <attr> of type Attribute not found in <VO>".
In QueryCondition:
public boolean isAttributeBased()
return def!=null; //but def is not null here, it is an instance of DCVariableImpl
This used to work in previous versions of JHeadstart...
Please help,
Greetings HJHIn my MyApplicationModuleImpl (which extends JhsApplicationModuleImpl) I did override advancedSearch.
Copied the code from JhsApplicationModuleImpl and changed a few lines:
After
sLog.debug("executing advancedSearch for " + viewObjectUsage);
ViewObject vo = getViewObject(viewObjectUsage);
I added:
//clear bindParams:
String[] attrNames =
vo.getNamedWhereClauseParams().getAttributeNames();
for (int i = 0; i < attrNames.length; i++) {
vo.setNamedWhereClauseParam(attrNames\[i\], null);
sLog.debug("bindParam leeggemaakt: " + attrNames\[i\]);
And a bit later in the method I made a changed as follows:
// boolean isBindParam = !viewCriterium.isAttributeBased();
boolean isBindParam = viewCriterium.getName().endsWith("Var");
A bit crude, but worked for me...
Cheerio,
HJH
Edited by: HJHorst on Mar 19, 2009 1:56 PM (had to escape square brackets...) -
Hi All,
We have the data in the backend as follows.
Course Prim instru second instru No. of Responses
Java Course Instruc1 Instruct2 12
BW Course Instruc3 10
ABAP Course Instruc2 Instruc3 15
Portal Course Instruc2 20
we need to have a single selection variable for instructor and the result should be as follows.
Variable Screen:
Instructor = Instruc2
Result:
Course Prim instru No. of Responses
Java Course Instruc2 12
ABAP Course Instruc2 15
Portal Course Instruc2 20
Any ideas on how to achieve this?
Regards,
rk.Hi there,
It seems you're trying to achieve an "OR" in BEx queries, i.e., prime instructor OR second instructor as instructor2 (selected by the user as a variable input), is this right?
If so, you can use another characteristic like for example named combined_instructor and fill it in the transactional data like this:
Course Prim instru second instru combined_instructor No. of Responses
Java Course Instruc1 Instruct2 Instruc1_Instruct2 12
BW Course Instruc3 Instruc3 10
ABAP Course Instruc2 Instruc3 Instruc2_Instruc3 15
Portal Course Instruc2 Instruc2 20
So, combined_instructor is the concetanation of the Prime and second instructor.
So you can use a variable over combined_instructor, and if there is any
*Instruct2*
, you have all the options of Prime and second instructor with the Instruc2
Diogo. -
Query selection screen problem
Dear all,
We have turnover per companycode report in our portal. When the selection screen appear for the query I tried to press f4 help to get the list for Supplier. But this not getting displayed. Can you please let me know the reason why this happens ?
For all the remaining field selection i could get the list except the supplier field.
I also tried checking the master data and SID table for supplier. they have data in the table.
Please let me know the problem & from wher the data is retrieved when we process f4 help.
Thankyou!
BalaHello there,
There are settings at info object level and Query designer level. At info object level for the characteristic, go to the tab Business Explorer and check the settings for the Query filter value. Similarly check the settings for the characteristics which show values for f4 help.
Also there is a similar setting for the info object at query designer level with similar names in the properties pane of the characteristic.
Check them and set it accordingly.
Regards
Joga -
BEx Analyzer Query Selection Variable Screen Issue
We are in the process of applying support packs to our system--BI7.01 and we are going from SP04 to SP10. After the application of support packs, when we execute a query (or a workbook with attached query), the query variable screen that normally appears does not, the query just executes without being able to filter/enter selection criteria.
We are using BEx Analyzer 3.5--long story about not upgrading to BEx 7.x. In our systems without support packs, the queries/workbook execute as expected. I've tried making a variable mandatory in one of the queries as a test and the selection screen then appears; however, we have hundreds of queries.
I've searched SDN and OSS and have found some similar issues, but not a solution. Any help is greatly appreciated. Thanks.
NorrisHello Michael,
Thanks for the informationit's funny as I think I was stumbling upon this notegoing support pack by support pack--when you posted it.
We applied to our development system and we are now getting the selection screens, so it does appear to resolve the situation. Thanks again for the information.
Norris -
Changing selection variable of a workbook
Hi Gurus
I added a new query to a workbook of 7 queries.
For all those 7 queries selection variable is profit centre
But for the new query selection variable is profit centre and fiscal year period
How can make a unique selection variable for the work book and where can i chanHi,
You need to provide the same variable(profit centre) for the new query also, then it will be applicable to all the queries. And use the Fiscal year variable for new query it will be applicable only for the new query.
Hope this helps...
Rgs,
Ravikanth. -
Performance issues with query input variable selection in ODS
Hi everyone
We've upgraded from BW 3.0B to NW04s BI using SP12.
There is a problem encountered with input variable selection. This happens regardless of using BEx (new or old 3.x) or using RSRT. When using the F4 search help (or "Select from list" in BEx context) to list possible values, this takes forever for large ODS (containing millions of records).
Using ST01 and SM50 to trace the code in the same query, we see a difference here:
<u>NW04s BI SQL command</u>
SELECT
"P0000"."COMP_CODE" AS "0000000032" ,"T0000"."TXTMD" AS "0000000032_TXTMD"
FROM
( "/BI0/PCOMP_CODE" "P0000" ) LEFT OUTER JOIN "/BI0/TCOMP_CODE" "T0000" ON "P0000"."COMP_CODE" = "T0000
"."COMP_CODE"
WHERE
"P0000"."OBJVERS" = 'A' AND "P0000"."COMP_CODE" IN ( SELECT "O"."COMP_CODE" AS "KEY" FROM
"/BI0/APY_PP_C100" "O" )
ORDER BY
"P0000"."COMP_CODE" ASC#
<u>BW 3.0B SQL command:</u>
SELECT ROWNUM < 500 ....
In 3.0B, rownum is limited to 500 and this results in a speedy, though limited query. In the new NW04s BI, this renders the selection screen unusable as ABAP dumps for timing out will occur first due to the large data volume searched using sequential read.
It will not be feasible to create indexes for every single query selection parameter (issues with oerformance when loading, space required etc.). Is there a reason why SAP seems have fallen back on a less effective code for this?
I have tried to change the number of selected rows to <500 in BEx settings but one must reach a responsive screen in order to get to that setting and it is not always possible or saved for the next run.
Anyone with similar experience or can provide help on this?here is a reason why the F4 help on ODS was faster in BW 3.x.
In BW 3.x the ODS did not support the read mode "Only values in
InfoProvider". So If I compare the different SQL statements I propose
to change the F4 mode in the InfoProvider specific properties to
"About master data". This is the fastest F4 mode.
As an alternative you can define indexes on your ODS to speed up F4.
So would need a non-unique index on InfoObject 0COMP_CODE in your ODS
Check below for insights
https://forums.sdn.sap.com/click.jspa?searchID=6224682&messageID=2841493
Hope it Helps
Chetan
@CP.. -
Error executing a query (validity interval problem in variable)
Hi all,
I have an issue in a query.
While executing the query i am getting following error
"THE VALIDITY INTERVAL HAS THE INITIAL VALUE AS LOWER LIMIT"
There are two CALMONTH variables that are being used in the query and are also used as selection variables
1) interval characteristic mandatory variable
2) single value characteristic mandatory variable
Please suggest me what might be the problem.
Any suggestions are welcome.
Thanks
MuditHello,
I tried debugging my query in RSRT and i have found a possible reason for that.
My query was built on a multiprovider in which data was not loaded in one of the cube.Since no request was loaded in the infocube initial fields of all time characteristics were empty which was the reason for the error.
Thanks once again for your valuable inputs.
Mudit -
How can i use index in select query.. facing problem with the select query.
Hi Friends,
I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
Here is the query:
SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
FROM ztftelat LEFT JOIN ztfzberep
ON ztfzberep~gjahr = st_input-gjahr
AND ztfzberep~poper = st_input-poper
AND ztfzberepcntr = ztftelatrprctr
WHERE rldnr = c_telstra_accounting
AND rrcty = c_actual
AND rvers = c_ver_001
AND rbukrs = st_input-bukrs
AND racct = st_input-saknr
AND ryear = st_input-gjahr
And rzzlstar in r_lstar
AND rpmax = c_max_period.
There are 5 indices present for Table ZTFTELAT.
Indices of ZTFTELAT:
Name Description
0 Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)
005 Profit (RCLNT,RPRCTR)
1 Ledger, company code, account (RLDNR,RBUKRS, RACCT)
2 Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)
3 Account, cost center (RACCT,RCNTR)
4 RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR
Z01 Activity Type, Account (RZZLSTAR,RACCT)
Z02 RYEAR-RBUKRS- RZZZBER-RLDNR
Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
Thanks in advance.Hi Shiva,
I am using two more select queries with the same manner ....
here are the other two select query :
***************1************************
SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
FROM ztftelpt LEFT JOIN ztfzberep
ON ztfzberep~gjahr = st_input-gjahr
AND ztfzberep~poper = st_input-poper
AND ztfzberepcntr = ztftelptrprctr
WHERE rldnr = c_telstra_projects
AND rrcty = c_actual
AND rvers = c_ver_001
AND rbukrs = st_input-bukrs
AND racct = st_input-saknr
AND ryear = st_input-gjahr
and rzzlstar in r_lstar
AND rpmax = c_max_period.
and the second one is
*************************2************************
SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
FROM ztftelnt LEFT JOIN ztfzberep
ON ztfzberep~gjahr = st_input-gjahr
AND ztfzberep~poper = st_input-poper
AND ztfzberepcntr = ztftelntrprctr
WHERE rldnr = c_telstra_networks
AND rrcty = c_actual
AND rvers = c_ver_001
AND rbukrs = st_input-bukrs
AND racct = st_input-saknr
AND ryear = st_input-gjahr
and rzzlstar in r_lstar
AND rpmax = c_max_period.
for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables. if i will not use it will delete all the data fetched earlier.
Thanks on advanced......
Sourabh -
InfoSet Query - Long Description while selecting variable values
Dear Experts,
We have an InfoSet Query on different InfoObjects like 0CUSTOMER, 0CUST_COMPC etc and the common link between these InfoObjects is CUSTOMER.
We have a variable created on this CUSTOMER. The requirement is that when this query is executed, user should be able to select a value of Customer (F4 help) and at that time, he should be able to view both Key and Long Text of Customer.
We know that if we change the CUSTOMER InfoObject --> BEx Properties tab, then we can display Long Text and Key in Query Selection Screens. However we can not do that because it would affect all queries in which this InfoObject is used.
If we go to Query Design, and choose "Long Text and Key" in properties of Customer, then system displays Long Text and Key of Customer but after the report execution is done.
We want to display the Long Text of Customer to User at the time of selection and that too without making any InfoObject level change.
If it was InfoProvider, we could have done it using "Provider specific properties of Characteristic" option. But this is InfoSet and that option does not appear here.
Please suggest the solution.
Regards
PRohit,
Are you looking to display long text for infoobject instead of short description ?
Then go tp rsd1>infoobject>display/change-->master data/texts -->text table properties -->check long text exists.
It supports a long text field with a length of 60 characters
Activate the infoobject
--Doodle
Message was edited by: Doodle -
While Executing Query with out giving any inputs to selection variables
Hi,
While Executing Query in the Query Designer with out giving any inputs to selection variables. I got an error message in german Language this is translating of german to English .
In the reading of the data, mistakes appeared. Navigation the value is contains possible "New Delhi" of feature 0CITY40 at that
10. ten place a mistake Notification Number BRAIN 290
This is very urgent can you please help me .
Thanks & regards
Subba Reddy.Double click this error message it will give you more details. Post that.
-
Can we use 2 Conditions as Selection Variables in a Query?
Hi Gurus,
According to the requirement in our report , we need to have selection variables on 2 Key figures Target Quantity and Consumption.
So ,we have used Conditions to have Variables in the Selection screen.
The Conditions (the Selection screen variables) are not working properly.
Can you please give some pointers on the Conditions to be used in the reports.
Thanks,
SravaniI did not understand whats the issue is...., is it with the condition? or the variable.
If with the Condition please provide some more details about the condition.
If it is a variable, as the other person said, how did you create the variable on the Keyfigure? because as per i know we cannot create any variable for the Keyfigure, but if is possible please let me know, and i can dig in to that, and let you know how to fix the issue.
Regards,
Ram
Edited by: Ram Pawan on Aug 14, 2008 4:06 PM -
Please help. Thank you for your time and expertise.
Prerequisites: sql query needs to be a view. Real view is more than recursion. It computes location path, is used in JOINs and returns this path.
Problem: no matter what I tried, sql server does not produce 'index seek' when using variable but does with literal.
See full reproduction code below.
I expect that query SELECT lcCode FROM dbo.vwLocationCodes l WHERE l.lcID = @lcID will seek UNIQUE index but it does not.
I tried these:
1. Changing UX and/or PK to be CLUSTERED.
2. query OPTION(RECOMPILE)
3. FORCESEEK on view
4. SQL Server 2012/2014
5. Wrap it into function and CROSS APPLY. On large outer number of rows this just dies, no solution
but to no avail. This smells like a bug in SQL Server. I am seeking your confirmation.
I am thinking it is a bug as variable value is high-cardinality, 1, and query is against unique key. This must produce single seek, depending if clustered or nonclustred index is unique
Thanks
Vladimir
use tempdb
BEGIN TRAN
-- setup definition
CREATE TABLE dbo.LocationHierarchy(
lcID int NOT NULL ,
lcHID hierarchyid NOT NULL,
lcCode nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
lcHIDParent AS lcHID.GetAncestor(1) PERSISTED,
CONSTRAINT PK_LocationHierarchy_lcID PRIMARY KEY NONCLUSTERED (lcID ASC),
CONSTRAINT UX_LocationHierarchy_pltID_lcHID UNIQUE CLUSTERED (lcHID ASC)
-- add some data
INSERT INTO dbo.LocationHierarchy
VALUES
(1, '/', 'A')
,(2, '/1/', 'B')
,(3, '/1/1/', 'C')
,(4, '/1/1/1/', 'D')
--DROP VIEW dbo.vwLocationCodes
GO
CREATE VIEW dbo.vwLocationCodes
AS
WITH ru AS
SELECT
lh.lcID
,lh.lcCode
,lh.lcHID
,CAST('/' + lh.lcCode + '/' as varchar(8000)) as LocationPath
-- to support recursion
,lh.lcHIDParent
FROM dbo.LocationHierarchy lh
UNION ALL
SELECT
ru.lcID
,ru.lcCode
,ru.lcHID
,CAST('/' + lh.lcCode + ru.LocationPath as varchar(8000)) as LocationPath
,lh.lcHIDParent
FROM dbo.LocationHierarchy lh
JOIN ru ON ru.lcHIDParent = lh.lcHID
SELECT
lh.lcID
,lh.lcCode
,lh.LocationPath
,lh.lcHID
FROM ru lh
WHERE lh.lcHIDParent IS NULL
GO
-- get data via view
SELECT
CONCAT(SPACE(l.lcHID.GetLevel() * 4), lcCode) as LocationIndented
FROM dbo.vwLocationCodes l
ORDER BY lcHID
GO
SET SHOWPLAN_XML ON
GO
DECLARE @lcID int = 2
-- I believe this produces bad plan and is defect in SQL Server optimizer.
-- variable value cardinality is 1 and SQL Server should know that. Optiomal plan is to do index seek with key lookup.
-- This does not happen.
SELECT lcCode FROM dbo.vwLocationCodes l WHERE l.lcID = @lcID -- bad plan
-- this is a plan I expect.
SELECT lcCode FROM dbo.vwLocationCodes l WHERE l.lcID = 2 -- good plan
-- I reviewed these but I need a view here, can't be SP
-- http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/17/non-recursive-common-table-expressions-performance-sucks-1-cte-self-join-cte-sub-query-inline-expansion.aspx
-- http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22d2d580-0ff8-4a9b-b0d0-e6a8345062df/issue-with-select-using-a-recursive-cte-and-parameterizing-the-query?forum=transactsql
GO
SET SHOWPLAN_XML OFF
GO
ROLLBACK
Vladimir MoldovanenkoHere is more... note that I am creating table Items and these can be in Locations.
I am trying LEFT JOIN and OUTER APLLY to 'bend' query into NESTED LOOP and SEEK. There has to be nested loop, 2 rows against 4. But SQL Server fails to generate optimal plan with SEEK. Even RECOMPILE does not help
use tempdb
BEGIN TRAN
-- setup definition
CREATE TABLE dbo.LocationHierarchy(
lcID int NOT NULL ,
lcHID hierarchyid NOT NULL,
lcCode nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
lcHIDParent AS lcHID.GetAncestor(1) PERSISTED,
CONSTRAINT PK_LocationHierarchy_lcID PRIMARY KEY NONCLUSTERED (lcID ASC),
CONSTRAINT UX_LocationHierarchy_pltID_lcHID UNIQUE CLUSTERED (lcHID ASC)
-- add some data
INSERT INTO dbo.LocationHierarchy
VALUES
(1, '/', 'A')
,(2, '/1/', 'B')
,(3, '/1/1/', 'C')
,(4, '/1/1/1/', 'D')
--DROP VIEW dbo.vwLocationCodes
GO
--DECLARE @Count int = 10;
--WITH L0 AS (SELECT N FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1)) N (N))-- 10 rows
--,L1 AS (SELECT n1.N FROM L0 n1 CROSS JOIN L0 n2) -- 100 rows
--,L2 AS (SELECT n1.N FROM L1 n1 CROSS JOIN L1 n2) -- 10,000 rows
--,L3 AS (SELECT n1.N FROM L2 n1 CROSS JOIN L2 n2) -- 100,000,000 rows
--,x AS
-- SELECT TOP (ISNULL(@Count, 0))
-- ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) as Number
-- FROM L3 n1
--SELECT Number as itmID, NTILE(4)OVER(ORDER BY Number) as lcID
--INTO dbo.Items
--FROM x
----ORDER BY n1.N
--ALTER TABLE dbo.Items ALTER COLUMN itmID INT NOT NULL
--ALTER TABLE dbo.Items ADD CONSTRAINT PK PRIMARY KEY CLUSTERED (itmID)
CREATE TABLE dbo.Items (itmID int NOT NULL PRIMARY KEY, lcID int NOT NULL)
INSERT INTO dbo.items
VALUES(1, 1)
,(2, 3)
GO
CREATE VIEW dbo.vwLocationCodes
AS
WITH ru AS
SELECT
lh.lcID
,lh.lcCode
,lh.lcHID
,CAST('/' + lh.lcCode + '/' as varchar(8000)) as LocationPath
-- to support recursion
,lh.lcHIDParent
FROM dbo.LocationHierarchy lh
UNION ALL
SELECT
ru.lcID
,ru.lcCode
,ru.lcHID
,CAST('/' + lh.lcCode + ru.LocationPath as varchar(8000)) as LocationPath
,lh.lcHIDParent
FROM dbo.LocationHierarchy lh
JOIN ru ON ru.lcHIDParent = lh.lcHID
SELECT
lh.lcID
,lh.lcCode
,lh.LocationPath
,lh.lcHID
FROM ru lh
WHERE lh.lcHIDParent IS NULL
GO
-- get data via view
SELECT
CONCAT(SPACE(l.lcHID.GetLevel() * 4), lcCode) as LocationIndented
FROM dbo.vwLocationCodes l
ORDER BY lcHID
GO
--SET SHOWPLAN_XML ON
GO
DECLARE @lcID int = 2
-- I believe this produces bad plan and is defect in SQL Server optimizer.
-- variable value cardinality is 1 and SQL Server should know that. Optiomal plan is to do index seek with key lookup.
-- This does not happen.
SELECT lcCode FROM dbo.vwLocationCodes l WHERE l.lcID = @lcID-- OPTION(RECOMPILE) -- bad plan
-- this is a plan I expect.
SELECT lcCode FROM dbo.vwLocationCodes l WHERE l.lcID = 2 -- good plan
SELECT *
FROM dbo.Items itm
LEFT JOIN dbo.vwLocationCodes l ON l.lcID = itm.lcID
OPTION(RECOMPILE)
SELECT *
FROM dbo.Items itm
OUTER APPLY
SELECT *
FROM dbo.vwLocationCodes l
WHERE l.lcID = itm.lcID
) l
-- I reviewed these but I need a view here, can't be SP
-- http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/17/non-recursive-common-table-expressions-performance-sucks-1-cte-self-join-cte-sub-query-inline-expansion.aspx
-- http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22d2d580-0ff8-4a9b-b0d0-e6a8345062df/issue-with-select-using-a-recursive-cte-and-parameterizing-the-query?forum=transactsql
GO
--SET SHOWPLAN_XML OFF
GO
ROLLBACK
Vladimir Moldovanenko -
Script logic - how to use a selection variable within an allocation logic
Hi,
I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
If we hard code the members it works fine:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
So if we start with write the following logic, it does not work anymore:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
regards
Dries
solved it ...
Edited by: Dries Paesmans on Feb 22, 2009 8:31 PMHi Dries,
Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
*DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
Regards,
Tim -
How to Create a Selection Variable for restricting the querry output
Hi Gurus,
I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
I hope this explains my problem but if any questions please let me know so that i can give u specific information.
Thanks,
Nisha.Hi Nisha,
Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
See here for more details:
http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
Hope this helps...
Maybe you are looking for
-
Hello All, Can Any body explain what went wrong with my code, which i have given below. if i enter material no and plant in input i am able to get the corect out put. But i f enter only plant no (eg1000) i am not getting all the correct details. Simi
-
I have written a class that is called from PL/SQL and tries to initiate a new connection back to the same Oracle database. I keep getting the error 'No Suitable Driver' eventhough I can run the method from DOS. I think the problem is with the classpa
-
Report RMMD07EX Error when running in background
Hi Gurus, Is it possible to run the above report in background? I tried running it and gave me the error 'Error determining planning periods for calendar'. Please help. Thanks in Advance....
-
I'm finishing up these two classes for a homework assignment. It's supposed to display a template message and let you fill in some things. The code works PERFECTLY except I get a weird error message at the end. I don't need anyone to finish my homewo
-
Can you send an email confirmation to multiple people?