Getting a dataprovider object QUERY property with JavaScript

Hi, I'm trying to get the QUERY property of a DataProvider Object, but can't seem to get it. Can anyone tell me if this code is ok?
Thanks!
<object>
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="SET_DATA_PROVIDER"/>
<param name="NAME" value="DP1"/>
<param name="QUERY" value="ZGZMPASDPL_SR21_CNRTY_DASH_01"/>
<param name="INFOCUBE" value="ZMPASDPL"/>
DATA_PROVIDER:             DP1
</object>
var currentQuery = SAPBWGetItemProp("DP1");
var queryName;
if (currentQuery != null)
{   for(i=1; i<currentQuery.length; i++)
        {  if (currentQuery<i>[0] == "QUERY")
               queryName = (currentQuery<i>[1]);

Hi Kenneth,
copy&paste the attached webtemplate coding in your WAD...
regards Jens
<HTML>
<!-- BW data source object tags -->
<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_DATA_PROVIDER"/>
         <param name="NAME" value="DATAPROVIDER_1"/>
         <param name="QUERY" value="ZGZMPASDPL_SR21_CNRTY_DASH_01"/>
         <param name="INFOCUBE" value="ZMPASDPL"/>
         DATA_PROVIDER:             DATAPROVIDER_1
</object>
<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_PROPERTIES"/>
         <param name="TEMPLATE_ID" value="Z_GETQUERYID"/>
         TEMPLATE PROPERTIES
</object>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE>BW Web Application</TITLE>
      <link href= "/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
</HEAD>
<BODY>
<span style="DISPLAY: none; VISIBILITY: hidden" id="queryname">
<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="TEXTELEMENTS_1"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS"/>
         <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         <param name="GENERATE_CAPTION" value=""/>
         <param name="BORDER_STYLE" value="NO_BORDER"/>
         <param name="SHOW_COMMON_ELEMENTS" value=""/>
         <param name="SHOW_FILTERS" value=""/>
         <param name="SHOW_VARIABLES" value=""/>
         <param name="ELEMENT_TYPE_1" value="COMMON"/>
         <param name="ELEMENT_NAME_1" value="REPTNAME"/>
         <param name="ONLY_VALUES" value="X"/>
         ITEM:            TEXTELEMENTS_1
</object>
</span>
<P></P>
<P><object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="TABLE_1"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
         <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         ITEM:            TABLE_1
</object></P>
<script language="JavaScript">
var queryid = document.getElementById('queryname').innerHTML;
alert(queryid);
  </script>
</BODY>
</HTML>

Similar Messages

  • Is there any way to get windows environment variables like %USERNAME% with javascript?

    is there any way to get windows environment variables like %USERNAME% with javascript using Adobe 10 pro?

    There is a fair amount of Acrobat JavaScript and Acrobat knowledge need to sort all of this out.
    The identity object holds a lot of sedative information. First, upon installation of Acrobat, only the login name is available in the identity object and the end user of the application needs to complete the "Name", "email" and "Organization Name" in the application's preferences. These are the only fields that are available to Acrobat JavaScript identity object as corporation, email, loginName, and name.
    Using the instructions in The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript) you can run the following script in the JS console to see the items of the identity object:
    for(i in identity) {
    console.println(i +": " + identity[i]);
    and the following will appear in the console:
    loginName: georgeK
    name: George Kaiser
    corporation: Example
    email: [email protected]
    true
    The documentation states you need to use a trusted function to access this data, but you can access it at startup of Acrobat/Reader and add the properties of the identity object to an array:
    // application variable to hold the properties of the identity object
    var MyIdentity = new Array();
    // loop through the properties of the identity object
    for (i in identity) {
    // place each property of the identity object into an element of the same name in the Identity array
    MyIdentity[i] = identity[i];
    console.println(i +": " + MyIdentity[i])
    You access the items with:
    var loginUser = MyIdentity[loginName];  // get the loginName property
    In the user application level JavaScript file. See Acrobat Help / User JavaScript Changes for 10.1.1 (Acrobat | Reader) for the location of the application level folder you need to use.
    I would change the name of the array used in this post so an untrusted user cannot get to your data. Some of this data can be used in hacking into a user's system.

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Get search criteria from query panel with table

    hi guys,
    i have a query panel with table that i created from a VO.
    i use the all queryable attribute in the generated DataControl.
    i hv a requirement to update the database value with the same search criteria with the query panel.
    but i want the submitted search criteria, not only written in the query panel criteria.
    i'm using JDEV & BPM 11.1.1.6
    i've already tried to get the criteria using
    QueryModel queryModel = getQueryPanel().getModel(); 
    QueryDescriptor queryDescriptor = queryModel.getSystemQueries().get(0);             
    ConjunctionCriterion cc = queryDescriptor.getConjunctionCriterion();
    for(int i=0;i<cc.getCriterionList().size();i++){
         AttributeCriterion ac = (AttributeCriterion)cc.getCriterionList().get(i);
         System.out.println("DEBUG LABEL : " + ac.getAttribute().getLabel());
         System.out.println("DEBUG VALUE : " + ac.getValues().get(0));    
    }        but it only get the value that filled in the search criteria input text, not the criteria that already been searched and viewed in the table
    my other question is, can i override the search button function ? so i can add a custom method to save the search criteria to my temporary variable.
    thanks
    Edited by: Juw on May 29, 2013 2:05 AM

    Is this https://blogs.oracle.com/jdevotnharvest/entry/how-to_tell_the_viewcriteria_a_user_chose_in_an_afquery_component or http://www.learnoracleadf.com/2013/05/programatic-handle-to-adf-query.html what you are looking for?
    Timo

  • Setting the layer color property with javascript

    Is it possible to set a layer's color in the layers palette using javascript?
    By default everything shows up with no layer color but if you right click (ctrl-click) on a layer you have the option to change the color to Red, Orange, Yellow, etc.
    My question is can I do this with a script?
    I can lock a layer, change it's visibility and opacity, but I can't seem to find any reference to that particular property.
    Any help is appreciated.
    Thanks,
    Zara

    This will set the active layers colour....
    layerColour("Violet");
    function layerColour(colour) {
        switch (colour.toLocaleLowerCase()){
            case 'red': colour = 'Rd  '; break;
            case 'orange' : colour = 'Orng'; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'green' : colour = 'Grn '; break;
            case 'blue' : colour = 'Bl  '; break;
            case 'violet' : colour = 'Vlt '; break;
            case 'gray' : colour = 'Gry '; break;
            case 'none' : colour = 'None'; break;
            default : colour = 'None'; break;
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc2 = new ActionDescriptor();
            desc2.putEnumerated( charIDToTypeID('Clr '), charIDToTypeID('Clr '), charIDToTypeID(colour) );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc2 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

  • Getting error "Object variable or with block variable not set" when trying to open a FR report in studio

    Problem Description
    We are on FR 11.1.2.2.305 installed on AIX. a user is getting this error: "Object variable or with block variable not set" when trying to open a FR report from FR studio client installed on windows xp . Initialy, we thought it may be a FR client installion issue. We uninstalled and cleaned up registry and did a fresh installation of the client but the issue still persists. The FR server and the client are on the same version.
    The user is a LDAP user who is facing the issue. We have confirmed with other users and they dont have any issue accessing FR report from their own client but when they try to connect from the users machine who is having issues, the others users also see the above error. All the users are ldap users and all belong to same shared services groups so the provisiong is the same.
    Any input will be appreciated.
    Thanks

    OK, in this case of one single computer, please make sure that settings as per below KB document as in place and then validate the issue:
    Internet Explorer (IE7, IE8, IE9 and IE10) Recommended Settings for Oracle Hyperion Products (Doc ID 820892.1)
    The information in this document applies to the following Enterprise Performance Management products:
        Calculation Manager
        Data Relationship Management (DRM)
        Enterprise Performance Management Architect (EPMA)
        EPM Workspace
        Essbase Administration Services (EAS)
        Financial Data Quality Management (FDM)
        Financial Management (HFM)
        Financial Reporting
        Foundation Services
        Interactive Reporting
        Planning
        Shared Services
        Web Analysis
    Thanks!

  • Is there inbuild Handler in weblogic using which i can get the MessageContext object

    HI,
    I need MessageContext object in my application but i dont want to use the Handler,As
    there is AxisEngine in axis soap engine,is there any similar implementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContext what about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

    HI,
    yeah i had to make use of Handler to get the MessageContext object and play with
    that.
    Thanks & Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can get to MessageContext from a handler. Check out an example of
    handler
    to see how you can get Message out of MessageContext.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI manoj,
    Thanks for your reply.otherwise i thought that i wont get any morehelp
    on this
    forum :-) ...
    anyway its good that we will have such thing in next version,duringthe
    development
    i feel that more functioanlity should be in build in appserver. Likeone
    more
    thing i could not find out is how we can get the "message" object inweblogic
    like we can in axis using its MessageContext class's static method.if it
    is there
    can you please let me knwo about that.
    The other problem i had to make use of handler and my appl is workingas of
    now :-)
    Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can not do this in WLS 7.0. The next major release (WLS 8.1) will
    fix
    this problem.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI,
    I need MessageContext object in my application but i dont want
    to
    use
    the Handler,As
    there is AxisEngine in axis soap engine,is there any similarimplementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContextwhat
    about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

  • Error: Object variable or with variable not set while accessing BPC Excel

    Hi,
    I am working on BPC NW 7.5. When I am trying to access BPC for Excel I am getting the below error.
    'object variable or with variable not set'
    When I click on BPC for Excel it ask for the credentials, after entering it we encounter this error.
    Any idea why is this happening?
    Regards,
    Priyanka Singh

    Hi Renne,
    Could you share me the solution to resolve the issue?
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule.
    I am working on SAP BPC 7.0 NW and using MS Excel 2003.
    I can log in to BPC Admin and excel with my user id and password.
    Only when i am trying to click esubmit --> send and refresh schedules i am getting this error.
    I checked my security profile and i have the submit data task in my task profile.
    Following couple existing SDN postings i tried to check the ADD-INs of the excel on my system. However it looks like the steps listed in the existing SDN posts are for MS EXCEL 2007.
    Please suggest me how do i resolve this issue. Please note I am working on SAP BPC 7.0 NW and using MS Excel 2003.
    Regards,
    Jagat

  • Error: object variable or with block variable not set when creating journal

    Hello
    When I try to create a new journal, I get an error "object variable or with block variable not set"
    This is happening with some computers but not all of them, the same user can create a journal in some computers.
    I tried uninstalling and reinstalling BPC office client but that did not work.
    Do you have any other ideas ?
    Thank you in advance.

    Hi,
       You have to check first  if you are able to access the reporting service frm that speific client machine typing:
    http://<reporting server name>/reports. If all is woking well , you have to check also the number of default sheets for an empty excel sheet (should be 3) - I ma not sure what version are you using.
        If still not work, please let me know when exactly the error appear, when you try to open the template (clicking on journal option) or after when you fill the report, save it, so on.
    Best regards,
    Mihaela

  • Object variable or With Block variable not set

    Hi - We have saved a working input schedule to a new name and modified it to use for another company.  There is a report tab to bring down the historical units from BPC, a tab to trend the history, and a tab that references the other two tabs to forecast the units into the future and send the forecasted units back up to BPC.  The input schedule that was saved to a new name and modified works fine until we attempt to Send and Refresh the active worksheet on the forecast tab.   When we do so, it indicates the number of records that will be sent, but when it attempts to Process the upload to BPC we receive an error message that indicates  Object variable or With Block variable not set  and no records are sent to BPC.
    We have retested the original input template that was copied and the original template still transfers data successfully to BPC.  We have also tried starting with a blank input template and copying in the formulas from the working template and we still get the same error message.  
    We have read several postings on this error and it seems to be a pretty general error, and so far none of the suggestions have worked for us.  One suggested checking for special characters, but the only non alpha non-numeric characters used are dashes in the values of one of the dimensions and spaces and underlines in the formulas used to forecast the units, but both of these are present and don't seem to cause any problem in the working input schedule. 
    We are currently on BPC 7.5 SP6 and using Excel 2010.
    Any help would be appreciated.

    >Note 1494285 seems to be in reference to BPC for Microsoft and we are using NetWeaver.
    Sorry, 1513080 is for NW (there's link to it in bottom of 1494285) :
    - Currently only BPC 7.5 NW SP05 and above support Office 2010
    - Note: BPC NW 7.5 NW cannot work on office 2010 (64-bits), office 2010 (64-bits) is not supported.
    Check your proxy settings (note 1592560: Getting "Error 91 Object variable or with block variable after upgrade to SP06" in the Excel Client.)
    Try 1576893: After upgrading to SP06, the EVDRE reports stop working.
    PS. Maybe I wrong, but some problems with 2010 Office clients in our system dissapear after patching to SP08.

  • Object variable or with block variable not set- while trying to submit data

    Hi Gurus,
    Could you share me the solution to resolve the issue?
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule.
    I am working on SAP BPC 7.5 NW and using MS Excel 2007.
    I can log in to BPC Admin and excel with my user id and password.
    I checked my security profile and i have the submit data task in my task profile. My all other Input Schedules are working very well. Only one of the IS is causing this problem. The same input Schedule when saved as Dynamic Template it works well and data is sent successfully.
    Regards,
    KumarMG

    Hi Kumar,
    This might be incase you have some special character like & in the input schedule template. you need to remove the special character in that case.
    Hope this resolves your issue.
    Rgds,
    Poonam

  • Load Hierarchy Error "object variable or with block variable not set"

    Hi gurus
    When I try to load a dimension by package I get this error "object variable or with block variable not set" and I can not select the hierarchy of the dimension
    You know how to fix this issue?
    Thanks
    Nayadeth

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Sending data : Object variable or With block variable not set

    Hi experts,
    I try to send some in finance in Apshell data with EVDRE, an I get the error "Object variable or With block variable not set" !!!
    I can process/save/reassign index/full optimize my application ans its OK.
    Have you got any idea ?
    thank you,
    mathias

    Hi mathias,
    We faced similar issue and processing all the dimensions used in the application solved it then.
    Now we get the same error while processing Time dimension and i am yet to find a solution.
    Hope some experts may help us.
    Kranthi

  • BPC 7.5 NW - Error Object variable or With block variable not set ?

    Hi, we have BPC 7.5 NW SP07.
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule
    I went to the Excel Options --> Add-Ins --> COM Add-ins, disable and enable but not working.
    I look in ST22 some errors:
    TSV_TNEW_BLOCKS_NO_ROLL_MEMORY
    TSV_TNEW_PAGE_ALLOC_FAILED
    Error was initial in last days.
    Any idea ?

    Hi Vitoto,
    The problem is not with BPC Excel, but with Memory. I think there is no sufficient memory available in your system.
    Please check SAP Notes 20527 & 369726 for the dump that you are getting in ST22.
    Regards,
    Raghu

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

Maybe you are looking for