Question:
Hi,
In Product costing infocube:
- I have 100 Materials which have Cost center = "Some value" & "Blank"
(i.e. total 200 rows for 100 materials. 100 with cost center = "some value" and 100 with cost center = "Blank")
&
- I have 10 materials which have Cost center = "BLANK" only.
How Do I make a query to output only the 10 materials where the Cost center = "Blank" only.
Thanks for help.
Answer:
restrict the material to show only blank..i.e make it equal to..it will exclude anything else.
so no need for a pre query or a jump taget going by your posting
Answer:
Thanks!
But it does not help. It gets all 110 materials with cost center = "BLANK".
Answer:
Thanks!
But it does not help. It gets all 110 materials with cost center = "BLANK".
Then there is some other constraint or something in the InfoCube design we do not know about. Provide more detail on how this is structured and how you are going about doing your restriction.
- Stephen
_________________
As a rule I don't answer Questions in PM.
(this is not to be a d**k, but it is to allow everyone to benefit from information. Not just one person.) Ask a question in the forum and I will answer it if I can.
Answer:
Also, an InfoCube contains transactions, normally with a time dimension. As such if you are at one time those 10 materials did not have a cost center you would still get them, if you also did not restrict to a time period when cost center was applied to those materials.
- Stephen
_________________
As a rule I don't answer Questions in PM.
(this is not to be a d**k, but it is to allow everyone to benefit from information. Not just one person.) Ask a question in the forum and I will answer it if I can.
Answer:
You need to write 2 queries here. First write a Query with Cost center ne #. In this query, you get all the Materials which has cost center associated.
Then Define a varibale with Replacement Path. Now write a query with Cost center = # and for Material Use the variable defined above with Exclude option. You need to link this Replacement Path variable to the first query result.
When you execute the second query, the system will run the first query(users will not see this) as it needs to get the values from first query.
Hope I' clear
_________________
__________________
Trinadha
Back again
Answer:
Hi Trinadha:
I tried exactly what you are saying before posting this. but "EXCLUDE" OPTION for the Variable is "Grayed out".(i.e. I can not select "EXCLUDE" option). I am in 2.0.
Here are the steps what I have done before.
- Created a variable "ZPQTMATN" using "RSZV" with replacement Path and a "PREQUERY = PQ100".
- PREQUERY(PQ100) gets all the materials where COSTCENTER NE #
- Now in the Main QUERY, I was using the Variable "ZPQTMATN" for material.
My Problem: I am not able get "EXCLUDE" option on the variable.
(i.e.)
- right click on material and select restrict,
- click on "Variable" tab
- select the variable "ZPQTMATN"(PREQUERY VARIABLE) and drag it to the right
- After this, when I right click on "ZPQTMATN" the "EXCLUDE" option is Grayed out and I am not able to select it.
-Am I doing something wrong?
- How Do I exclude the prequery output?
FYI: I am on BW 2.0
Thanks.
Answer:
Hi
Iam having the same issues. I can not exclude the prequery result set from a susequent query.
Any ideas will be greatly accepted .
Answer:
It is correct replacement path variable forbid exclude. The reasonis bechasue SAP is puting the result of the prequery into an internal table which it joins to the results of the second query. This design does not allow for excludes.
The only idea I have is to increase pressure on SAP to finally allow for the very simple SQL basics
Other than that you might try a work around with formula variables and conditions.
Bye
MG