How to display a javascript value in xml format

Hi,
I want to display this string that returns from javascript in jsp in xml format.Can anyone help me on this.
This is my code...I want to displat string jScriptCode in xml format.
<HTML>
<TITLE>test.jsp</TITLE>
<BODY>
<SCRIPT LANGUAGE="javascript">
<%
String jScriptCode = "<!-- \n";
jScriptCode=jScriptCode+ "var TE = new ActiveXObject(\"HostAccess.TerminalEmulation\"); ";
jScriptCode=jScriptCode+ "TE.MakeEntry(\"<FORMAT>OP/W*</FORMAT>\"); ";
jScriptCode=jScriptCode+ "var strTemp = TE.ResponseLine(0); ";
jScriptCode=jScriptCode+ "document.writeln(\"<CENTER>You are using \" + strTemp + \"</CENTER>\"); ";
jScriptCode=jScriptCode+ "TE.Close(); ";
jScriptCode=jScriptCode+ "var SD = new ActiveXObject(\"HostAccess.StructuredQuery\"); ";
jScriptCode=jScriptCode+ "var request = \"<FlightInfo_6_0><FltInfoMods><ItemAry><Item><DataBlkInd>F</DataBlkInd><FltQual><AirV>UA</AirV><StartCity>DEN</StartCity><EndCity>IAD</EndCity><FltNum>1532</FltNum><StartDt>20011201</StartDt></FltQual></Item></ItemAry></FltInfoMods></FlightInfo_6_0>\"; ";
jScriptCode=jScriptCode+ "var identity = \"<Application><VendorId>XMDL</VendorId><VendorType>G</VendorType><SourceId>GSLKPR</SourceId><SourceType>G</SourceType></Application><User><UserId>N92119</UserId><Pseudo>79G2</Pseudo></User>\"; ";
jScriptCode=jScriptCode+ "var response = SD.ExecuteXMLQuery(request, identity); ";
jScriptCode=jScriptCode+ "document.writeln(); ";
jScriptCode=jScriptCode+ "document.writeln(\"<CENTER>The current Date and Time in Denver is <B>\" + response + \"</B></CENTER>\"); ";
jScriptCode=jScriptCode+ "//-->";
//System.out.println(jScriptCode);
%>
</SCRIPT>
<%=jScriptCode%>
</BODY>
</HTML>
Thanks
Hitchchi

In jsp page set content type to text/xml
<%@ page contentType="text/xml" %>

Similar Messages

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to see the IDOC structure in XML format

    Hi, I am ver new to MII. I configured connection between SAPand SAP MII and IDOC is triggering in SAP MII. I can see the idoc triggered in Message monitor.
    Now my query is how to see the IDOC structure in XML format? I written a transaction where I am assigning transaction.xml to my Local.xml and trying to display with message action block. When I display the message I am getting message as below
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    There is no data in the xml, but in SAP side i seen data and segment which sent to MII as a IDOC. Please help me how to resolve this issue.

    Hi, Thanks for quick response.
    In Message monitor I seen the IDOC list after executing POIT transaction code in SAP.
    But the display button is disabled always in message monitor screen. I want to take this IDOC and save it in my SQL database. So I want to see this IDOC structure in XML format. Where i can see this structure?

  • Display Multiple Parameter Values in Specific Format

    In CR XI, I have a string parameter that allows single and multiple values.
    Values are Ward 1, Ward 2, Ward 3, Ward 4
    Iu2019m still a newbie at Crystal and canu2019t figure out how to display the parameter values in the report header in a specific way. Join({?ward},",") works fine to show the values selected, but the format is awkward.
    Would love to hear any suggestions on a formula that will display the parameter values in the header as follows:
    For a single parameter value:     Ward 1
    For two parameter values:     Wards 1 and 2
    For three parameter values:     Wards 1, 2 and 3
    If all four values are selected:     All Wards
    Hope I made my question clear, and thanks in advance!

    Thank you so much for your response; it does work, at least partially.Certainly is pointing me in the right direction.
    Is it possible to modify the case statement to add more arguments? I tried, but it didn't work correctly, although that is likely user error.
    For instance, if selecting a single value, it could any of the wards, not just Ward 1. And multiple values could be Wards 2 and 3, or Wards 1 and 4, or Wards 2, 3 and 4. There are at least a dozen different possibilities, and I need a formula  or case statement to account for all those possibilities.

  • How to write the oracle data as XML format. (.XML file)

    create or replace procedure pro(p_number )
    is
    cursor c1 is select *from emp where empno=p_number;
    v_file utl_file.file_type;
    begin
    v_file := utl_file.fopen('dirc','filename.txt','w');
    for i in c1 loop
    utl_file.put_line(v_file,i.ename || i.empno ||i.job);
    end loop;
    closef(v_file);
    end;
    Now my client want instead of .txt file he need .xml files
    File should contains xml tags. can any one help regarding this.. with one example.
    How to write the oracle data as XML format. (.XML file)

    hi,
    hope this example will do something....
    SQL> select employee_id, first_name, last_name, phone_number
    2 from employees where rownum < 6
    EMPLOYEE_ID FIRST_NAME LAST_NAME PHONE_NUMBER
    100 Steven King 515.123.4567
    101 Neena Kochhar 515.123.4568
    102 Lex De Haan 515.123.4569
    103 Alexander Hunold 590.423.4567
    104 Bruce Ernst 590.423.4568
    SQL> select dbms_xmlgen.getxml('select employee_id, first_name,
    2 last_name, phone_number from employees where rownum < 6') xml
    3 from dual;
    *<?xml version="1.0"?>*
    *<ROWSET>*
    *<ROW>*
    *<EMPLOYEE_ID>100</EMPLOYEE_ID>*
    *<FIRST_NAME>Steven</FIRST_NAME>*
    *<LAST_NAME>King</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4567</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>101</EMPLOYEE_ID>*
    *<FIRST_NAME>Neena</FIRST_NAME>*
    *<LAST_NAME>Kochhar</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4568</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>102</EMPLOYEE_ID>*
    *<FIRST_NAME>Lex</FIRST_NAME>*
    *<LAST_NAME>De Haan</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4569</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>103</EMPLOYEE_ID>*
    *<FIRST_NAME>Alexander</FIRST_NAME>*
    *<LAST_NAME>Hunold</LAST_NAME>*
    *<PHONE_NUMBER>590.423.4567</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>104</EMPLOYEE_ID>*
    *<FIRST_NAME>Bruce</FIRST_NAME>*
    *<LAST_NAME>Ernst</LAST_NAME>*
    *<PHONE_NUMBER>590.423.4568</PHONE_NUMBER>*
    *</ROW>*
    *</ROWSET>*
    ask if you want more assistance.
    thanks.

  • Module Pool for displaying the Grid values in Matrix format

    Hi Experts,
    I have one requirement which as follows,
    In Module pool program i need to display the Grid Values in Matrix format i.e,
    Row = Color
    Column = Size
    Like what we can see in Sales order or Purchase Order if you click Grid Entries Button.
    Can you Please Help me out.
    Thanks n Advance.
    Logu

    Hi
    the sources ate the function groups WMMB and WMMA.
    In a new release you should find the function module MGW_UTILITIES_MATRIX_SHELL_RA
    the report RWRFMATCHARVAL is a good example
    Regards
    Björn

  • Unable to display a variable value in xml through xsl using coldfusion

    Hi ColdFusion Heroes ,
    Is their any one to help me in this issue . I am new to cold
    fusion , XML and XSL .
    Detail Explaination :
    develoment_files.cfm is a .cfm page , which includes an xml
    page .
    development_files_dropdown.xsl is a xsl page .
    develoment_files.cfm : Code is as follows .
    <CFDIRECTORY ACTION="LIST" DIRECTORY="#somepath#"
    NAME="DirContents" FILTER="p*">
    <CFQUERY DBTYPE="query" NAME="Files">
    SELECT *
    FROM DirContents
    WHERE Type = 'File'
    </CFQUERY>
    <CFOUTPUT><?xml version='1.0' encoding='UTF-8'?>
    <?xml-stylesheet type="text/xsl"
    href="../XSL/development_files_dropdown.xsl"?>
    <Test xmlns:xsi='
    http://www.w3.org/2001/XMLSchema-instance'>
    <CFLOOP QUERY="Files">
    <Directory>
    <DisplayName>#Name#</DisplayName>
    <FullPath>#Name#</FullPath>
    </Directory>
    </cfloop>
    </Test></CFOUTPUT>
    This file generates a query resulting files starting with p*
    and then it should be a file and manipulates in xml.
    development_files_dropdown.xsl pages is as follows.
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="
    http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes"/>
    <xsl:preserve-space elements="*"/>
    <xsl:template match="/">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="Test">
    <B>Script Name: </B>
    <select name="T1_Dev_Script" CLASS="DevInput">
    <xsl:for-each select="Directory">
    <option>
    <xsl:attribute name="value">
    <xsl:value-of select="FullPath/text()"/>
    </xsl:attribute>
    <xsl:value-of select="DisplayName/text()"/>
    </option>
    </xsl:for-each>
    </select>
    </xsl:template>
    </xsl:stylesheet>
    This is only for the purpose of display .
    Now i want to get one particular file named "pfile" { Code is
    written in development_files.cfm page and kept it in a variable } I
    want to display it in #Name# filed. how can i do that ? I am
    getting XML Parsing error from javascript .
    Could any one look into this .
    Thanks & Regards,
    Nataraj G

    The first part is right -
    1) drag a text element onto the page, at a location in which you want the variable value to be displayed
    2) On the left hand bottom page - go to the web item properties for the text element
    3) scroll down to the specific properties for the item - in that uncheck the first two check boxes - display general text elements & display static filter values
    4) in the next item in the properties (List of text elements) click once on the box where List is written and then clcik on the small browse button that appears.
    5) in the window that opens, in the element type field, select variable/variable value as key (as per your requirement) and then under the element ID field type in the technical name of your variable that you want to display.
    click ok and save your template and try executing it.
    See if this solves your problem.
    regards,
    Nikhil

  • How to display a default value in BI Publisher

    Hello friends,
    I need to display a report based on supplier wise or dept wise stock.i've taken parameter type as menu and selecting the values from the drop down list for ex(1,2,3...)... what i want is I should display a default value like select item or something like that in drop down list so that any of the above said values are not shown to the reports user...
    Please let me know how...
    Thanks

    Hello vetsrini,
    thanks a lot for the reply... may be I'm not able to put my requiremet straight.. let me try one more time
    My requirement is like the end user has to get the report based on whether he want dept wise or supplier wise
    so
    where sl.supplier=:supp
    or d.dept_no=:dept
    this is what i've given in the data set
    the user gets report data based on either dept wise/supplier wise..
    so I've given query in lov as select distinct dept_no from dept and select distinct supplier from suppliers for the two parameters supp and dept and the type as menu...
    so I can see the values like (list of query generated values... ).. I want to do this thing like I want to display 'select' in that list...
    is it possible?... Please let me know, if possible..
    it should show like dept:select,101,102,103,104....)

  • How to display a variable value in WAD?

    I am using a replacement path variable to filter a report by project number. While this works fine, the project number is not easily visible (only via Filter -> Display All Filter Values and this only displays the description, not the key).
    How can I display the key and the description of the project number variable at the top of the report?
    Thank you,
    Dennis

    The first part is right -
    1) drag a text element onto the page, at a location in which you want the variable value to be displayed
    2) On the left hand bottom page - go to the web item properties for the text element
    3) scroll down to the specific properties for the item - in that uncheck the first two check boxes - display general text elements & display static filter values
    4) in the next item in the properties (List of text elements) click once on the box where List is written and then clcik on the small browse button that appears.
    5) in the window that opens, in the element type field, select variable/variable value as key (as per your requirement) and then under the element ID field type in the technical name of your variable that you want to display.
    click ok and save your template and try executing it.
    See if this solves your problem.
    regards,
    Nikhil

  • How to store the one value in XML to the datasource(standard extractor)?

    Hi experts,
    Do you have any ideas to store the value in XML to the internal table.Do you have the best prictice for Badi code to enhance the standard extractor?thank you.
    Best regards,
    Gavin

    Hi,
    Refer the foll. threads,
    The specified item was not found.
    How to convert XML file to an internal table ?
    Loading XML document into Internal Table
    Hope this helps.

  • How to display only Day value instead of DATE in Bex Report

    Hi Experts,
    We have a Month to date Report, in this report we need to display only day value instead of DATE value,
    Like
    if Date is 14.05.2010 we need to show only  14
    Regards,
    Chandra

    Hi ,
    Thanks for Quick Response
    we does have the option to create the char(calday or ...) value variable replacement with char (calday or ...) info object, we can  replace with Report r variable value only not with info object.
    i hope we can replace the with info object only with formula variable with replacement.
    My BEx Report is Designed like
    Columns
    0Calday
    Rows
    Plant
    Keyfigures
    Actual
    Plan
    Report output Looks like month to date
    0CALDAY            01.06.2010   02.06.2010  03.06.2010
    P1  ACTUAL            10                     8                    4
    P1  PLAN                 15                     6                    2
    P2  ACTUAL              5                   10                     7
    P2  PLAN                  4                      8                    3
    Report should be
    0CALDAY            1    2     3
    P1  ACTUAL      10     8      4
    P1  PLAN           15     6     2
    P2  ACTUAL        5    10    7
    P2  PLAN            4      8     3
    please let me know how can i achive this
    Regards
    Chandra

  • How to display top 10 values in a Webi report?

    Hi,
    I have the following requirement.
    If the report contains 'State' and 'Revenue' columns, I need to display top 10 cities with highest revenue and the revenue of the remaining cities can be summed together and should be available in a separate cell.
    I tried several formulae to achieve the requirement but was unsuccessful.
    I created a variable using the formula: '= If (Rank(<State> ,<Sales revenue>)>10 ) Then Sum(<Sales revenue>) Else 0' and added it as a column in the report. This provides the required results.
    When I add this variable as a column in the report, it displays 0 for the first top 10 values and only displays the remaining values. After that we can apply the Sum on this column to get the sum of the remaining (Other) sales revenue excluding top 10 values. However I cannot display this sum in a separate cell.
    Please provide some suggestions on this.
    Regards,
    Aditya Joshi

    Hi Aditya,
    Could you please try the following solutions to resolve the issue.
    Solution1:
    In Oracle, there is a function called: RANK() OVER (PARTITION BY () ORDER BY ()) which can be used to define an object at Universe level to return a rank position when used in a report. If you can check with your DBA - there is a similar function available for SQL Server. It should be RANK() OVER (ORDER BY colname) AS () FROM.
    Solution2:
    Or you can also try returning all rows in query, apply sort at report level & apply alerter to highlight the top 10 values.
    Regards,
    Sarbhjeet Kaur

  • How to Display Parent Form Values in Child Form

    Hi,
    I have Order Page and Item Page
    In the order Page If I select any Item and click on Submit Button, It should open Item Page and results should display in advance table region. In my Item page i have header region(Default double) with 3 fields (dummy) like
    Item
    Description
    org
    Now my question is I need to display the Item Value in the Item Page Header region in the Item Column which I was selecting in the Order Page.
    I have an order 100 with item A, B , C I select B and click on submit It should open Item Page and in items page i have a column called Item and the value B sholud be populated.
    Thanks,
    Mahesh

    Hello Ajay,
    Thanks for your reply..
    What Iam doing is Iam capturin the values in session variables like below when submit button is clicked
    pageContext.putSessionValue("SItemNo",ItemNo);
    And when my item page is opening I need to set this value to that VO Attribute..
    Iam trying the below way to set the attr value in PR
    String SItemNo=(String) pageContext.getSessionValue("SItemNo");
    OAMessageTextInputBean oa = (OAMessageTextInputBean)webBean.findChildRecursive("ItemNo");
    oa.setAttributeValue(SItemNo);
    But it is giving compilation error
    Error(35,9): method setAttributeValue(java.lang.String) not found in class oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean
    Please correct me ajay.
    Thanks,

  • How to display only Negative values in the report.....

    Hi,
    I want to display only negative values for one particular column.
    Any suggestions ?
    Thanks,
    Jeetu

    Hi,
    define a condition for all characteristics and for specially the keyfigure. Set it to < 0. That should do the trick.
    regards
    Siggi

Maybe you are looking for

  • How do I create a 5.1 surround droplet from Compressor?

    In the compressor manual it specifically suggests that the user create a droplet in order to automate the process of encoding and combining split surround files. "Assigning Files to Surround Sound Channels with Droplets You can further streamline the

  • Big time library trouble

    Help me out please.....having trouble with my iTunes library let me give a bit of background.... I just bought a new Samsung laptop....running windows 7. Previously, I was running iTunes on my old HP laptop, running WIndows XP. I backed up my iTunes

  • Problem when I tried to made a Reverse

    Dear Gurus, I had tried to do a Reverse in AR -> Receipts -> Receipts -> Reverse, but when I confirm de reverse I received this error message: "FRM-40501:ORACLE error:unable to reserve record for update and delete." Anyone knows why this error occurs

  • Question on setting mandatory field in sales order?

    Hi SAP Gurus, Hope all doing fine.I have a scenario like i have to put tax classification field mandatory in sales order, user must have to enter some value in the field before saving it.how to do it in standard sap? Regards chandu.

  • T431s - Microsoft Certificate / Key - where is it?

    Hi, just received my new T431s (which came preinstalled with Windows 7 Professional). I would like to reinstall the OS. The key is not printed somewhere on the machine. I hope :-) it's not under the battery (as the battery is not user replacible, I w