Convert Values to Single Value in Universe Object
Hi,
Our environment is BO 3.1 and all universes are on top of SAP BI 7.0.
How do we convert the values coming from a dimension to a single value?
I have created an object as "Active" by copying the existing "E01 Cutomer key" and added a Where clause in the object.
Select -
[ZEU_KUNNR].[LEVEL01].[[2ZEU_KUNNR]].[Value]
Where -
<FILTER KEY="[ZEU_KUNNR].[LEVEL01].[[2ZEU_KUNNR]].[Value]">
<CONDITION OPERATORCONDITION="InList">
<CONSTANT CAPTION='16278'/><CONSTANT CAPTION='16279'/>
</CONDITION>
</FILTER>
When I drag the above object Active (dimension) to the result object; Web I report works fine and retrieve only the values for - 16278 and 16279. But my requirement is to get the value as "Active" instead of filter values.
For eg.,
Active Subtotal2
=================
16278 $100
16279 $400
Instead of above we need to get like this:
Active Subtotal2
=================
Active $500
Is this possible in Universe? Do we have any MDX function/syntax to convert the values in Universe?
Thanks
Jai
Edited by: Jai on Sep 28, 2009 4:21 PM
Hi,
The best way to obtain your result would be to create a caluclated measure like this:
<EXPRESSION> IIF( [ZEU_KUNNR].currentmember.properties.("[2ZEU_KUNNR]") = "16278", "Active",
IIF( [ZEU_KUNNR].currentmember.properties.("[2ZEU_KUNNR]") = "16279", "Active",""),"")</EXPRESSION>
Then add the where clause you defined in the new calculated measure.
Unfortunately, all calculated measures and calculated members MUST return a numeric value with SAP MDX. In your case you want to return "Active" that is string.
This expression works fine with Microsoft Analysis Services.
So I recommend that you keep the object you defined and create a Web Intelligence formula that will group the 2 values in a single value "Active".
Didier
Similar Messages
-
Value-Helper: "Single Value" vs. "History"
Good morning experts,
when one opens the value-helper dialog (e.g. for setting a filter) the initial screen presents the "History" (= the values used recently for filtering). I'd like this screen to be preset to the "Single Values".
Could you please gimme a hint or some advice how to influence the initial setting for that dialog?
Thanks in advance,
kind regars,
MarcoHi,
This should be the hard coded design and cannot be changed by any setting.
If you don't have a history, it will show "single value" by default.
If you already have selected some values, it will show "history" by default.
Regards,
Patricia -
Restirct single values in selection screen
Hi,
I module pool have a input field. This field is called thru COMPLEX_SELECTIONS_DIALOG and have restricted the range values (only single values can be entered) Now users can enter any number of single value in the input field. My requirement is to restrict users to enter only 5 values in the input field.
I have checked the function module SELECT_OPTIONS_RESTRICT but there is option to restrict the number of enteries in single values.
How to restrict ?
Thanks for your replies.Hi,
You can control the select-option entries through the parameter (EXCLUDED_OPTIONS = RSOPTIONS ) in the fn. module COMPLEX_SELECTIONS_DIALOG. With this you can make sure that only single values are entered. ( You can take out the ranges here).
You can restrict the entries for the single ranges by checking the count of records in the return internal table for ranges.(TABLES : RANGE).You can throw a message by checking the count of this table as all the entered values will be available.
Hope this helps..
Regards
Deepu. -
Error: Restrict variable to single value
Hi experts,
for key figure planning, I created a planning profile group, which contains 3 planning profiles. But when choosing the Planing Profile Group, I get the error message as follows:
Error: Restrict variable 4MKTHI01 () (area 4CRM0001 (CRM Marketing Plan Values)) to single value
How can I fix the error? I appreciate any kind of help!
Thanks in advance,
ThorstenHello Ravi,
I really appreciate that you try to help me - but can you please be explain more in detail what to do?
What I did - and what did not work out:
In TX BPS0, I doubleclicked on Planning Area 4CRM0001, I clicked on the tab "Variables" and I doubleclicked on the relevant variable 4MKTHI01 of the Type Hierarchy. By doing so, I get the message "Hierarchy CRMMKTROOT does not exist". I also do not have the possibility to edit the variable by right-clicking; also the edit button is disabled.
Like described above: When I click on "Set Variables" and chose the variable, I am also not able to do any settings. So how?
Thanks,
Thorsten -
Passing Multiple Single values in User Exits
Hello All,
I have a requirement where in, a user could enter either a single value, multiple single values or a combination of a range and single values.
This set of values need to be passed on to a variable with in a user exit. I have been able to get either one single value to pass or one single range. I am unable to pass on multiple single values or a combo of a range and single value from the user entry.
I would appreciate if anyone could help me with the structure of the code to pass multiple single values or combo.
I was wondering if I would need to pass the values into an internal table first and then pass it to the user exit variable. However, as I am not a strong ABAP resource, I am struggling.
Any and all help is deeply appreciated.
Warm regards
SunilHello Marc,
There are two requirements which I was trying to address.
1. IN few queries, the users enter either a range of profit centers or multiple single values in the pop-up window. I need to pass those values from that variable to an variable of type USer Exit to derive partner profit center values with in the query.
For this I have been able to pass values for either a single value or a single range. I am unable to pass on values for multiple single values or a combo of a range and single values.
2. I am trying to create a query for the top 5 customers to be used in the Corporate Performance Monitor. However, when I am trying to use the variable of type "replacement path", the system does not allow me to release it for OLE DB for OLAP.
To obviate this problem, I was hoping to create a variable of typeUSer Exit" and then pass the values from the variable of type "replacement path" to this variable.
Is it a workable solution? I was hoping that the method to pass the values in both the above scenarios might be similar.
Please guide me.
Warm regards
Sunil -
Passing value to multi value parameter from SSIS using Report server webservice
Hi
I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
My code as below
ReportExecutionService rs = new ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = _webserviceURL;
rs.LoadReport(_reportPath, null);
ParameterValue[] paramval = new ParameterValue[2];
paramval[0] = new ParameterValue();
paramval[0].Name = "CountryCode";
paramval[0].Value = _countryNames;
**paramval[1] = new ParameterValue();
paramval[1].Name = "BusinessCode";
paramval[1].Value = _businessCode;****
rs.SetExecutionParameters(paramval, "en-us");
I am not sure how to pass value to BusinessCode(Multi value parameter)Hi Rajkm,
In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
of these ParameterValue objects must be specified same to the parameter name.
I found a good FAQ article for this scenario:
How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
Hope this helps.
Elvis Long
TechNet Community Support -
Hi!
I'm trying to convert domains Single values (fromvalue range) into another languages. .
Thx
ilhanWhat is your db version?
In 11g you can do
SQL> var str varchar2(30)
SQL> exec :str := 'SCOTT,KING,JONES,ALLEN'
PL/SQL procedure successfully completed.
SQL> select empno, ename from emp, xmltable(('"' || replace(:str, ',', '","') || '"'))
where ename = trim(column_value)
EMPNO ENAME
7788 SCOTT
7839 KING
7566 JONES
7499 ALLEN
4 rows selected. -
Error that "specify a value for variable posting period (single value entry
hi
My query is running testing fine in RSECADMIN under some username..but when i try and open it using analyzer (under same username) it gives me error that "specify a value for variable posting period (single value entry, mandatry)" it does'nt even asks to enter variable values and gives this error message.
However the same query appears to be working fine under different username.
plz advise.Hi Abhinav,
Just do one thing compare the Roles of two different users for which Query is getting executed and not.
Check the Object S_RFC.
Compare the Objects detail for Both the Users.
Please Assign points if useful.
Regards,
Rajdeep. -
How can i get all these values in single row with comma separated?
I have a table "abxx" with column "absg" Number(3)
which is having following rows
absg
1
3
56
232
43
436
23
677
545
367
xxxxxx No of rows
How can i get all these values in single row with comma separated?
Like
output_absg
1,3,56,232,43,436,23,677,545,367,..,..,...............
Can you send the query Plz!These all will do the same
create or replace type string_agg_type as object
2 (
3 total varchar2(4000),
4
5 static function
6 ODCIAggregateInitialize(sctx IN OUT string_agg_type )
7 return number,
8
9 member function
10 ODCIAggregateIterate(self IN OUT string_agg_type ,
11 value IN varchar2 )
12 return number,
13
14 member function
15 ODCIAggregateTerminate(self IN string_agg_type,
16 returnValue OUT varchar2,
17 flags IN number)
18 return number,
19
20 member function
21 ODCIAggregateMerge(self IN OUT string_agg_type,
22 ctx2 IN string_agg_type)
23 return number
24 );
25 /
create or replace type body string_agg_type
2 is
3
4 static function ODCIAggregateInitialize(sctx IN OUT string_agg_type)
5 return number
6 is
7 begin
8 sctx := string_agg_type( null );
9 return ODCIConst.Success;
10 end;
11
12 member function ODCIAggregateIterate(self IN OUT string_agg_type,
13 value IN varchar2 )
14 return number
15 is
16 begin
17 self.total := self.total || ',' || value;
18 return ODCIConst.Success;
19 end;
20
21 member function ODCIAggregateTerminate(self IN string_agg_type,
22 returnValue OUT varchar2,
23 flags IN number)
24 return number
25 is
26 begin
27 returnValue := ltrim(self.total,',');
28 return ODCIConst.Success;
29 end;
30
31 member function ODCIAggregateMerge(self IN OUT string_agg_type,
32 ctx2 IN string_agg_type)
33 return number
34 is
35 begin
36 self.total := self.total || ctx2.total;
37 return ODCIConst.Success;
38 end;
39
40
41 end;
42 /
Type body created.
[email protected]>
[email protected]> CREATE or replace
2 FUNCTION stragg(input varchar2 )
3 RETURN varchar2
4 PARALLEL_ENABLE AGGREGATE USING string_agg_type;
5 /
CREATE OR REPLACE FUNCTION get_employees (p_deptno in emp.deptno%TYPE)
RETURN VARCHAR2
IS
l_text VARCHAR2(32767) := NULL;
BEGIN
FOR cur_rec IN (SELECT ename FROM emp WHERE deptno = p_deptno) LOOP
l_text := l_text || ',' || cur_rec.ename;
END LOOP;
RETURN LTRIM(l_text, ',');
END;
SHOW ERRORS
The function can then be incorporated into a query as follows.
COLUMN employees FORMAT A50
SELECT deptno,
get_employees(deptno) AS employees
FROM emp
GROUP by deptno;
###########################################3
SELECT SUBSTR(STR,2) FROM
(SELECT SYS_CONNECT_BY_PATH(n,',')
STR ,LENGTH(SYS_CONNECT_BY_PATH(n,',')) LN
FROM
SELECT N,rownum rn from t )
CONNECT BY rn = PRIOR RN+1
ORDER BY LN desc )
WHERE ROWNUM=1
declare
str varchar2(32767);
begin
for i in (select sal from emp) loop
str:= str || i.sal ||',' ;
end loop;
dbms_output.put_line(str);
end;
COLUMN employees FORMAT A50
SELECT e.deptno,
get_employees(e.deptno) AS employees
FROM (SELECT DISTINCT deptno
FROM emp) e;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE FUNCTION concatenate_list (p_cursor IN SYS_REFCURSOR)
RETURN VARCHAR2
IS
l_return VARCHAR2(32767);
l_temp VARCHAR2(32767);
BEGIN
LOOP
FETCH p_cursor
INTO l_temp;
EXIT WHEN p_cursor%NOTFOUND;
l_return := l_return || ',' || l_temp;
END LOOP;
RETURN LTRIM(l_return, ',');
END;
COLUMN employees FORMAT A50
SELECT e1.deptno,
concatenate_list(CURSOR(SELECT e2.ename FROM emp e2 WHERE e2.deptno = e1.deptno)) employees
FROM emp e1
GROUP BY e1.deptno;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE TYPE t_string_agg AS OBJECT
g_string VARCHAR2(32767),
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER
SHOW ERRORS
CREATE OR REPLACE TYPE BODY t_string_agg IS
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER IS
BEGIN
sctx := t_string_agg(NULL);
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER IS
BEGIN
SELF.g_string := self.g_string || ',' || value;
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER IS
BEGIN
returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER IS
BEGIN
SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
RETURN ODCIConst.Success;
END;
END;
SHOW ERRORS
CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
RETURN VARCHAR2
PARALLEL_ENABLE AGGREGATE USING t_string_agg;
/ -
How to hide a single value node hierarchy in the query designer
Hi,
I would like to perform a calculation in the infocube. It concern a count "Nb of different customers" with the following hierarchy : Country / region / City.
This KF would be read at the same time by city, region and country, and certain customers exist in 2 different region, and I have to count them only once by country.
To do this, I added a new record (at the country level when loading infocube) to deduct a number of customers in doubloons.
This line added contain only a country code and the number of cutomers in doubloons (- 23 when I have 23 cutomers in doublons) with revrese sign.
Now, I would like to use this value (-23) to have a right Nb of different customers by country, without showing the not assigned line in the report hierarchy.
How can I hide, in the query designer or the WAD, a single value node from hierarchy (NOT assigned) but take in account the value (-23) at the country level ?
Is there another solution (more simple) to perform this in the infocube ?
For information,
1) The infocube is loaded once per month, and the KF (Nb of different customers" is also performed by month.
2) I can't perform this in the report (performance problem with calculated KF).
thx.Hi,
the short answer is "you can't", the longer is: The ADF Faces tree component is stamped for better performance. This stamping means that nodes are not rendered as JSF objects but copies of an existing component (just with a changed value). For this reason the nodes don't issue their own query for data and thus cannot be refreshed individually
Frank -
Hi,
How can I convert HEX value to CHAR value.
The Code in <b>non Unicode</b> system is:
DATA: t_text LIKE tline OCCURS 0 WITH HEADER LINE.
constants: c_hex_20a5(2) TYPE x VALUE '20A5'.
t_text-tdline = 'seller of the item so listed. A legend of the Seller Code(s) is as'.
TRANSLATE t_text-tdline USING c_hex_20a5.
The same code give error in <b>Uni-Code</b> system:
<b>error is "c_hex_20a5 must be an character type object (C, N, D, T or String type)."</b>
If anyone know, what is the solution, please let me know.
Thanks!
Puneet.Hi,
Try declaring the Hex chars using the ABAP char utilities. This is just a sample piece of code on how to declare and use:
CLASS cl_abap_char_utilities DEFINITION LOAD.
DATA: ws_lf TYPE c VALUE cl_abap_char_utilities=>cr_lf.
data: c_newline TYPE x VALUE '0D'. [ it is zero D, for carriage return ]
ws_lf = c_newline.
CONCATENATE it_tab-maktx
ws_lf
ws_template
INTO it_notificatn-template.
Hope this helps...
Regards
Subramanian -
WIP QTY. AND VALUE IN SINGLE REPORT FOR A PARTICULAR PERIOD
Is there any report for a particular period that we can get the WIP qty. and value in single report. If there what the fileds we have to select.
Ex. We want what is the consumption qty. and value and what is the GR qty. and value for the period ending June 08.Hi,
You can use the T-Code KKAS to get the WIP Qty against a given plant/material combination.
some of the other supporting t-codes are:
KKAO WIP Calc.: Collective Processing
KKAQ Display WIP - Collective Processing
KKAT WIP Display for Product Cost Coll.
KKAV WIP Calculation for Cost Object Hier
KKAW WIP Display Cost Object Hierarchy
KKAX WIP Calculation for Order
KKAY WIP Display for Order
Regards,
JLN -
How to add ranges for field BUKRS in Tcode GP52 is single value fied
Hi Experts,
In Tcode GP52 we can only give single value for company code in source data .. but i want to make it to accept ranges..
i have checked it but it is not a report program it is a module pool object..
i tried by creating a z program with selection screen and thaought of alling that program using my selection parameters but i failed ....can anyone help me in this
Thanks,
Vamseeinstead of enhansing the screen i have created BDC.
clossing this -
Crystal Reports prompt single value variable from BEX
Hi,
after upgrade to BO 4.1 SP2 Patch 3 the prompt from BEX variable in CR doesn't work.
After investigation the issue is happened for variables containing more than 9 values.
Bex Setting: Variable -> Details -> Variable Represents -> Single value
Variable which shows Jan-Dec
The issue happens only on CR file stored in BO server in Cr design time it works fine.
Is the bug known? Is there any solution?
HaraldYep.
Now tell me how you want to show that Prompt @ WebI report level.
My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
where user can enter the values directly. Exactly, i didn't get this??
@Prompt:
You have flexibility to show options like:
Mono/Multi: User can select Single value or Multiple.
BW Variable: Same we have (Single/Multiple)
Free/Constrained: User can Enter his/her value directly or No change option.
BW Variable: By defalut you will get this, once you made it to Optional input.
Persistent/Not_Persistent: Refreshed report has to show last selected value means use Persistent otherwise Not_P.
By seeing the Prompt syntax , I can say your Variable is after Customer Exit, Correct??
Workaround for your Problem is:
<FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A','Date\LovDate (Previous Day)Base',mono,primary_key)"/></CONDITION></FILTER>
You have to remove that Date class and objects from prompt syntax. Because of that it showing up LOV's not calendar.
Like:
<FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A',',mono,primary_key)"/></CONDITION></FILTER>
Why, It should be blank??
Because Date needs no class\object to show up, by default you will get Calendar on the fly.
Hope you got my point.
Thank You!! -
Authorization default values of transaction /MRSS/PLBOMGR for object /MRSS/
Hello,
When I add the tcode "/MRSS/PLBOORGM " throuh the menu tab and when I go the authrization tab and click on either
Change Authorization Data or Expert Mode for Profile Generation the is an error message stating the following :
======================================================================================
Authorization default values of transaction /MRSS/PLBOORGM for object /MRSS/PB1 inconsistent
Message no. 5@015
Diagnosis
The authorization fields contained in the authorization defaults are incomplete or incorrect.
System Response
The process had to be terminated to avoid generating inconsistent authorization data.
Procedure
Use transaction SU24 to adjust the authorization defaults to the object definitions in transaction SU21 and then repeat the process.
============================================================================================
SU24, the custom values maintained are same as SAP Default . Any suggestion?
Thanks
Osama KhalifaThis indicates one of two things resulting from changes to the authorization object AFTER SU22 had been maintained for it:
1) One or more of the fields were converted to org. levels using the "old" technique of maintaining the table instead of running the report for this.
2) One of more of the fields were changed in SU20 or SU21 but the original data in SU22 was not corrected.
Solution in both cases is to correct the proposals in SU24 (customer data) and report it to SAP to correct in SU22 (original SAP data).
Cheers,
Julius
Maybe you are looking for
-
Has anyone solved the bluetooth pairing after sleep issue
I still get this problem I wake my mac and no mouse ! it won't pair, prefs says its connected but its not. A reboot works, but whats the piont of that it should work..
-
Getting "the procedure entry point CGImageRelease could not be located in the dynamic link library CoreGraphics.dll" error when starting Itunes. Haved reloaded many times and still the error.
-
Component attributes changed programmatically but aren't taken into account
Hello everyone, I tried to change a JLabel's and JTextField's attributes, all this inside a JButton's ActionListener, but the changes don't seem to be takin into account. I did a debug and they are correctly set, but the changes don't show up on the
-
s there any problem for my iphone's battery to keep my charger connecting for few hours after the battery is full? Sometimes i sleep and the my iphone is charging and of course the battery became full after two or three hours, and definitely i will n
-
How to covert a PSD photo to a JPG photo?
How to convert a PSD photo to a JPG photo?