Attribute unit in query
Hi gurus,
In my query, i have used the keyfigure attribute. on the attribute i have created the formula variable.
moving price is the attribute with unit USD
price unit is the other attribute with unit LB
i have created two formula variable with replacement path, and i have used in the calculated key figure for calculating the moving average price
moving average price = moving price / price unit.
in the query it is giving only number. but i want units also.
how can i get the units.
can any one help on this.
thanks in advance.
Hi timur,
can you explain clearly. how to check in the keyfigure's tab.
thanks
Similar Messages
-
How to display attributes in the query
Hi frnds,
I want to show the attributes of material ( mat group , mat type ), vendor ( Sort field ) in the report.
We loaded master data for material and vendor.
I dragged the char and the relevant attributes in the query designer and executed the query. But in the output the attributes values are not displayed.
What could the reason ?
Regards,
V N.Hi all,
Thanks for the reply.
"Display attributes will also get displayed if you include the infoobject for which they are attributes."
Suppose for 0vendor the attr is 0sortl. By defualt it is display attr. I dragged in the query the 0vendor and its attr 0sortl and executed. It didnot displayed any values for this 0sortl
I changed it to Nav Attr. And rerun the query, it is displaying values.
In the first case i included Display attr and the infoobject for which it is attr in the query. Please explain me why it didnot displayed the values.
And after changing it to Nav attr it displayed the values.
Please explain me what happened actually.
Regards,
V N. -
XML attributes makes my query return no rows
Hello everyone,
I've an odd problem.
I'm querying some XML, but the attributes in one of the tags make my query return no rows; if I remove the attributes, then the query works as expected.
The XML is below; it's the attributes in the Report tag that cause the issues:
<result errorCode="0">
<return>
<Report
xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&rs%3AFormat=xml&rc%3ASchema=True"
Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="Items_x0020_status_x0020_information">
<Tablix1>
<Details_Collection>
<Details ItemId="914P7" Username="test" user_role="IT"
first_name="Barry" last_name="Donovan" organisation=""
content_format="On_Screen" modified_date="26/05/2011 13:16:49"
item_status="Draft" status_date="" component_name="" demand="" />
</Details_Collection>
</Tablix1>
</Report>
</return>
</result>My query is:
select
a.item_id
,a.username
,a.user_role
,a.first_name
,a.last_name
,a.supplier_id
,a.format
,a.modified_date
,a.item_status
,a.completion_date
,a.component_code
from dual
,xmltable
('/result/return/Report/Tablix1/Details_Collection/Details'
passing p_xml
columns
item_id varchar2(1000) path '@ItemId'
,username varchar2(1000) path '@Username'
,user_role varchar2(1000) path '@user_role'
,first_name varchar2(1000) path '@first_name'
,last_name varchar2(1000) path '@last_name'
,supplier_id varchar2(1000) path '@organisation'
,format varchar2(1000) path '@content_format'
,modified_date varchar2(1000) path '@modified_date'
,item_status varchar2(1000) path '@item_status'
,completion_date varchar2(1000) path '@status_date'
,component_code varchar2(1000) path '@demand'
) a;I've tried stripping out the attributes in the tag, which does work, but some of the XML I'm expecting back may be quite large (many records), so that caused issues in itself. I'd rather deal with it and not mess with the XML itself if possible.
Any help would be hugely appreciated!
Thank you very much in advance.
Robin
Edited by: User_resU on Apr 12, 2012 2:50 PMExample:
SQL> ed
Wrote file afiedt.buf
1 with t as (select xmltype('<result errorCode="0">
2 <return>
3 <Report
4 xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&rs%3AFormat=xml&rc%3ASchema=True"
5 Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xmlns="Items_x0020_status_x0020_information">
7 <Tablix1>
8 <Details_Collection>
9 <Details ItemId="914P7" Username="test" user_role="IT"
10 first_name="Barry" last_name="Donovan" organisation=""
11 content_format="On_Screen" modified_date="26/05/2011 13:16:49"
12 item_status="Draft" status_date="" component_name="" demand="" />
13 </Details_Collection>
14 </Tablix1>
15 </Report>
16 </return>
17 </result>') as xml from dual)
18 --
19 -- end of test data
20 --
21 select
22 a.item_id
23 ,a.username
24 ,a.user_role
25 ,a.first_name
26 ,a.last_name
27 ,a.supplier_id
28 ,a.format
29 ,a.modified_date
30 ,a.item_status
31 ,a.completion_date
32 ,a.component_code
33 from t
34 ,xmltable
35 (xmlnamespaces('Items_x0020_status_x0020_information' as "x0"),
36 '//x0:Report/x0:Tablix1/x0:Details_Collection/x0:Details'
37 passing xml
38 columns
39 item_id varchar2(1000) path '@ItemId'
40 ,username varchar2(1000) path '@Username'
41 ,user_role varchar2(1000) path '@user_role'
42 ,first_name varchar2(1000) path '@first_name'
43 ,last_name varchar2(1000) path '@last_name'
44 ,supplier_id varchar2(1000) path '@organisation'
45 ,format varchar2(1000) path '@content_format'
46 ,modified_date varchar2(1000) path '@modified_date'
47 ,item_status varchar2(1000) path '@item_status'
48 ,completion_date varchar2(1000) path '@status_date'
49 ,component_code varchar2(1000) path '@demand'
50* ) a
SQL> /
ITEM_ID
USERNAME
USER_ROLE
FIRST_NAME
LAST_NAME
SUPPLIER_ID
FORMAT
MODIFIED_DATE
ITEM_STATUS
COMPLETION_DATE
COMPONENT_CODE
914P7
test
IT
Barry
Donovan
On_Screen
26/05/2011 13:16:49
Draft -
Marketing Attributes - Unit of Measure
In the creation of marketing attributes, how can we provide "two" input fields with two different units of measure for ONE Marketing Attribute, so that if a user inputs a value for the attribute, in one unit of measure, the value for the second input field, which is a different unit of measure for the same attribute is automatically calculated
Example.
Marketing Attribute: Shoe Size
Shoe Size Value Field (U of M): Inches
Shoe Size Value Field (U of M): Centimeters
If the user maintains a value for the attrbute in the Inches Field, it should automatically convert to Centimeters and Vice Versa.
Thanks!!!This can be achieved through config.
When creating a marketing attribute, create an attribute called Unit of Measure. Then assign the "check table" for the correct value tables and it will provide you with the options for unit of measure.
Example:
First Attribute: Shoe Size
Second Attribute: Unit of Measure in CM or Inches
FK -
Select the same attribute in a query more than once
Hi Experts,
My requirement is to select the same attribute in a query more than once.
How can I acheive this?
Expecting an early solution..
PilligaHi,
Create a calculated attribute that just displays the "same attribute".
(Note: you will need to uniquely name this object).
For example, if you wish to display Emp Name twice in the same query, then create a calculated attribute called Emp Name2 and select it and Emp Name in your query and the same info will be displayed twice in your results set.
Cheers,
Tanish -
hi
Using JDeveloper 10.1.3.3.0, I have this "Selected in Query" attribute, "Never" updatable, in my Entity Object.
The Entity Object is based on the SCOTT.EMP table and the attribute, called "BonusInfo", is defined using the expression " '[bonus info ' || (SAL * 2) || ']' ".
see http://verveja.footsteps.be/~verveja/files/oracle/NoColumnTypeFoundApp-v0.01.zip
While creating this Entity Object, I got a "Business Components" dialog that says:
"Column type is not specified for this attribute. Specifying column-type and precision results in better query performance at runtime. Do you wish to set column type to VARCHAR2(255)?"
I clicked "Yes".
I also created two View Objects based on this Entity Object.
In the "Create View Object" wizard "Step 4 of 7: Attribute Settings" I got a "Business Components" diaglog that says:
"Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
I clicked "Yes".
Testing the query in "Step 5 of 7: SQL Statement" showed "Query is valid.".
question:
Why do I keep getting the message ...
"Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
... in the View Object Editor if I click on different attributes?
(I don't get such a message the first time I click on an attribute after opening the View Object Editor, but after that it keeps popping up each time I click on a different attribute, no matter what I answer "Yes", "No" or "Cancel".)
many thanks
Jan VerveckenJan,
BC needs the column type and precision so that we can allocate the correct JDBC buffer size; otherwise we would just allocate 2k per string.
Blaise -
Attributes selected in query with no column type found! (solved)
Dear JHeadstart Team,
In the view object Editor I have two entity based attributes attrib1 and attrib2
both with type Number. Both have aliases with type number(9,0)
If attrib1 is null I want to have the value of attrib2.
In the expression box I put: nvl(attrib1,attrib2)
When I press the ok button I get the next error message.
"Attributes selected in query with no column type found!
Specifying column-type and precision results in better query performance at runtime.
Do you wish to set default column type for these attributes? "
When I say ok I get the next message:
"An error occurred. Unable to apply all the wizard changes.
Column type cannot be changed for Entity based attribute.
Exception: oracle.jbo.dt.objects.JboExeption."
The details button serves no extra information.
Since both the attributes have the same type I thought the nvl commando should work.
But what does the "no column type found" sentence mean?
regards,
Marcel.
Message was edited by:
user571204Thanks Jan,
You've put me on the right track.
I found out that this is only possible in the entity object class.
So I have to check my limited java skills. -
Hallo Experts,
We encounter a problem with unit in our Query.
Szenario:
We use the Unit like PC, SET in Query.
In Table T006 those Units have value 0 in the field ANDEC, so they will be rounded up and rounded down in Query.
Our Problem is some Queries need the rounding up and down but others don't need this function.
Where and how should we change to solve the problem.
thanks & Best regardshi,
if you want to control the rounding off while unit conversion you can do it from SPRO
In the BW system, goto SPRO -> SAP NetWeaver -> General Settings -> Check Units of Measurement -> Units of Measurement -> Choose the unit corresponding to 'KM' -> Click on 'Details' button in the toolbar.
Look the field 'Decimal Pl rounding'. Change this to 3 or whatever value you choose and see if it works.
in above link i have taken example of KM, you need need to select the required unit.
let us know if this is solves your problem. I am not sure if this can be done for individual queries but this is controlled by UOM wise as mentioned above.
Regards,
Rk. -
How to get these Attribute class in Query Statement ?
Hi All,
I have 2 SCCM primary site, the first one is a migrated site from SCCM 2007 to SCCM 2012 SP1 & then upgraded to SCCM 2012 R2, the second one is a newly created SCCM 2012 R2 site.
I was trying to create a collection membership rule using the query statement on the second site & i found there are attribute classes which were missing on this site.
Under query rule /edit query rule in the criteria tab i am trying to define a new criteria with Criteria type : Simple value & then i click the select under "Where" for chossing the attribute class & a value called "Winlogon64"
don't exists there. There are other classes which are missing too.
then i go to my first site & i can see the classes there, collection query rule are also defined using the attribute classes.
Now my questions are :-
1. Does these settings gets migrated from SCCM 2007 to SCCM 2012 on the first site?
2. How can we get this in SCCM 2012 R2 on the second site?
Experts please help.
Thanks,
Pranay.It sounds a lot like you where using an extension on your hardware inventory. Changes to your hardware inventory are not migrated, so you would need to recreate that change in the hardware inventory.
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
Navigational attribute issue in query
Hi gurus,
Here is a very tricky issue that I am facing. If anyone could please help me with a workaround for the same.
I have an infoObject called ZDIV_CUS which is basically 0CUSTOMER with 0DIVISION compounded to it. Hence, when I load data into ZDIV_CUS, I would have one record for a unique combination of customer and division. In functional words, I would have one customer maintained for multiple divisions. ZDIV_CUS also has other navigational attributes as 0SALES_OFF, 0SALES_DIST & 0SALES_GRP. Also, I have 0MATERIAL, which has 0DIVISION as a navigational attribute in my cube.
Hence the master data for ZDIV_CUS looks as follows -
0DIVISION 0CUSTOMER 0SALES_OFF 0SALES_GRP 0SALES_DIST
01 100000 L001 L01 L010100
02 100000 L005 L08 L020150
01 100001 L001 L01 L050150
03 100001 L005 L02 L052542
The transactional data in my cube is as follows -
0MATERIAL 0CUSTOMER 0DIVISION 0SALES_OFF 0NET_SALES 0MATERIAL_DIVISION (Material master div)
102152 100000 01 L002 110000 02
102545 100001 02 L002 12000000 02
The above data is all transactional except for 0MATERIAL_DIVISION which comes from material division.
My query is built in such a way that the division comes from 0MATERIAL (restricted to variable in the selection screen). ZDIV_CUS and its navigational attributes are being used in my query. The initial display is shown as per ZDIV_CUS_0SALES_OFF (i.e. sales office from ZDIV_CUS)
The problem is that say for eg for the above mentioned scenario, the user executes the query for division 01 and the below mentioned output comes up -
0MATERIAL_DIVISION ZDIV_CUS 0MATERIAL ZDIV_CUS_0SALES_OFF 0NET_SALES
02 100000 102152 L001 110000
If we take a closer look, we would know that ZDIV_CUS_0SALES_OFF should pick up value L005 and not L001 since the division for which the query is run is 0MATERIAL_DIVISION and not 0DIVISION.
Request help to resolve the abovementioned issue.
Thank you,
SreeCan any one answer for Issue-2. Even I am also facing the same.
Thanks in Advance. -
Don't display attribute in a query
Hi!
I have an InfoObject with attribute.
When I execute query on InfoCube instead of attribute display '#'.
but there are filled fields for attribute in InfoCube.
What can I do?Hi,
Activate you master data, by executing the Atribute change run. RSA1.
http://help.sap.com/saphelp_bw30b/helpdata/en/80/1a67ece07211d2acb80000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/b4/730276938a504cacc56b44fd3578e3/frameset.htm.
Hope this helps,
With Regards,
PCR -
Using attributes in a Query, doesnu00B4t work!
I have implemented an infocube 0SD_C03, and i have my material attributes filled in the 0MATERIAL characteristic, but when i use them in the query, the don't appear.
Can somebody help me?
Thank YouHi Dirk,
I'have done everything ok, create the new objects, for our material classifications, create the transfer rules, update roles, infosources, adding the 0material characteristics, put the new attributes as navigational, and filled all with the data necessary, but i have now idea that the master data have to be activated just in the end!!!!
thanks a lot, i have my problem solved!!!! -
Using dimension attributes in the Query Builder Bean
All...
I am developing an HTML client based tool using the JSP tags. I wish to create a report that selects the appropriate dimension value based upon an attribute.
But...
Using the query builder I can not select dimension values based upon dimension attributes. Is this possible? The only use I have found for the attributes is when I am sorting my selected diemsnion values.
Thanks in advance
Dylan.1. Java Client QueryBuilder has support for selecting dimension members based on an attribute.
To use this functionality, go to Dimensional Panel -> Conditions tab. Drill on Match group of conditions. The attribute condition appears as the last available condition, but only for dimensions that have attributes.
To test this, use BIBDEMO schema supplied with BI Beans and look at conditions for Product dimension.
2. If you wish to display dimension attributes and their values in the HTML client UI,
here is how you can retrieve attributes and their values for a dimension:
(e.g. for Product dimension in BIBDEMO)
String dimensionID = "MDM!D_BIBDEMO.PRODUCT";
String hierarchyID = null;
MDDimension dimension = metadataManager.getDimensionByUniqueID(dimensionID);
MDHierarchy hierarchy = dimension.getDefaultHierarchy();
if (hierarchy != null)
hierarchyID = hierarchy.getUniqueID();
// Retrieve all the attributes for this dimension
MDAttribute[] attributes = dimension.getAttributes();
if (attributes != null && attributes.length > 0)
String attributeID = null;
AttributeListStep attrStep = null;
Selection sel = null;
MetadataMap map = new MetadataMap(new String[] {MetadataMap.METADATA_VALUE});
for (int i=0; i<attributes.length; i++)
// Get the unique ID for the attribute
attributeID = attributes.getUniqueID();
// Create and evaluate an AttributeListStep
attrStep = new AttributeListStep(dimensionID, hierarchyID, attributeID);
sel = new Selection(dimensionID);
sel.setHierarchy(hierarchyID);
sel.addStep(attrStep);
// Evaluate the AttributeListStep and get the DataAccess
DataAccess da = query.createQueryAccess().getDataAccess(sel, map);
// Walk the DataAccess and get the attribute values
if (da != null)
int extent = da.getEdgeExtent(DataDirector.COLUMN_EDGE);
for (int i=0; i<extent; i++)
// Get the attribute value
strValue = (String)da.getMemberMetadata(DataDirector.COLUMN_EDGE, 0, i, MetadataMap.METDATA_VALUE);
// Add the value to a drop down or another UI element... -
Some users can't see attributes in the Query Builder
Hi.
I have problem. Some users can't see some of attributes of info-object in the Query Designer. Where is the problem?I think you would need to give more details on the problem,
as <b>some</b> users are not able to see <b>some</b> attributes.
Do they all share the same profile, what is the distinguishing thing among the some users who can see the attributes and the ones who cannot see the attributes.
Need to drill down further I guess.
Cheers
Anurag -
Changing visual attribute in Enter Query mode
Hello, I want to change visual attribute of all items in the first record when the user presses button for Enter_Query. I want that the user sees that the form is in enter query mode and it "waits" for the input of criteria. My code (copied from Help and modified) in trigger WHEN_BUTTON_PRESSED:
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80);
BEGIN
ENTER_QUERY;
cur_block := :System.Cursor_Block;
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'yellow');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
where yellow is the name of my visual attribute.
The problem is that I need to press the button TWICE to color the record.
Can anybody help me with this problem?
Natasa(Wrong forum).
The problem is that enter_query stops executing your procedure until
another action ist started by the user.
You must create a short-time timer before issuing enter_query and set
your colour scheme in the when-timer-expired-trigger.
Maybe you are looking for
-
Database Error while running the query.
Hi, While running the query in webi rich client i am having a "database error IES 10901 and WIS 10901" , it is showing that the data source name not found and default driver is not specified. I am trying to generate report from efashion universe whic
-
Multiple Currency in budgeting of Enterprise Compensation Management
Hi Experts, We create budget in USD and plan for all employees in dfferenet countries. The exchange rate SAP read from the TCURR table but this rate is changed monthly therefore the budget amount in the total budget will change if the planning proces
-
Help : very slow connection speed with AEBS and iMac
I connect to the internet using my newly purchased AEBS. I have a MacBook and an 24" iMac ( purchased in Nov 2007). My iMac showed very slow connecting speed of <1 MB/s download; with my MacBook placed just 1 foot from my iMac, the MacBook showed an
-
Hi, Can anyone tell me how I can update a column in ORACLE based on form input???? I need to dynamically update just one field and writing a bean is too much work for this... any suggestions??? TIA, sands
-
Monitoring the SQL Server after deploying schemas (tables)
Hi, I will be deploying 8 schema which will create two tables in two databases. I am required to monitor the server for few days, whether it is performing well or anything is breaking. There will be other tables also which will be in replication chai