How to get MDX code from Smartview query

Hello everybody:
I would like to know how to obtain the MDX code when I am performing a query from Smartview. How can I find out what sentence the Provider Service sends to Essbase when doing any operation in Smartview?
Thank you
Regards
Javier

you might want to use the HypQueryMembers vba call with it you can query the outline directly for a lot of things including User defined attributes
Here is the code sample from the VBA reference (it is available in Excel by going to the add-ins menu and selecting Hyperion Help
Description
HypQueryMembers() executes the member selection query.
Syntax
HypQueryMembers (vtSheetName, vtMemberName, vtPredicate, vtOption, vtDimensionName, vtInput1, vtInput2, vtMemberArray)
ByVal vtSheetName As Variant
ByVal vtMemberName As Variant
ByVal vtPredicate As Variant
ByVal vtOption As Variant
ByVal vtDimensionName As Variant
ByVal vtInput1 As Variant
ByVal vtInput2 As Variant
ByRef vtMemberArray As Variant
Parameters
vtSheetName: (string) Text name of worksheet to operate on. vtSheetName is of the form "[Book.xls]Sheet". If vtSheetName is null, empty, or invalid (nonexistent or name does not match exactly), the active sheet is used.
vtMemberName: (string) The member name on which to perform the query.
vtPredicate: (integer) Member selection criteria:
1 HYP_CHILDREN
2 HYP_DESCENDANTS
3 HYP_BOTTOMLEVEL
4 HYP_SIBLINGS
5 HYP_SAMELEVEL
6 HYP_SAMEGENERATION
7 HYP_PARENT
8 HYP_DIMENSION
9 HYP_NAMEDGENERATION
10 HYP_NAMEDLEVEL
11 HYP_SEARCH
12 HYP_WILDSEARCH
13 HYP_USERATTRIBUTE
14 HYP_ANCESTORS
15 HYP_DTSMEMBER
16 HYP_DIMUSERATTRIBUTES
vtOption: (integer) Options are dependent on the predicate:
For the predicate values, HYP_SEARCH and HYP_WILDSEARCH, specify query options: HYP_MEMBERSONLY
HYP_ALIASESONLY
HYP_MEMBERSANDALIASES
vtDimensionName: (string) Dimension to limit the scope of the query. It is used with the following query options and ignored otherwise: HYP_NAMEDGENERATION, HYP_NAMEDLEVEL, HYP_USERATTRIBUTE HYP_SEARCH (set to Null to search through all dimensions), HYP_WILDSEARCH (set to Null to search through all dimensions).
vtInput1: (string) Input string that is determined by the option. It is used with the following query options and ignored otherwise:
HYP_NAMEDGENERATION (The name of the generation)
HYP_NAMEDLEVEL (The name of the level)
HYP_SEARCH (The string to search for. The string is defined as an exact)
HYP_WILDSEARCH (The string to search for. The string is defined as an exact search string with an optional '*' at the end to mean any set of characters)
HYP_USERATTRIBUTE (The user-defined attribute)
vtInput2: (string) Input string that is determined by the option. It is used with the following query options and ignored otherwise:
HYP_USERATTRIBUTE (The user-defined attribute)
HYP_SEARCH, HYP_WILDSEARCH (If the options are set to search in the alias tables, this string specifies which alias table to search. If the string is Null, all alias tables will be searched).
vtMemberArray: Output that contains the result of the query. If unsuccessful, its contents are unknown.
Return Value
Returns a zero if successful; otherwise, returns the appropriate error code.
Example
Declare Function HypQueryMembers Lib "HsAddin.dll" (ByVal vtSheetName As Variant, ByVal vtMemberName As Variant, ByVal vtPredicate As Variant, ByVal vtOption As Variant, ByVal vtDimensionName As Variant, ByVal vtInput1 As Variant, ByVal vtInput2 As Variant, ByRef vtMemberArray As Variant) As Long
Sub QueryMembersEmptyValues()
vtRet = HypQueryMembers(Empty, Null, HYP_WILDSEARCH,
     HYP_MEMBERSONLY, "Year", "J*", "", vt)
If IsArray(vt) Then
cbItems = UBound(vt) + 1
     MsgBox ("Number of elements = " + Str(cbItems))
For i = 0 To UBound(vt)
     MsgBox ("Member = " + vt(i))
Next
Else
MsgBox ("Return Value = " + Str(vt))
End If
End Sub

Similar Messages

  • How to get company code from Shipment

    Hi,
    I am working on a user exit on shipment (VT01N). I have shipment data. I have to get the value of KVERMfield from LFB1 table. There are multiple entries in LFB1 table with same Vendor with different company codes. How should i find the correct "Company Code" from shipment?
    Please help.
    Thanks,
    Mohammed Ibrahim

    Hello,
      in table VTTK  you have field "TransportPlanningPt" VTTK-TPLST. Get this value then enter in the customizing table TTDS, where the TransportPlanningP is assigned to the Company code.
    Hope to be useful.
    Best regards,
    Andrea

  • How to get exit code from C code when calling java method via JNI?

    Hi, All
    in my project, i need to call a java method from C code using JNI, yet I do
    not know how to
    retrieve the exit code of java program. the java code is like below
    public static void main(....)
    if(error){
    System.exit(-77);// the exit code is -77
    and the JNI c code may like below
    /* Invoke main method. */
        (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
    //here I want to retrieve the exit code from java to check if there is an
    error
    any suggestions? thanks

    Hi Liang Zhang,
    In your C code add:
    void (JNICALL y_exit)(jint code) {
    and when you are initialazing JVM options add:
    JavaVMOption options[...];
    options[...].optionString = "exit";
    options[...].extraInfo    = y_exit;
    See http://java.sun.com/j2se/1.3/docs/guide/jni/jni-12.html
    Best regards, Maksim Rashchynski.

  • How to get trigger code from the schema into a file

    Please help me in getting code of any trigger from the schema, without using any data dictionary views.

    In fact you can get the trigger code by using tools like toad,sql developer
    But all are using the data dictonary view to get the code .

  • How to get source code from portal app

    Hi,
    I have a successful Web dynpro portal application running, which I would like to modify. We lost the source code. Is there any way that I can get the source code from the portal?.
    Thanks and I appreciate your help.
    /Sunita.

    Hi,
    You can extract class files from app.jar and decompile it(.ear->.wda) but it is only generated classes without metadata. Metadata is stored in .wda file but format is not compatible with studio. That all options you have.
    Go through the following links, it will be helpfull to you
    Some of the solutions provided in it
    [Re: Retrieve the source code from .EAR;
    [Restore source code from ear file;
    Regards
    Raghu

  • How to get SQL statement from (Collection) query.execute();

    We have a JDO Persistence class ClassName that execute query using following code. After this statement get executed, record does not get updated in the DB. Is there a way to check what SQL statement got submitted in the (Collection) query.execute(); ??? <br><br>
    Extent extent = pm.getExtent(ClassName.class, false); <br>
    Query query = null; <br>
    try { <br>
    query = pm.newQuery(extent, filter); <br>
    Collection results = (Collection) query.execute();<br>
    Iterator i = results.iterator();<br>
    if (i.hasNext()) {<br>
    ...<br>
    }<br>

    You can always find out the names of tables that are views, using java.sql.DatabaseMetaData and its getTables() method.
    This tends to be a nice source of examples:
    javaalmanac.com
    However, if you're asking for the underlying SQL used to CREATE VIEW, I don't see anything in the API that will give you that. After all, JDBC shouldn't have to know if it's dealing with an ordinary table or a view. I think you'd have to ask your DBA for the underlying SQL.
    Once you have it, what do you plan to do with it?
    %

  • GTS How to get commodity code from material master ? function/ table

    Hello,
    I have to write a "simple" program in GTS system.    (In SD   Commodity code is field MARC-STAWN  )
    The customer wants to enter material numbers ( from x  to y )
    and the program should display:
    Material--Material text--Commodity codevalidity from--
    validity to
    4711--Maschine_A--12345678905.08.2006--
    31.12.2008
    124587444--01.01.2009--
    31.12.9999
    4712--Maschine_B--5656568901.12.2007--
    31.12.2009
    (The customer wants to have a look if all Commodity codes in GTS are maintained)
    Can someone give me the name of the tables where it is stored in GTS?
    Or are there any function calls to get material data?
    best regards and many thanks
    Norbert
    Edited by: Norbert Zanders on Jan 1, 2009 5:08 PM

    You have to consider the following tables:
    /SAPSLL/PNTPR --> product number and GUID
    /SAPSLL/PRCTS --> product GUID and GUID of commodity code
    /SAPSLL/CTSNUM or /SAPSLL/CTSNUMC--> commodity code (general or country specific)
    /SAPSLL/CTSNUMT --> commodity code description
    /SAPSLL/PRT --> material description

  • How to get PPA Code

    Hi Friends,
                      Can u please let me know how to get PPA Code from ZZ_PPA_C.
    Please help me its urgent.
    Regards,
    Rajiv Kaushal

    What do you mean?
    The restriction code would be whatever you set it to be.
    There is no restriction codeunless you set it.

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • V5 How can I get the code from an itunes gifcard that got scraped off

    How can I get the code from an itunes gifcard that got scraped off

    Try Here  >  http://support.apple.com/kb/TS1292
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • HT2534 What is iTune gift card? How can i get the code from this?

    What's iTune gift card? How can i get the code from this?

    "What's iTune gift card?"
    It is a gift card like any other gift card.  It is a card that contains credit for purchases in the itunes store.
    "How can i get the code from this?"
    Genreally there is a scratch of area under which the code lies.

  • How do i get my code from my itunes gift card if i cant read the code

    how do i get my code from itunes gift card if i cant read it what do i do

    iTunes Store: Invalid, inactive, or illegible codes
    http://support.apple.com/kb/TS1292

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get column value from DB grid

    Hi!
    I wander how to get col value from GridControl?
    My app consists of one rowsetinfo with two
    columns CODE and DESCRIPTION and a jbutton
    titled SELECT. When user clicks SELECT button
    the app should show the value of the CODE col
    of the selected row in GridControl.
    I wander how to make this action ?
    XxpsTransTimesMasterIter.setAttributeInfo( new AttributeInfo[] {
    CODEXxpsTransTimesMasterIter,
    DESCRIPTIONXxpsTransTimesMasterIter} );
    XxpsTransTimesMasterIter.setName("XxpsTransTimes");
    XxpsTransTimesMasterIter.setQueryInfo(new QueryInfo(
    "XxpsTransTimesMasterIterViewUsage",
    "lov.XxpsTransTimes",
    "CODE, DESCRIPTION",
    "XXPS_TRANS_TIMES",
    null,
    null
    ));

    Hi,
    You could attach an ActionListener on the JButton, and try the following code :
    NavigationManager fm = NavigationManager.getNavigationManager();
    DataItem dataItem = fm.getFocusedControl().getDataItem();
    ImmediateAccess col_code = null;
    String code = null;
    if (dataItem != null && dataItem instanceof RowsetAccess) {
    RowsetAccess rowset = (RowsetAccess)dataItem;
    try {
    col_code = (ImmediateAccess) rowset.getColumnItem("CODE");
    code = col_code.getValueAsString();
    } catch (DuplicateColumnException de) {
    return;
    } catch (ColumnNotFoundException ce) {
    return;
    } catch (SQLException se) {
    return;
    JTextField tf = new JtextField();
    tf.setText(code);
    I haven't tested this code.
    I am curious to know, the Object type of the dataItem.If it doesnot happen to be RowsetAccess ..try.. ScrollableRowsetAccess OR ImmediateAccess.
    Your code would change accordingly, depending on the instance.Refer to the product documentation for this.
    Do let me know, if this works.
    TIA
    Sandeep

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

Maybe you are looking for

  • Bought iphone 5s, cant connect to wifi ( unable ) help?

    It says that's unable to connect but im entering the right password..

  • DECODE syntax

    Hello, I wanted to use the DECODE function for an insert into a database table. It should work like this: If value1 is a, b, or c then value2 should be 1 and if value1 is d, then value2 should be 2. I know I can code it like this: SELECT DECODE (valu

  • Compression/Decompression of byte-array in TupleOutput/TupleInput

    Hello, how do I compress the whole data before I flush everything out? I simply want to write to the internal buffer using TupleOutput methods and after that compress the buffer. The decompressing once using the TupleInput reference. For instance Sna

  • BPEL 11g Email Notification - Multiple SMTPs

    Hi All We have a requirement to send emails through alternative SMTPs based on content via BPEL. In 10g BPEL, we could do that based FromAccount configuration in nl_emails.xml. What is the equivalent steps for creating different FromAccount configura

  • My Boot Camp, Parallels and Adobe quest.

    I've been a pc user since 1983! For now my desktop will still be a windows pc, but since deciding to get my first laptop I wanted to dive into the Apple waters and bought a MacBook Pro. My main apps are Adobe Lightroom 2 and Photoshop CS4. Without do