XML output summary information how to print only once ? ( oracle 9.2 db )

Hi,
I am having following SQL
select xmlelement("Emp",
xmlforest('testing' "Type"),
xmlagg(xmlelement("Transaction", xmlforest(empno "Number",
ename "Name",
sal "Sal")
.extract('/*')
from emp, ( select count(*) totcount, sum(sal) totsal
from emp ) x1
It is giving me following output
<Emp>
<Type>testing</Type>
<Transaction>
<Number>7369</Number>
<Name>SMITH</Name>
<Sal>800</Sal>
</Transaction>
<Transaction>
<Number>7499</Number>
<Name>ALLEN</Name>
<Sal>1600</Sal>
</Transaction>
I want to print totcount, totalsalary ...etc at starting of XML output
My Desired output
<Emp>
<Type>testing</Type>
<Recs>10</Recs> =>
<TotSal>10000</TotSal> =>
<Transaction>
<Number>7369</Number>
<Name>SMITH</Name>
<Sal>800</Sal>
</Transaction>
<Transaction>
<Number>7499</Number>
<Name>ALLEN</Name>
<Sal>1600</Sal>
</Transaction>
How to do this ? If I change my SQL to
xmlforest('testing' "Type", totcount "Recs"),
I am getting following error
ERROR at line 2:
ORA-00937: not a single-group group function
Kindly suggest me urgently.
thanks & regards
PJP

Guys any idea on this? I am in very much in need of this solution. Please suggest me .
Thanks
Rao

Similar Messages

  • Purchase Order printed only once

    Hello.
    I need to print the PO automatically when I create it.
    But if the PO is changed or release it sholdn't printed again automatically.
    How can I configure the message for this purpose?
    Is it possible print only once?
    Thank you in advance.
    Regards.

    Hi,
    In Standard only PO Printing  is possible after PO release.But if business needed, you can develop a DRAFT COPY OF PO PRINT OUT with help of ABAPer before PO release.
    After release if you needed automatic PO print then need to set Dispatch time as 4 {Send immediately (when saving the application)} in NACE t.code in application EF & in condition record t.code:MN04 for PO message type.
    As you needed ,only once print and no further PO print , then do not select" Multiple Issuing" check box in General data TAB for your required PO output type in NACE t.code in application EF .
    Regards,
    Biju K

  • How to print only fatal error in log file in tomcat4.1

    Hi all ,i m using tomcat4.1
    1> i want to print only fatal error in log file ,but it print all thing in log file ,how i can avoid it(because i think this process is consuming my resource)
    assume below ip address is corect:
    this is exact printing in my log file
    .12.2.3.3  - - [24/Oct/2007:00:00:00 5050] "GET /menu/ir.jsp HTTP/1.1" 200 2828
    12.2.3.3  - - [24/Oct/2007:00:00:00 5050] "GET /menu/bottomAdv.jsp HTTP/1.1" 200 528
    12.2.3.3  - - [24/Oct/2007:00:00:02 5050] "GET /menu/alerts.jsp HTTP/1.1" 200 323
    12.2.3.3  - - [24/Oct/2007:00:00:02 5050] "GET /alerts/createAlertShow.jsp HTTP/1.1" 200 26140
    123.2.3. - - [24/Oct/2007:00:00:05 5050] "GET /menu/getsensex.jsp HTTP/1.1" 200 642
    12.2.3.3 - - [24/Oct/2007:00:00:05 5050] "GET /menu/latestRecommendation.jsp HTTP/1.1" 200 5210
    12.2.3.3 - - [24/Oct/2007:00:00:05 5050] "GET /portfolio/watchlist/displayWatchlistItemsShow.jsp?watchlistId=20070509013642953_1&watchlistName=First&refreshRate=900&flag=1 HTTP/1.1" 500 7257
    12.2.3.3  - - [24/Oct/2007:00:00:05 5050] "GET /menu/iwealthNewsScroller.jsp HTTP/1.1" 200 2828
    112.23.3  - - [24/Oct/2007:00:00:06 5050] "GET /menu/alerts.jsp HTTP/1.1" 200 323
    112.23.3 - - [24/Oct/2007:00:00:06 5050] "GET /menu/bottomAdv.jsp HTTP/1.1" 200 528
    12.2.3.3  - - [24/Oct/2007:00:00:07 5050] "GET /menu/alerts.jsp HTTP/1.0" 200 323
    12.2.3.3 - - [24/Oct/2007:00:00:09 5050] "POST /Transaction/equity/modifyConfirmShow.jsp?DelId=0 HTTP/1.1" 200 28661
    12.2.3.3  - - [24/Oct/2007:00:00:09 5050] "GET /menu/getsensex.jsp HTTP/1.1" 200 6422>what will happen if i change timestamp="false" and what is the significance of verbosity="1" or "2" or "3" ,or "4" and what happen if i change debug="1" or other in below code
    <Logger className="org.apache.catalina.logger.FileLogger" debug="0" directory="logs" prefix="www.xyz_log." suffix=".txt" timestamp="true" verbosity="4"/>Edited by: Deepak23 on Oct 24, 2007 10:41 PM
    Edited by: Deepak23 on Oct 24, 2007 11:16 PM

    One of my standard answers (which will explain the use of Directory Objects)...
    The UTL_FILE_DIR parameter has been deprecated by oracle in favour of direcory objects because of it's security problems.
    The correct thing to do is to create a directory object e.g.:
    CREATE OR REPLACE DIRECTORY mydir AS 'c:\myfiles';Note: This does not create the directory on the file system. You have to do that yourself and ensure that oracle has permission to read/write to that file system directory.
    Then, grant permission to the users who require access e.g....
    GRANT READ,WRITE ON DIRECTORY mydir TO myuser;Then use that directory object inside your FOPEN statement e.g.
    fh := UTL_FILE.FOPEN('MYDIR', 'myfile.txt', 'r');Note: You MUST specify the directory object name in quotes and in UPPER case for this to work as it is a string that is referring to a database object name which will have been stored in uppercase by default.

  • How to print message in oracle rdf report output?

    Hi,
    There is a requirement to print message in output of oracle rdf report. srw.message prints the message in log file but how to print message in output.
    Please suggest.
    Thanks & Regards,
    Sunita

    897745 wrote:
    Hi,
    We are trying to print BARCODE for Order Number in RDF report. Kindly let me know how to do this.It's very easy. Download a font which show barcode then choose your desire field's font that font. I use IDAutomationHC39M font.
    Hope this will help you.

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • How to print only certain parts of a page based on form input

    I need to know how to do the following.
    I have a PDF with a listing of five addresses. I need to be able to use radio buttons, check boxes, or something similar in order to select certain addresses, and have only those print. But, I need to keep all the addresses available in the electronic copy, and the addresses can't be editable by others. Other people can only choose to print the sheet showing just the addresses they want, such as 1, 2, and 5.
    Is this possible? If so, how?
    Your help is appreciated!

    One way is to set up five buttons, one for each address. Create a separate PDF for each address and use them as the icon source for each button. To set up a button to use an icon, set its Layout to something other than "Label Only".
    The buttons should be set to be read-only, and not have a background or border color. When the corresponding check box is selected, the address button would get set to be printing, and non-printing if deselected. Use something like the following as the Mouse Up JavaScript for each check box.
    // Mouse Up script for check box
    var f = getField("Address1_button");
    f.display = (event.target.value === "Off") ? display.noPrint : display.visible;
    Replace "Address1_button" with the actual name of the corresponding button.
    Instead of using buttons to display the addresses, you may be able to use text fields. It just depends on the formatting you need.

  • Custom xml panel in bridge - how to print with photos

    hello, i used the generic template to create a custom xml panel which is great, now i am wondering, if there an easy way that i can now print the xml with the photo in bridge? or is it something that doesnt exist yet only because someone with a deeper knowledge than i hasnt done it yet?
    im hoping to find theres a way to choose to 'custom print' photos on a page, and simply choose which parts of my custom generic xml panel id like to print with it.
    if someone knows it already is possible, or could be possible, feel free to let me know, take care
    gary greenwald

    That is a really good question Gary. I sure hope we can find out the answer to this soon.
    Regards,
    Agyemang Fellowes
    iPhone SIM Unlock Administration
    http://www.iphone-sim-unlock.com/

  • How to print only pages with selected checkboxes

    Hi
    Here is what I've got:
    - a PDF with 101 pages
    - page 1 is a form
    - end-user fills in his logo (image-field)
    - this is placed on all the following pages
    - end-user fills in price of all 100 products and
    - decides if he wants this item (page) to be printed by checking a check-box
    - end-user hits a buton and voila; only the checked items print-out
    Problem is with this last item; I can not get it right.
    I implemented a script (see below) but it does not work.
    Maybe because I am so not used to this, I putted it in the wrong place?
    I know the script works without a Print-Dialog-Box; I could always first present a message or so with instructions or what the pressed button is about to do.
    Please help? Thank you very much
    if (getField("Check Box1").value !== "Off") {
    print({
    bUI: false,
    nStart : 1, nEnd : 1});
    if (getField("Check Box2").value !== "Off") {
    print({
    bUI: false,
    nStart : 2, nEnd : 2});
    if (getField("Check Box3").value !== "Off") {
    print({
    bUI: false,
    nStart : 3, nEnd : 3});

    You may try writing the following script at "pre-print" event with Javascript as scripting language,
    if(CheckBox1.rawValue == false)
        CheckBox1.relevant = "-print";
    And so an so forth for every other CheckBox<no.> .
    Ensure to save your form as “Dynamic XML Form”.
    -vaibhav

  • Mail: How to print only part of a message

    I often want to print (on paper) only part of a message. I have tried:
    1. Select the part to be printed, but the whole message is printed;
    2. Do Print > PDF (button) > Open PDF in Preview (button) >Select and delete the part that I don't want > "Message": The original document can't be changed, so a duplicate with your changes has been created" appears at top pointing to an active  down arrow and link labelled "Edited" > I click on that link > Dialogue box :" Header text of message", "Where:" (Documents etc. offered).
    But I want to print the part of it without the fuss of saving, searching and then printing, then deleting. My task does not seem unusual. Is there a way? Thanks.

    OOPS! I just remembered before going on holiday that on advice from somewhere that for security reasons it was a good idea to prevent Java from being used (Safari Preferences). So I did. I have just re-enabled Java and all is well. Whew!
    But is enabling Java a security risk (malware)?

  • How to print only the 2 most recent values in a multi-value table field

    Hi there,
    I have a history table field in my report that may contain anywhere up to 100 values for any one database record... however for each database record, I only want the LAST 2 (ie. 2 most recent) values of this field to be included in the report. I then want to do a value change comparison and produce a percentage change for the field.
    It seems like a simple concept... can anyone assist?
    -Karen

    Hi Jyothi,
    I'm not sure I understand your qeustion.
    For example:
    The table field may contain a list of 4 values:
    (value1) 5000
    (value2) 4000
    (value3) 7000
    (value4) 7500
    I only want the report to include value3 and value4, and then I want it to show the difference between these values (ie. 7500 minus 7000) and then also express a percentage change between these two values). I am not sure what kind of formula to use for this.
    Thanks for your time!
    -Karen

  • How to print report From Oracle form directly on printer

    Hi,
    I am running report from form and output should be directly printed on printer.
    Database: 11g Release2
    Forms version : 11.1.2
    Report version : 11.1.2
    OS: windows 7 professional 32 Bit
    Written following code:
    declare
    pl_id ParamList;
    varno number;
    x VARCHAR2(150);
    y NUMBER;
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    begin                
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    repid := FIND_REPORT_OBJECT('SALEBILLNEW'); -- report object name
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'copies',TEXT_PARAMETER,'1');
    Add_Parameter(pl_id,'background',TEXT_PARAMETER,'Yes');
    Add_Parameter(pl_id,'mode',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'printjob',TEXT_PARAMETER,'YES');
    Add_Parameter(pl_id,'VCOMPANY',TEXT_PARAMETER,:block50.coname);
    Add_Parameter(pl_id,'VCOde',TEXT_PARAMETER,:block50.code);
    Add_Parameter(pl_id,'VOURBILLNO',TEXT_PARAMETER,:BLOCK50.FROMBILL);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER, 'PRINTER') ;
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'OKI MICROLINE 391 TURBO (COPY1) on NILESH-PC') ; --default printer name
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_adminserver_inorasrv-pc_asinst_3');
    y := LENGTH ('rep_adminserver_inorasrv-pc_asinst_3') + 2;
    x := RUN_REPORT_OBJECT (repid, pl_id);
    WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/rwservlet/getjobid'||SUBSTR(x,y)||'?server=rep_adminserver_inorasrv-pc_asinst_3&userid=scott/tiger@winorasr');
    Destroy_parameter_list('tmpdata');
    end;
    Above code giving following error:
    REP-52251: The output of job ID 111 requested on Thu Oct 18 18:37:20 IST 2012 cannot be retrieved.<P>REP-51026: No output is generated for job 111.
    Need help..
    Thanks in advance.

    Hi,
    I have change the printer name to OKI
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, '\\Nilesh-pc\OKI') ;
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER, 'dflt.prt');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'\\Nilesh-pc\OKI');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt.prt');
    code which i have posted above unable to reach at default printer and gives following error
    The report generated successfully but distribution to destinations failed.
    Modified above code to take default printer from registry.
    Added below code
    rtn_Registry := CLIENT_WIN_API_ENVIRONMENT.Read_Registry('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','Device');
    rtn_defaultPrinter := substr(rtn_Registry,1,instr(rtn_Registry,',',1)-1);
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'rtn_defaultPrinter') ;
    It is giving error
    CLIENT_WIN_API_ENVIRONMENT.Read_Registry must be declare.
    Edited by: parapr on Oct 20, 2012 10:47 PM

  • How to Print BARCODE in oracle RDF report

    Hi,
    We are trying to print BARCODE for Order Number in RDF report. Kindly let me know how to do this.
    Thanks & Regards,
    Suresh

    897745 wrote:
    Hi,
    We are trying to print BARCODE for Order Number in RDF report. Kindly let me know how to do this.It's very easy. Download a font which show barcode then choose your desire field's font that font. I use IDAutomationHC39M font.
    Hope this will help you.

  • How can print forms of Oracle 9i in web

    I currently use Oracle 6i forms server and it is installed on Solars. I display the forms on IE. My question is that I can't print clear oracle forms with IE 5.5, who could let me know how I can do it?
    Thanks,

    I set in formsweb.cfg as below
    If i remove oracle at LookAndFeel
    Then i am getting Window at left top
    below is my formsweb.cfg
    serverURL=/forms90/l90servlet
    codebase=/forms90/java
    imageBase=codeBase
    #DocumentBase
    width=100%
    height=100%
    separateFrame=false
    splashScreen=
    #working.gif
    background=
    lookAndFeel=
    colorScheme=blue
    #teal
    logo=no
    formsMessageListener=
    recordFileName=
    serverApp=default
    Thanks for your help

  • Anyone have useful information how to connect to an oracle database?

    I first tried "Instant Client", following all the instructions, and had the problems described here I don't get it :(
    And then I tried the 10g installation CD to install the client and all it did was install the exact same "instant client" files which I had already installed.
    I'm just looking for a quick and easy way to get sqlplus and other clients like Tora connecting. After that, I will worry about how to get JDBC and PHP connecting. I don't mind reading documentation but not hundreds of pages of highly complex material with a raft of assumed knowledge (ie. I have no wish to become a DBA).
    Any links to articles/tutorials etc would be appreciated - ie. connecting to ORACLE in 10 easy steps... not
    "Installation Steps:
    1. Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic package.
    2. Unzip the packages into a single directory such as "instantclient".
    3. Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used.
    4. Start your application and enjoy."
    from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
    which has turned out to be utterly useless and unhelpful :(

    I guess I was asking a broader question in general which related to the more specific question in the "instant client" forum for which I provided a link.
    I don't get it :(
    This has more detail about the client environement and my initial attempts at connecting (as per instructions on the Instant Client page).

  • HT3500 Mac finds Epson printer only once, than it is disconnected (wifi)

    I am able to connect my Epson Workforce WF-3520DWF printer to my router and it is found wireless.
    I can print with Mac, wireless, exactly ONE time after installation.
    After that the printer is no longer found.
    Searching the internet, learns me it's a know problem.
    Come on Apple, why can't this be solved?

    Morning LCWo,
    Thanks for using Apple Support Communities.
    Disregard 10.6 and 10.7. The rules still apply.
    For troubleshooting on this, take a look at this article:
    Troubleshooting printer issues in OS X Lion and Mac OS X v10.6
    http://support.apple.com/kb/TS3147
    Hope this helps,
    Mario

Maybe you are looking for

  • Internal Order status issue Error - Message Class X short dump

    Hi All Experts, I am creating internal order with CRTD status. However when I am trying to post transaction through MIRO , I am getting ABAP short dump mseeage class X. So I changed the CRTD to REL manually and able to solve the error. But could any

  • Playing quicktime files from 1998

    I have a CD with some Quicktime files on that appear to have been created in 1998. Quicktime tries to play them but I can only get sound and no picture. Any suggestions about how I can play them fully? I'm using Quicktime 7.4.1.

  • IPhone 4.0

    With using iPhone 4.0 as a developer I haven't been able to talk to anyone about this but when using iAd and lets say I want to download the app it is advertising will it take me directly out of app I was in into the app store? Because wouldn't that

  • Consuming a web service from external system

    Hi exepert, I'm new in web service, I have to send a file towards external system so I think that I have to expose my web service in sap system. How, the external system, can understand that I exposed my web service, in other word that my file is rea

  • Creating dynamic file names

    Ok now I am getting somewhere with OWB. Well all thanks to you guys for helping me out with my questions. Anyway now I am facing an issue I want to create the output files with today's file name. I mean if i am running the mapping on the 20th of Octo