Getting returned XMLSERIALIZE information into an APEX variable...

((Application Express 4.1.1.00.23 11g)
So i have the following code:
with test_table as(
SELECT VM_REPORT_DATE,quantity,item from VM_CORE unpivot (
quantity fOR ITEM in (VM_HOSTS_NUM,VM_NUMBER,VM_PHYS_MEM,VM_VIRT_MEM,VM_CPU_COUNT,VM_TOTAL_DISK,VM_PROVISIONED_DISK)
) where VM_DCNAME='bc_production')
SELECT XMLSERIALIZE(CONTENT XMLELEMENT("SERIES",xmlAttributes(item as "name"),
  XMLAGG(XMLElement("point",xmlAttributes(VM_REPORT_DATE as "name",quantity as "y")))
)) as THEDATA from test_table group by item;
Which successfully returns:
THEDATA
<SERIES name="VM_CPU_COUNT"><point name="2013-10-29" y="1312"></point><point name="2013-10-23" y="1308"></point></SERIES>
<SERIES name="VM_HOSTS_NUM"><point name="2013-10-29" y="20"></point><point name="2013-10-23" y="22"></point></SERIES>
<SERIES name="VM_NUMBER"><point name="2013-10-29" y="617"></point><point name="2013-10-23" y="616"></point></SERIES>
<SERIES name="VM_PHYS_MEM"><point name="2013-10-29" y="4727.59"></point><point name="2013-10-23" y="5175.54"></point></SERIES>
<SERIES name="VM_PROVISIONED_DISK"><point name="2013-10-29" y="76307.65"></point><point name="2013-10-23" y="75848.3"></point></SERIES>
<SERIES name="VM_TOTAL_DISK"><point name="2013-10-29" y="95955"></point><point name="2013-10-23" y="93793.75"></point></SERIES>
<SERIES name="VM_VIRT_MEM"><point name="2013-10-29" y="3751.98"></point><point name="2013-10-23" y="3739.98"></point></SERIES>
This is going to be the heart of needing to set an APEX variable to the above data with <DATA></DATA> tags added around it.
What I'm unsure how to do is return the above with a PLSQL variable of chart_series_data.
chart_series_data := '<data>'||chr(10);
chart_series_data := chart_series_data ||  "WHAT I RETURNED ABOVE";
chart_series_data := chart_series_data||chr(10)||'</data>';
Thanks
Rob

Why not just doing it all in the query ?
with test_table as(
  select vm_report_date, quantity,item
  from vm_core
  unpivot (
    quantity for item in (vm_hosts_num, vm_number, vm_phys_mem, vm_virt_mem, vm_cpu_count, vm_total_disk, vm_provisioned_disk)
  ) where vm_dcname = 'bc_production'
select xmlserialize(document
         xmlelement("DATA"
         , xmlagg(
             xmlelement("SERIES"
             , xmlattributes(item as "name")
             , xmlagg(
                 xmlelement("point"
                 , xmlattributes(
                     vm_report_date as "name"
                   , quantity as "y"
       ) as XMLDATA
from test_table
group by item ;

Similar Messages

  • Has anyone managed to get HP Warranty Information into SCCM?

    Has anyone managed to get HP Warranty Information into SCCM?
    I have tried a few scripts that I found on the net but none of them seem to work as I believe HP updated there site this year..

    OK, I played around a bit (scripting from a web page isn't way beyond me) but... a few caveats.  My lab isn't available right now; so all I could test was that the script ran on an HP laptop.  A single HP laptop.  and created the regkeys in
    (in my case) HKLM\software\wow6432node\CompanyName\WarrantyInformation.  So... one single test on one single workstation, and no testing of the mof edit means... I'll need your help to confirm it works.
    Anyway, below is the script.  Other caveats:  It drops a log, and then continuously adds to the log file in %temp% (of the SYSTEM, which is using %windir%\temp).  So depending upon what you want/need--you may want to change the EnableLogging
    = True to EnableLogging = False (once you confirm it works on all/most of your boxes).  The other caveat, of course, is to change the sCompanyname = to be your Company Name; although I suggest you don't have spaces or special characters in it.  Short
    'n' sweet.  Then, naturally, once you have a box with the regkeys, use Mark Cochrane's RegKeytoMof 3.0 or higher to build the mof edits for you to paste to the bottom of your configuration.mof and sms_def.mof.  In that blog above Eric Schloss was
    using DCM as the delivery method to deliver the script to populate the regkeys--that worked for him and I see no reason it wouldn't work for everyone--so once you've tested the script interactively from a psexec -s -i cmd.exe shell on an hp box (to see it
    create the regkeys) I'd make a DCM like Eric did and target a collection with a few HP laptops or desktops and confirm it works via the DCM. 
    Anyway, give this a try--again... only tested on 1 single, lonely little HP laptop.  Needs a bigger test base!
    Edit:  and... even using Regkeytomof sometimes regkeys can be tricky.  If the mof edit doesn't work right to pull the data back, post what you've added.  someone here can usually spot if there's something not right about it and help you fix
    the mof edit.
    Edit #2: removed bad space, and bad copy/paste job as discovered by sevengs.  Thanks!
    on error resume next
    EnableLogging = True
    sCompanyName = "CompanyName"
    Set oShell = CreateObject("wscript.Shell")
    Set fso = CreateObject("scripting.filesystemobject")
    strTemp = oshell.ExpandEnvironmentStrings("%temp%")
    If EnableLogging Then
    Set oLogFile = fso.OpenTextFile(strTemp & "\WarrantyInfo.log", 8, True)
    oLogFile.WriteLine "*********************************************************"
    End If
    WriteLog "Beginning warranty information lookup."
    sWebServiceHost = "http://h20000.www2.hp.com/bizsupport/TechSupport"
    sWebServiceURL = "WarrantyResults.jsp"
    sWebService = sWebServiceHost & "/" & sWebServiceURL
    'Get the system's serial number from WMI
    Set oWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colItems = oWMIService.ExecQuery("Select SerialNumber from Win32_BIOS",,48)
    For Each objItem in colItems
    sSerialNumber = objItem.SerialNumber
    Next
    WriteLog "Serial number of system is " & sSerialNumber
    'Get the Product ID from WMI
    Const wbemFlagReturnImmediately = 16
    Const wbemFlagForwardOnly = 32
    lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
    strService = "winmgmts:{impersonationlevel=impersonate}//./root/HP/InstrumentedBIOS"
    strQuery = "select * from HP_BIOSSetting"
    Set objWMIService = GetObject(strService)
    Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
    sProductNumber = ""
    For Each objItem In colItems
    If objItem.Name = "SKU Number" Then
    sProductNumber = objItem.Value
    End If
    If objItem.Name = "Product Number" Then
    sProductNumber = objItem.Value
    End If
    Next
    If Len(sProductNumber) = 0 Then
    WriteLog "ERROR: Product Number could not be determined."
    oLogFile.WriteLine "*********************************************************"
    oLogFile.Close
    WScript.Quit(9)
    Else
    WriteLog "Product number of the system is " & sProductNumber
    End If
    Set colItems = oWMIService.ExecQuery("Select AddressWidth from Win32_Processor",,48)
    For Each objItem in colItems
    sAddressWidth = objItem.AddressWidth
    Next
    WriteLog "Operating system is " & sAddressWidth & " bit."
    'Define the parameters string to send to the web site
    sParameters = "nickname=&sn=" & sSerialNumber & "&country=US&lang=en&cc=us&pn=" & sProductNumber & "&find=Display+Warranty+Information+%C2%BB&"
    WriteLog "Opening the web site URL " & sWebService & "?" & sParameters
    'Define and call the web site
    Set oHTTP = CreateObject("Microsoft.xmlhttp")
    oHTTP.open "GET", sWebService & "?" & sParameters, False
    'oHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    oHTTP.send
    If oHTTP.Status = 200 Then
    WriteLog "Successful response from the web site."
    'WriteLog oHTTP.ResponseText
    Process oHTTP.ResponseText
    Else
    WriteLog "ERROR: the web site returned status code " & oHTTP.Status
    WriteLog "Returning exit code 1."
    nExitCode = 1
    End If
    If EnableLogging Then
    oLogFile.WriteLine "*********************************************************"
    oLogFile.Close
    End If
    WScript.Quit (nExitCode)
    Function Process (HTML)
    WriteLog "Processing the HTML returned from the site."
    intSummaryPos = InStr(LCase(html), "serial number")
    If intSummaryPos = 0 Then
    Process = ""
    Exit Function
    End If
    intSummaryTable1Start = InStrRev(LCase(html), "<table", intSummaryPos)
    intSummaryTable1End = InStr(intSummaryPos, LCase(html), "</table>") + 8
    intSummaryTable2Start = InStr(intSummaryTable1End, LCase(html), "<table")
    intSummaryTable2End = InStr(intSummaryTable2Start, LCase(html), "</table>")
    table1 = getStr(intSummaryTable1Start, intSummaryTable1End, html)
    table2 = getStr(intSummaryTable2Start, intSummaryTable2End, html)
    const HKLM = &H80000002
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    sKeyPath = "SOFTWARE\" & sCompanyName & "\WarrantyInformation"
    WriteLog "Registry key path is HKLM\" & sKeyPath
    oReg.CreateKey HKLM,sKeyPath
    WriteLog "Processing the first table from the web page."
    arrGeneral = processTables(table1,1)
    'arrGeneal should be in the form Serial Number, Product Number, Product Line, Product Description, Warranty Check Date
    WriteLog "Processing the second table from the web page."
    arrContracts = processTables(table2,2)
    'arrContracts should be in the format Warranty Type, HW Warrenty Start Date, HW Warranty End Date, HW Warranty Status, Setup Warranty Start Date, Setup Warranty End Date, Setup Warranty Status
    WriteLog "Setting registry values."
    WriteLog "SerialNumber is " & arrGeneral(0)
    oReg.SetStringValue HKLM, sKeyPath, "SerialNumber", arrGeneral(0)
    WriteLog "ProductNumber is " & arrGeneral(1)
    oReg.SetStringValue HKLM, sKeyPath, "ProductNumber", arrGeneral(1)
    WriteLog "SerialLine is " & arrGeneral(2)
    oReg.SetStringValue HKLM, sKeyPath, "ProductLine", arrGeneral(2)
    WriteLog "SerialDescription is " & arrGeneral(3)
    oReg.SetStringValue HKLM, sKeyPath, "ProductDescription", arrGeneral(3)
    WriteLog "WarrantyCheckDate is " & CStr(CDate(arrGeneral(4)))
    oReg.SetStringValue HKLM, sKeyPath, "WarrantyCheckDate", CStr(CDate(arrGeneral(4)))
    WriteLog "WarrantyType is " & arrContracts(0)
    oReg.SetStringValue HKLM, sKeyPath, "WarrantyType", arrContracts(0)
    WriteLog arrContracts(1)
    WriteLog "HardwareWarrantyStartDate is " & CStr(CDate(arrContracts(1)))
    oReg.SetStringValue HKLM, sKeyPath, "HardwareWarrantyStartDate", CStr(CDate(arrContracts(1)))
    WriteLog "HardwareWarrantyEndDate is " & CStr(CDate(arrContracts(2)))
    oReg.SetStringValue HKLM, sKeyPath, "HardwareWarrantyEndDate", CStr(CDate(arrContracts(2)))
    End Function
    Function getStr(startpos, endpos, data)
    Dim tmp
    'Get the substring
    tmp = Mid(data, startpos, endpos - startpos)
    ' Remove end of line
    tmp = Replace(Replace(Replace(tmp, VbCrLf, ""), vbCr, ""), vbLf, "")
    getStr = tmp
    End Function
    Function processTables(table, ttype)
    ' Remove HTML Tags and replace with "|"
    Set re = New RegExp
    re.Pattern = "<[^>]+>"
    re.IgnoreCase = True
    re.Global = True
    table = re.Replace(table, "|")
    table = Replace(table, "&nbsp;", "")
    table = Replace(table, ":", "")
    table = Replace(table, " ", "")
    ' Remove excess |
    re.Pattern = "[|]+"
    table = re.Replace(table, "|")
    ' Clean up a bit more
    re.Pattern = "\|\s+\|"
    table = re.Replace(table, "|")
    ' Remove | from start and end of string
    re.Pattern = "^\||\|$"
    table = re.Replace(table, "")
    arrTable = Split(table, "|")
    arrTmp = ""
    If ttype = 1 Then ' General Info Table
    i = 1
    For Each cell in arrTable
    Select Case LCase(Trim(cell))
    Case "serial number"
    sSerialNumber = arrTable(i)
    Case "product number"
    sProductNumber = arrTable(i)
    Case "product line"
    sProductLine = arrTable(i)
    Case "product description"
    sProductDescription = arrTable(i)
    Case "date of warranty check"
    sCheckDate = arrTable(i)
    End Select
    i = i + 1
    Next
    arrTmp = sSerialNumber & "|" & sProductNumber & "|" & sProductLine & "|" & sProductDescription & "|" & sCheckDate
    ElseIf ttype = 2 Then ' Contract Info
    i = 0
    For Each cell in arrTable
    cell = Replace(cell," ","")
    if Instr(lcase(trim(cell)),"wty hp hw maintenance onsite support") > 0 then
    cell = "wty hp hw maintenance onsite support"
    end if
    if Instr(lcase(trim(cell)),"wty hp hw maintenance offsite support") > 0 then
    cell = "wty hp hw maintenance offsite support"
    end if
    if Instr(lcase(trim(cell)),"wty hp support for initial setup") > 0 then
    cell = "wty hp support for initial setup"
    end if
    Select Case LCase(Trim(cell))
    Case "warranty type"
    sWarrantyType = arrTable(i+8)
    Case "wty hp hw maintenance onsite support"
    sHWStartDate = arrTable(i+1)
    sHWEndDate = arrTable(i+2)
                        sHWStatus = arrTable(i+3)
    Case "wty hp hw maintenance offsite support"
    sHWStartDate = arrTable(i+1)
    sHWEndDate = arrTable(i+2)
    sHWStatus = arrTable(i+3)
    Case "wty hp support for initial setup"
    sISStartDate = arrTable(i+1)
    sISEndDate = arrTable(i+2)
    sISStatus = arrTable(i+3)
    case else
    End Select
    i = i + 1
    Next
    arrTmp = sWarrantyType & "|" & sHWStartDate & "|" & sHWEndDate & "|" & sHWStatus & "|" & sISStartDate & "|" & sISEndDate & "|" & sISStatus
    End If
    ' Remove | from start and end of string
    re.Pattern = "^\||\|$"
    arrTmp = re.Replace(arrTmp, "")
    'wscript.echo arrTmp
    arrResult = Split(arrTmp, "|")
    Set re = Nothing
    processTables = arrResult
    End Function
    Function WriteLog (sText)
    If EnableLogging Then
    oLogfile.WriteLine Now() & " " & sText
    End If
    End Function
    Standardize. Simplify. Automate.

  • How to execute a function and return the result into a bind variable

    Hi,
    I am trying to calculate the sum of salaries of all persons with a particular JOB_ID using a function TOTAL_INCOME(v_job_id).
    create or replace function total_income
    +(v_job_id IN varchar2)+
    RETURN number IS
    v_total number(6);
    cursor get_sal is
    select salary from employees
    where job_id = v_job_id;
    BEGIN
    v_total := 0;
    for emp in get_sal
    loop
    v_total := v_total emp.salary;+
    end loop;
    dbms_output.put_line('Total salary of '||v_job_id||' is: '|| v_total);
    return v_total;
    END;
    Now I woud like to execute this function and assign the returned value into a bind variable test_sal
    variable test_sal number(6)
    SELECT total_income('AD_VP') into :test_sal FROM DUAL;
    dbms_output.put_line('Total Sal:'||:test_sal);
    This is returning the below errors:
    SELECT total_income('AD_VP') into :test_sal FROM DUAL
    *+
    Error at line 0
    ORA-01036: illegal variable name/number
    dbms_output.put_line('Total Sal:'||:test_sal);
    Error at line 3
    ORA-00900: invalid SQL statement
    Could someone help me what could be the problem?? Thanks for your time...

    Dear,
    If everything you will do will be done inside PL/SQL (stored procedure or stored function) then you don't have to care about bind variable.
    When using PL/SQL (static SQL) you will never encounter issues related to bind variables. PL/SQL itself takes care of your code and uses bind variables behind the scene.
    The only situation where you have to look carefully to the use of bind variables within PL/SQL is when you use Dynamic sql into stored procedures or functions.
    So, see in the light of the above comment, if you have to care about returning your function into a bind variable?
    Best regards
    Mohamed Houri

  • Get the file name into a Odi variable

    Hi,
    I need to get the file name into odi variable like ..A/ETC/file.txt
    For eg.the filename file.txt should get store in a variable.
    Then i want to compare the file name stored in the variable with some other value.
    Please suggest.
    Thanks.

    in package,
    declare the variable, then evaluate it with another variable, generally using # syntax
    if the variable is date type, suggest to use : syntax, because # will treat the variable value as text value
    in loadplan
    use case when syntax,

  • How to map the method action return value directly into screen using variables?

    Hi,
    My JDev version is 11.1.1.6.3.
    I have a 'MethodAction' defined in PageDef file, that goes to model layer and return String value. As this needs to be executed during initializing of pageDef, I have also added an 'InvokeAction' for that.
    <executables>
               <invokeAction id="invokeSayHelloId" Refresh="ifNeeded"
                                    Binds="sayHello"/>
               <variableIterator id="variables">
                    <variable Name="Name" Type="java.lang.String"/>
               </variableIterator>
    </executables>
    <bindings>
              <methodAction id="sayHello" InstanceName="HrAMDataControl.dataProvider"
                                     DataControl="HrAMDataControl" RequiresUpdateModel="true"
                                     Action="invokeMethod" MethodName="sayHello"
                                     IsViewObjectMethod="false"
                                     ReturnName="data.HrAMDataControl.methodResults.sayHello_HrAMDataControl_dataProvider_sayHello_result">
                                        <NamedData NDName="pName" NDValue="Michael John" NDType="java.lang.String"/>
             </methodAction>
    </bindings?
    Requirement:
    I want to map the return value of this method action directly into screen by making use of PageDef variables.
    Question:
    I. I need to know how to map this return value direcly as exprssion against PageDef variable.
    2. If Question 1 is achievable, assuming the method action returls List instead of String (I know well it returns 2 items), can I map the 1st Item against Variable 1 and 2nd Item against Variable 2 directly?
    Thanks in Advance.
    Ragu

    Thanks Frank, but If I directly map the MethodAction's result to UI, there are chances where it might get executed whenever I refresh the UIComponent (UIComponent to which the methodAction result is mapped. Isn't so??). Instead, If I invoke the MethodAction using InvokeAction, I can get the control on when it should get invoked (using RefreshCondition). If I assign the variable to UIComponent (Assume I've mapped the method action result to variable using expression), refreshing of UIComponent will not cause any performance issue I feel.
    Correct me If I am wrong.

  • How to get Requester Login information into the request dataset validator

    Friends,
    I need to check whether the requester is part of a group or not before submitting the request. If not I need to throw an error.
    Can you please let me know how to get Requester information.login into the request validator?

    Hi Thiago,
    I am getting the requester id from the requestData in the request data validator. Here is my full code for your reference.
    Bikash - I even tried with RoleManager service but still same error.
    public void validate(RequestData requestData)
    throws InvalidRequestDataException {
    tcUserOperationsIntf UserOppsIntf =Platform.getService(tcUserOperationsIntf.class);
    try
    tcResultSet result=UserOppsIntf.getSelfProfile();
    result.goToRow(0);
    String requesterID = result.getStringValue("Users.User ID");
    String userKey=result.getStringValue("Users.Key");
    System.out.println("Request Login:"+requesterID);
    if (isMemeber(getOIMGroupKey("testGroup"),userKey))
    System.out.println(requesterID+" is a Member");
    else
    System.out.println(requesterID+" is not a Member");
    String reason = "Note[REQUEST_SUBMISSION_ERROR].text:You are not authorized to submit this request.";
    throw new InvalidRequestDataException(reason);
    catch(Exception e) {
    e.printStackTrace();
    private String getOIMGroupKey(String GroupName) throws Exception
    String groupKey="";
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    HashMap searchFor = new HashMap();
    searchFor.put("Groups.Group Name", GroupName);
    tcResultSet results = groupInstanceOps.findGroups(searchFor);
    for (int i = 0; i < results.getRowCount(); i++) {
    results.goToRow(i);
    groupKey = Long.toString(results.getLongValue("Groups.Key"));
    System.out.println("GroupKey:"+groupKey);
    return groupKey;
    private boolean isMemeber(String groupKey,String userKey) throws Exception
    boolean member=false;
    try
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    long grpLong = Long.parseLong(groupKey.trim());
    tcResultSet grpResultSet = groupInstanceOps.getAllMembers(grpLong);
    for(int i=0;i<grpResultSet.getRowCount();i++)
    grpResultSet.goToRow(i);
    long usrKeygrp = grpResultSet.getLongValue("Users.Key");
    if (usrKeygrp==Long.valueOf(userKey))
    member=true;
    break;
    catch(Exception e) {
    e.printStackTrace();
    member=false;
    return member;
    }

  • What's the best way to use QR codes to get v-card information into iphone contacts?

    I want to put contact/v-card information onto a business card with a QR code. I'm finding that the iphone won't accept v-cards natively, that I have to set up the QR code to go to a URL, which tells the scanner that if they enter their email address, it will email them my v-card. This defeats the purpose of putting a qr code on a business card - to scan it directly into contacts.  What is the workaround?

    I'll try to help a bit.
    ITunes match space is different to icloud space. With iTunes match you get storage for 25,000 non iTunes purchased tracks and other than a limit for individual file size, there is no memory limit.
    You can turn match on individuallyon each device (I have it turned off on my iPod but turned on on my iPad and iPhone). When you turn it on then you get access to all the tracks, and in my experience any playlists I create have transferred over very well. I understand that some people have had trouble with playlists though.
    I'm not quite clear with exactly what you mean regarding cleaning up your library, but be careful about using Match for this. There is no guarantee that matched songs will be exactly the same version as your own copy, due to some mismatches, so you could find some problems there. Personall, I am cleaning up my library before matching, but I am rather particular about keeping my library the way I want it. If you aren't as fussed then match could be the answer.
    Hope that helped.

  • Can i get my ipod information into itunes?

    so everything was going great until one day i opened up itunes and my entire library was gone! so then i plugged in my ipod, which still had all my songs and playlists and whatnot on it, and it said that my ipod was connected to another ituned, but it isnt...so im thinking that maybe i need to find a way to get everything from my ipod itunes.
    otherwise id really like to know where all my music went missing...

    First, try Importing Your playlist (see http://docs.info.apple.com/article.html?artnum=93763)
    Your Playlist should be in the My Music folder.
    If that doesn't work, you can get all your iPod music into iTunes with this procedure:
    http://www.cnet.com/4520-7899_1-6477981-1.html

  • Need to get select result into a shell variable.

    Hi,
    I want to get below command output into a OS variable. Which will be used later in the shell script. Can you please advice how to go about it?
    VAR v_tool_execution_id NUMBER;
    EXEC :v_tool_execution_id := trcanlzr.trca$p.get_tool_execution_id;
    SELECT TO_CHAR(:v_tool_execution_id) tool_execution_id FROM DUAL;
    I can't do following
    VAR1=`sqlplus -s $unpwd <<EOF
    VAR v_tool_execution_id NUMBER;
    EXEC :v_tool_execution_id := trcanlzr.trca$p.get_tool_execution_id;
    SELECT TO_CHAR(:v_tool_execution_id) tool_execution_id FROM DUAL;
    EOF`
    Since tool execution is specific to session and exiting will not server my purpose since i need to run another command which generates a file name using tool execution id.
    Thanks for your time.
    Regards,
    Nagendra Chillale

    Actually the idea is the same. Instead of getting the variable into a shell script, call the shell script which use the variable from sqlplus. I attempted to include the line to call a shell script but had a mistake :P
    The last line should be
    SQL> host /path/to/second/part.sh &exec_idAnother way is to spool the variable into a file, then read the file into a variable in your shell script. You need to use head / tail command to extract the desired row, because Oracle adds blank lines, headers, etc in its spool output
    In your SQL script
    SQL> spool tool_execution_id.txt
    SQL> SELECT TO_CHAR(:v_tool_execution_id) tool_execution_id into :vtemp FROM DUAL;
    SQL> spool offIn your shell script (the desired line appeared in the second last line in my case)
    tool_execution_id=`tail -2 tool_execution_id.txt|head -1`
    echo $tool_execution_idEdited by: thtsang on Mar 30, 2010 11:43 AM

  • Without using applets geting the output into a javascript variable

    Hi,
    I'm not using executeCommand applets in my webpage,but with the url
    i'm running the transaction. I'm passing the url to iframe as a <b>src</b> in the same page itself. like
    <b>document.getElementById("<iframe>").src="http://localhost/Lighthammer/Runner?Transaction=<Transaction_Name>&<Input_params>=<value>&OutputParameter=*"</b>. It will take 10 seconds to execute the transaction and load into the iframe.
    So I'm giving the
    <b>SetTimeout("alert(document.getElementById('<iframe>').docuemnt.body.innerHTML",10000);</b>
    In the iframe i'm able to see the output as "<u>oktransaction executed</u>" in <u>xml format</u>.
    But in the alert I'm not able to see the same content. <i>In the alert I'm able to see</i>
    <u><iframe id="<id of iframe>" src="<Which i set in the script>"></iframe></u>
    Help me to get the OutputParameter value into a javascript variable.

    Rakesh,
    A couple of observations:
    1.  Why are you calling Runner directly?  You should be using an XacuteQuery template, and reference "/Lighthammer/Illuminator?QueryTemplate=Folder/TRX" syntax when changing the URL in the iFrame.
    2.  You are also using "localhost" which is not portable and may also be causing your problem since your parent page will be based upon the server path, whereas you are forcing the browser to load localhost content into the iFrame (which unless you are physically sitting on the xMII server itself will never work).
    Regards,
    Jeremy Good

  • When I input song information into "get info" for each of my songs, some do not save when I close my Itunes. When I click on the song the correct info pops back up.Why?

    When I input song information into "get info" for each of my songs, some do not save when I close my Itunes. When I click on the song the correct info pops back up.Why?

    I ran into the same problem, I think that, If you tab on a song that is on your IPOD, and the song data is grayed-out, I think it means that the song is probably twice on your IPOD and that the iTunes directory can not edit THAT song data for two (or more) files @once. Check if this is the case, sinceI have the same problem,am looking for a way to have One and the same song in more playlists but only keep the song once on the IPOD.

  • Get value of formula variable during query runtime into a text variable

    Hi all,
    I wanna get the value of the formula variables during the query runtime into a text variable.
    My scenario is like this: First I defined a formula variable Z_DATE_3 which is processing by replacement. It will get the day of a characteristcs(Startdate).
    Then I defined a text variable and in the function module related to this text variable, I used the parameter I_T_VAR_RANGE which can store the value of formula variable during the query runtime.So I can read the value from this table in my function module.
    But I have a issue, when I run the query which used the defined text variable, it seems that it doesn't call the corresponding function module. Because I set a breadpoint in hte code and it never reach this breakpoint.
    If I removed the parameter I_T_VAR_RANGE , it can enter the function module.
    So could you please give some advice?
    Is my solution correct or not?
    And what's wrong with the parameter I_T_VAR_RANGE? Did I use it correctly?
    And My code is:
    DATA:  l_s_range_v TYPE rrrangeexit,
                 l_day type sy-datum.
    if i_step <> 2.
    raise no_processing.
    endif.
      READ TABLE i_t_var_range INTO l_s_range_v
         WITH KEY  vnam = 'Z_DATE_3'.
    if sy-subrc = 0.
         l_day = l_s_range_v-low.
    endif.
    Thanks in advance!
    Best regards
    Fanchest

    Hi, Fanchest,
    I'm having just the same issue.  Did you find a solution?
    I wrote a short routine in CMOD to derive the value of a formula variable to a text variable, but it's not working (I don't get any value).  Can you share your solution?
    Thanks in advance,
    LL

  • JSP/BC4J app: How to get view object row data into a scriplet variable?

    I have a JSP application using BC4J data tags. Within a rowsetiterate tag, how can I get the data value of an attribute for the current row into a scriplet variable?
    Thanks,
    Steve

    Using the <jbo:Row> tag like this:
      <jbo:RowsetIterate .... >
        <%--
         | Establish a scriptable variable "curRow" for the current row
         +-->
        <jbo:Row id="curRow" action="current"/>
        <%
          String foo = (String)curRow.getAttribute("YourAttrName");
        %>

  • How do I get sdo_point into C host variables from OTT structures?

    How do I get sdo_point info into C host variables from structures generated by OTT?
    Databse Version 10.1.0
    I am using OTT to generate C structures for the Oracle Spatial datatype sdo_geometry. The file is generated as
    #ifndef GEOMETRY_ORACLE
    # define GEOMETRY_ORACLE
    #ifndef OCI_ORACLE
    # include <oci.h>
    #endif
    typedef OCIRef sdo_geometry_ref;
    typedef OCIRef sdo_point_type_ref;
    typedef OCIArray sdo_elem_info_array;
    typedef OCIArray sdo_ordinate_array;
    struct sdo_point_type
    OCINumber x;
    OCINumber y;
    OCINumber z;
    typedef struct sdo_point_type sdo_point_type;
    struct sdo_point_type_ind
    OCIInd _atomic;
    OCIInd x;
    OCIInd y;
    OCIInd z;
    typedef struct sdo_point_type_ind sdo_point_type_ind;
    struct sdo_geometry
    OCINumber sdo_gtype;
    OCINumber sdo_srid;
    struct sdo_point_type sdo_point;
    sdo_elem_info_array * sdo_elem_info;
    sdo_ordinate_array * sdo_ordinates;
    typedef struct sdo_geometry sdo_geometry;
    struct sdo_geometry_ind
    OCIInd _atomic;
    OCIInd sdo_gtype;
    OCIInd sdo_srid;
    struct sdo_point_type_ind sdo_point;
    OCIInd sdo_elem_info;
    OCIInd sdo_ordinates;
    typedef struct sdo_geometry_ind sdo_geometry_ind;
    #endif
    I can successfully access the sdo_gtype and sdo_ordinates using the following ProC code
    exec sql begin declare section;
    int sptype;
    double coord[100000];
    sdo_geometry *spgeom;
    sdo_ordinate_array *spcoords;
    exec sql end declare section;
    /* allocate memory for the geometry host variable */
    exec sql allocate :spgeom;
    select bounds into :spgeom from boundary;
    /* retrieve the geometry type from the geometry host variable into a host variable */
    exec sql object get sdo_gtype from :spgeom into :sptype;
    /* allocate memory for the sdo_ordinate_array host variable */
    exec sql allocate :spcoords;
    /* move the coordinates from the geometry host variable into the sdo_ordinate_array host variable */
    exec sql object get sdo_ordinates from :spgeom into :spcoords;
    /* determine the number of coordinates */
    exec sql collection describe :spcoords get size into :numord;
    /* move the coordinates from the sdo_ordinate_array host variable into a host array */
    exec sql for :numord collection get :spcoords into :coord;
    I cannot, however, figure out how to get point data out of the host variable spgeom. If I prepare code analagous to the other types in the geometry structure, I get an error. I can see that sdo_point is different because it is a struct within the geometry definiton of typedef OCIRef but my knowledge of C is sufficeintly weak that I cannot figure out how to get sdo_point into C host variables. Some sample code for getting the sdo_point data would be greatly appeciated.
    Thanks, Chris

    To get point data from geometry column use following
    select a.location.sdo_point.x, a.geometrycolumn.sdo_point.y
    from tablename a;
    Do not forget to alias the table.

  • I plugged my iphone into my computer but now my iphone looks just like my ipod!! all of my information is gone and i just got my phone so i have yet to back it up. how do i get my phone information back on my phone

    I need help I do not know how to get my phone back to phone setting it is now set up like my ipod and i do not know why or how it got there

    Your title asks "How do I get my iPhone information back on my (iPhone)?
    You also said "I have yet to back it up."  Therefore, all your information that had been on your iPhone is now gone.
    Your iPhone has (and will continue to) been refreshed from iTunes.

Maybe you are looking for

  • Corrupted User Accounts in Windows Vista 64 Home Premium?

    ***FYI I'm using my desktop. Toshiba Satellite L305-S5908 Model #: PSLB8U-05202F Windows Vista 64 So just today, I had accidently dropped my laptop. I was logged into my user account, and it completely froze a few moments after. I had to reboot it, a

  • Camera RAW image support for Pentax K100D

    Hi, Firstly, let me just say I have a MacBook Pro which came preloaded with Tiger. A month or so ago I upgraded to Leopard and I have applied all the available Apple software update. I recently got a Pentax K100D digital SLR camera capable of taking

  • Anyobe ever hook their ibook up to a widescreen lcd hdtv/monitor?

    i just got a sharp aquos 32" hdtv monitor. i have a s-video output cable for my ibook and i want to hook it up to the tv. i know it won't display 720/1080 but will it look good? will my ibook display a resolution suitable for a 32" widescreen as if i

  • Siebel Gateway Name Server configuration error

    Hi, I installed Siebel 8.1.1.10 in Oracle Enterprise Linux 5.9. And use following command lines to configure Siebel Gateway Name Server. /opt/siebel/8.1.1.0.0/ses/gtwysrvr/cfgenv.sh /opt/siebel/8.1.1.0.0/ses/config/config.sh -mode enterprise After so

  • Webservice call from outlook

    Hi, I need your suggestions on web services call from outlook. I have a requirement like where user will send a mail from outlook and it should trigger web-service in SAP. Also i dont want this webservice to be exposed for internet since both exchang