How to get query output in javascript

i have a transaction with one output parameter.
i have created an xacute query and referenced the transaction and its output parameter.
now how do i get the value of that output parameter in a script in irpt file.
i tried creating an applet.
<APPLET NAME="executeApplet" CODEBASE="/XMII/Classes" CODE="iBrowser" ARCHIVE="illum8.zip" WIDTH="100" HEIGHT="100" MAYSCRIPT>
<PARAM NAME = "QueryTemplate" VALUE="RH_DASHBOARD/Execute">
</APPLET>
i tried with this code in the script
document.executeApplet.getQueryObject().getOutputParameter()
but this gave  me the output parameter name not the value.
i just need the value of the output parameter in the java script.

Hi Rohit,
Try using getBrowserObject().getSelectedItemAt(1).  Or you can use any of several other methods to get the value of your output.  If you are in 12.1 or greater, go to the workbench and open your webpage.  At the bottom of the window with the html and javascript, you will see an elipse of 5 dots.  Click and hold to drag that line up.  That will expose the script assistant when you can browse for the other methods available.
Regards,
Mike

Similar Messages

  • How to get query output data

    Hi,
    I have created procedure to analyze tables. I tried to get output but its not displaye in a proper way. I want to output as like as a query output.
    create or replace procedure tablestats
    as
    begin
    for cur in (SELECT OWNER,TABLE_NAME, NUM_ROWS, BLOCKS, AVG_ROW_LEN,TO_CHAR(LAST_ANALYZED, 'MM/DD/YYYY HH24:MI:SS')FROM DBA_TABLES WHERE OWNER='SCOTT') LOOP
    dbms_output.put_line(cur.owner||' '||' '||cur.table_name||' '||cur.NUM_ROWS||' '||cur.BLOCKS||' '||cur.AVG_ROW_LEN);
    DBMS_STATS.GATHER_TABLE_STATS('scott',cur.table_name);
    end loop;
    end;
    Output came lke this:
    SQL> exec tablestats
    SCOTT  DEPT 4 4 20
    SCOTT  EMP 14 4 38
    SCOTT  SALGRADE 5 4 10
    SCOTT  SERVICE 8 5 12
    SCOTT  BONUS 0 0 0
    PL/SQL procedure successfully completed.
    Acually i want output like..
      1* SELECT OWNER,TABLE_NAME, NUM_ROWS, BLOCKS, AVG_ROW_LEN,TO_CHAR(LAST_ANALYZED, 'MM/DD/YYYY HH24:MI:SS') Last_Analyzed FROM DBA_TABLES WHERE OWNER=
    'SCOTT'
    SQL> /
    OWNER                          TABLE_NAME                       NUM_ROWS     BLOCKS   AVG_ROW_LEN   LAST_ANALYZED
    SCOTT                          DEPT                                             4                   4                 20                   11/27/2013 19:10:44
    SCOTT                          EMP                                            14                   4                 38                    11/27/2013 19:10:44
    SCOTT                          SALGRADE                                   5                   4                 10                    11/27/2013 19:10:44
    SCOTT                          SERVICE                                      8                   5                 12                     11/27/2013 19:10:44
    SCOTT                          BONUS                                        0                    0                  0                      11/27/2013 19:10:44
    Please help me.
    Thanks,

    Hi,
    As John said, PL/SQL doesn't give you any of the nice formatting features that front end tools, like SQL*Plus, provide.  If you want headers, you have to say exactly what they are, and write them yourself.  If you want the columns to line up, you have to decide how long they will be and pad them yourself.  It's a lot of work.
    Why not let PL/SQL do the things that only PL/SQL can do, and let SQL*Plus do the things it does well?  Have your procedure  or function return a cursor, which you can then diplay in SQL*Plus, or write a piplined function, that you can use in queries where SQL*Plus can format the results.
    The query you posted can eaisly be done directly from SQL*Plus, of course.  I assume you posted a very simple example, becuase your question is just about display.  If you don't absolutely need PL/SQL, don't use PL/SQL.  What I said above applies if you really do need PL/SQL.

  • How to get this output using sql query?

    Hi,
      How to get this output using sql query?
    Sno Name Age ADD Result
    1 Anil 23 delhi Pass
    2 Shruti 25 bangalor Pass
    3 Arun 21 delhi fail
    4 Sonu 23 pune Pass
    5 Roji 26 hydrabad fail
    6 Anil 28 delhi pass
    Output
    Sno Name Age ADD Result
    1 Anil 23 delhi pass
    28 delhi pass

    Hi Vamshi,
    Your query is not pretty clear.
    write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
    Regards,
    Kannan

  • How to get query result in comma dilimited text or excel file?

    Does anybody know how to get query results in comma delimited
    text file or excel file, I tried spool abc.txt, but the result
    showed some ------ lines
    Thanks

    Try doing this in your sql scripts
    set heading off
    set pagesize 0
    set linesize 4000
    set feedback off
    set verify off
    set trimespace on
    set colsep ","
    spool output.txt
    select * from dual (or whatever you are querying
    spool off
    There may be a couple other set statement that you could add but
    this should get you started in the right direction

  • How to get the output of the report in pdf format

    how to get the output of the report in pdf format?
    Thanks in advance,
    madan.

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • How to get the output of Standard HR forms in PE51

    Hi Experts,
    How to get the output of standard HR forms available in PE51 Transaction for coutry grouping 99.
    Please advice.
    Regards,
    IFF

    Hi
    Use the t code for country grouping 99....PC00_M99_CEDT - Remuneration Statement. to get the variant in tcode PC00_M99_CALC_SIMU - Simulation.
    Like this test for all the standard forms, what all are the available in PE51 for country grouping 99

  • How to get query execution time without running...?

    Hi ,
    I had one requirement .... as follows ......
    i had 3 sql statements . I need to execute only one sql which execution time is very less.
    Can any one help me , how to get query execution time without running that query and without using explain plan..?
    Thanks,
    Rajesh

    Kim Berg Hansen wrote:
    But you have ruled out explain plan for some reason, so I cannot help you.OP might get some answers if query was executed before - but since restart. Check V$SQL dynamic performance view for SQL_TEXT = your query. Then ROUND(ELAPSED_TIME / EXECUTIONS / 1000000) will give you average elapsed time.
    SY.
    Edited by: Solomon Yakobson on Apr 3, 2012 8:44 AM

  • How to get SharePoint Groups using Javascript in SP2013 ?

    How to get SharePoint Groups using Javascript in SP2013 , not JSOM please

    Here is the code that worked for me:
    <script type="text/javascript">
    var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups";
      var requestHeaders = { "accept" : "application/json;odata=verbose" };
      $.ajax({
        url : requestUri,
        contentType : "application/json;odata=verbose",
        headers : requestHeaders,
        success : onSuccess,
        error : onError
      function onSuccess(data, request){
    var s='';
     for (var i = 0; i < data.d.results.length; i++)
    s +=data.d.results[i].LoginName+'\n';
        alert(s);
     function onError(error) {
        alert("error");
    </script>

  • How to get the output format options of SAP QUERY

    Hi Gurus,
    I want to get the output options available for sapquery program.means when you execute the program "AQZZ/SAPQUERY/FDF1============" you will get output options like sap alv,display as table,wordprocessing  etc.
    i am not able to unsderstand the logic in that standard code.my requirement is after fetching the data from the database i want to provide the ouput options SAP ALV,DISPLAY AS TABLE,WORD PROCESSING,SPREAD SHEET,FILESTORE.
    I can output the data in SAP ALV and i can store the data.But i am not able to use the the remaining options in my program.please provide me solution.
    I am very much thankful to the people who can provide me the solution.

    Hi,
    If you have a query then go to transaction 'SQ01' . Then press the change button . Then u will able to see the Output Options.Their u can select the option what ever u want.

  • SELECT-OPTIONS - How to get the output other than of the mentioned range

    Hi Friends,
    I need the output in my ABAP Query to display entries out of the date range that I enter in the selection screen.
    Supose I enter Date: 1st Jan 09 to 15th Apr 09, I should get an output out of this range.
    How do I do that with select options ? what do I give in the date-option and date-sign, etc., ?
    Please help.
    Thanks,
    Dikshitha

    Hi,
    USe the following piece of code
    TYPE-POOLS : SCCR.
    DATA : g_optlist TYPE sscr_opt_list,
           g_*** TYPE sscr_***.
    INITIALIZATION.
      CLEAR g_***.
      g_***-kind    = 'S'.
      g_***-name    = 'S_USER'. "select-option field
      g_***-sg_main = 'I'. " this u can change to exclude ur values accordingly
      g_***-op_main = 'TEXT'.
      APPEND g_*** TO g_t_restrict-***_tab.
      g_optlist-name = 'TEXT'.
      g_optlist-options-ne = 'X'.
      g_optlist-options-eq = 'X'.
      APPEND g_optlist TO g_t_restrict-opt_list_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction            = g_t_restrict
        EXCEPTIONS
          too_late               = 1
          repeated               = 2
          selopt_without_options = 3
          selopt_without_signs   = 4
          invalid_sign           = 5
          empty_option_list      = 6
          invalid_kind           = 7
          repeated_kind_a        = 8
          OTHERS                 = 9.

  • One for the Tekkies: How to get this output using REGULAR EXPRESSIONS?

    How to get the below output using REGULAR EXPRESSIONS??
    SQL> ed
    Wrote file afiedt.buf
      1* CREATE TABLE cus___addresses    (full_address                   VARCHAR2(200 BYTE))
    SQL> /
    Table created.
    SQL> PROMPT Address Format is: House #/Housename,  street,  City, Zip Code, COUNTRY
    House #/Housename,  street,  City, Zip Code, COUNTRY
    SQL> INSERT INTO cus___addresses VALUES('1, 3rd street, Lansing, MI 49001, USA');
    1 row created.
    SQL> INSERT INTO cus___addresses VALUES('3B, fifth street, Clinton, OK 74103, USA');
    1 row created.
    SQL> INSERT INTO cus___addresses VALUES('Rose Villa, Stanton Grove, Murray, TN 37183, USA');
    1 row created.
    SQL> SELECT * FROM cus___addresses;
    FULL_ADDRESS
    1, 3rd street, Lansing, MI 49001, USA
    3B, fifth street, Clinton, OK 74103, USA
    Rose Villa, Stanton Grove, Murray, TN 37183, USA
    SQL> The REG EXP query shouLd output the ZIP codes: i.e. 49001, 74103, 37183 in 3 rows.Edited by: user12240205 on Jun 18, 2012 3:19 AM

    Hi,
    user12240205 wrote:
    ... Frank, ʃʃp's method, I understand. But your method, although correct, I find it difficult to understand.
    Could you explain how you did this?? What does '.*(\d{5})\D*' and '\1' mean???
    Your method is better because it uses only ONE reg expression function. ʃʃp's uses 2.In Oracle 10.2 (I believe) and higher, '\d' is equivalent to '[[:digit:]]', and '\D' is equivalent to '[^[:digit:]]'. I find '\d' and '\D' easier to type, but there's nothing wrong with using '[[:digit:]]' and '[^[:digit:]]'.
    '.*' means "0 or more of any character".
    '\D*' means "0 or more non-digits".
    The whole expression, '.*(\d{5})\D*' means:
    a. 0 or more characters (any characters)
    b. 5 digits
    c. 0 or more non-digits.
    '\1' is a Backreference . It means the sub-string that matched the pattern after the 1st '(', up to (but not including) its matching ')'. In this case, that means the sub-string that matched '\d{5}', or b. using the explanation immediately above.
    So the entire REGEXP_REPLACE call means "When you see a sub-string consisting of a., follwed immediately by b., followed immedately by c., replace that sub-string with b. alone."

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • How to get the output of a procedure in to a log file ?

    Hi, Everyone,
    Could you please tell me
    How do i write the output of a procedure to a log file ?
    Thanks in advance...

    Hi,
    could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
    my script file is
    EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
    i need the output of this statement in a log file.
    Could you please explain to me how it can be done.
    thanks in advance

  • How to get txt output in a column?

    Don't know and can't find anywhere, how to get output in a column in a dynamic textfield
    instead of getting the output i.e.
    output1, output2, output3, etc
    I would like to have it as
    output1
    output2
    output3
    but I don't know how to make returns in flash - in php /n
    can anyone answer my 'simple' question
    Thanx

    I solved it like this and it's working, but it seems silly, because I have 10 dynamic fields like this - I have tried /n to get all the outcome into 1 dynamicfield called total_txt but where and how do I put in /n?
            total_txt.text = Number(qty1_txt.text)+ " X " + "art 1"
            aAmount_txt.text = Number(qty1_txt.text)+ " X " + "art 1"
            bAmount_txt.text = Number(qty2_txt.text)+ " X " + "art 2"
            cAmount_txt.text = Number(qty3_txt.text)+ " X " + "art 3"
            dAmount_txt.text = Number(qty4_txt.text)+ " X " + "art4"
            eAmount_txt.text = Number(qty5_txt.text)+ " X " + "art5"
            aprice_txt.text =  Number(price1_txt.text) + ",- " +"  Euro's"
            bprice_txt.text =  Number(price2_txt.text) + ",- " +"  Euro's"
            cprice_txt.text =  Number(price3_txt.text) + ",- " +"  Euro's"
            kprice_txt.text =  Number(price4_txt.text) + ",- " +"  Euro's"
            eprice_txt.text =  Number(price5_txt.text) + ",- " +"  Euro's"

  • How to get Report Output in csv format

    Hi,
    How can i get report Output in csv format, can any one tell me the word used for output type to get output in csv format.
    i have used XLS output type but it opens in excel format.
    conc.addLayout(appCode,concReqCode,"en-US","US",XLS);
    Thanks
    Babu

    Hi Babu,
    Till now in xmlpublisher there is no method to create file in csv format ,you have to create Excel file and then save it in .csv format.Unless and until ur using BI Publisher in which some work around are possible.
    Thanks

Maybe you are looking for

  • J6480 wireless and network help please!

    I have an officejet J6480 that has an error in printing system when printing wireless.  Everything is configured correctly and my printer reads the router and connects.  If this problem cannot be fixed, can i use an ethernet connection directly from

  • Adobe Reader & Acrobat 6~9 Group Policy ADM file (only applied once?)

    Hi folks. I created the below ADM template last month based on some of the ones I have seen elsewhere. I import the ADM file to use with Group Policy and make the necessary settings (need to uncheck "Only show policy settings that can be fully manage

  • Getting audio to play in on my website in safari.

    I have a music website (for an artist). I have song samples on thew website. I am using html5 with the audio tag and java/jQuery. It all works great in firefox, and chrome, but won't load or play in safari. Anyone else having this problem?

  • Can anyone explain this code snippet

    I'm revising for my exams and this is one of the question that came up in the previous exams. Can someone help answe the questions at the end. Also what object is 'time_t' and how why do they use 'input_time -= 24*60*60;'? Read the following code car

  • Memory Cleaner causing error when backing up storm?

    So I've recently started using the memory cleaner on my bb storm.  I think it's causing my bb storm not to be able to back up on the desktop mananger.  Has this happened to anyone else or is there a different program I should be using to clean out th