Query Code

Hi Expert,
Its me again... below is my simple query. How can I make the 'balance' column to be the running balance of Debit less Credit column?
SELECT T0.[TransId], T0.[RefDate],T1.[ShortName],  T1.[Debit], T1.[Credit], T1.[Debit]- T1.[Credit] as 'Balance' FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId WHERE T1.[ShortName] = '10301' and  T1.[ProfitCode] = [%0] and  T0.[RefDate] between '[%1]' and '[%2]'
Thanks and looking forward for your feedback.
Regards,
ArlmiPJ

hi,
actually you can achieve the same output by using the SAP Standard Reports. use account balance, how to do it? follow this..
Use this window to view the transactions posted to a G/L account or a business partner. According to the transactions, the balance of the account or the business partner is calculated.
To open the Account Balance Window for a G/L account, from SAP Business One Main Menu, choose  Financials  Chart of Accounts , select the account, and  (Link Arrow) in the Balance field.
regards,
Fidel

Similar Messages

  • SCCM 2012 R2 CU2 Can't Edit WMI Query Code in Report Builder

    I first posted this in the SCCM but the issue is not solved so I thought I'd try here in the SQL Reporting forum. Original thread here: http://social.technet.microsoft.com/Forums/en-US/b0a6ca3d-7471-4b49-8447-7403a65c2ec0/sccm-2012-r2-cu2-cant-edit-wmi-query-code-in-sccm-reports?forum=configmanagergeneral
    I'll repost info here to make this easier.....
    I built a new SCCM 2012 R2 CU2 suite on Server 2012 R2. This also uses SQL 2012 SP1 CU6. This suite has 4 servers: site server, two for WSUS and secondary DPs, and SQL. This problem is true for the built in reports and my custom reports. Our SQL guy has
    been helping me a lot but we've gotten nowhere. I can run a report. I can open one in edit mode after it prompts me for credentials. It loads Report Builder 3.0. But when I go to a dataset/query, enter credentials, and try to open it, I get a popup that
    says "Unable to connect to data source. 'AutoGen_5C6358F2_yayak..." When I click on details it says "The target principal name is incorrect. A connection was succesfully established with the server, but then an error occurred during the login
    process.  (SSL Provider, error: 0 -The target principal name is incorrect.)" In SQL Reporting Services Config Manager the paths for Web Service URL is
    http://ip.ip.ip.ip:80/ReportServer_SC01 and for Report Manager URL:
    http://ip.ip.ip.ip:80/Reports_SC01. A domain account is used to login. This happens when you r-click a dataset and select query to edit the code of a dataset, ie, when query designer tries to open up. It happens
    in both Admin Console and when using the Report Manager URL within SQL SSRS. All other functions of using edit mode of a report work fine.
    Ben JohnsonWY

    When I do that, browse is dimmed out.
    But, if I deselect "create a data set" and click "choose an existing dataset in this report..." there is no data connection at the end.
    But if I don't use report builder and instead use IE to browse to my ConfigMgr_ABC, I do see the connection at the end: {123...}.
    This problem is on a network that is not on the 'net, so it's hard to do screen shots, so I'll reproduce this problem step by step:
    I pick a report to edit, it doesn't matter which one.
    If I try it in Admin Console, I right-click, Edit the report, it asks me for a login, I login, then I get a popup that says "Cannot continue. The application is improperly formatted. Contact the vendor for assistance. I click the Details button and
    get a long set of text but the key part is "Your web browser settings do not allow you to run signed applications." This msg didn't appear before, so something changed, so I will investigate. I think it used to give a SPN error.
    If I use IE within report builder and navigate to whatever report, click open, everything works, except, when I click on Dataset0 (the key one I normally need to edit), click query, it prompts me for a login and no matter which one I use, i get a popup that
    says "unable to connect to data source 'AutoGen_123...'". If I click details I get "the targe principal name is incorrect. A connection was successfully established with the server, but then an error occurred during the login process. (provider:
    SSL Provider 0-The target principal name is incorrect.)
    Ben JohnsonWY

  • I wonder there is a way to put a query code when i make VSR.

    After applying vsr, program, GBTC2IQ0 is automatically generated. 
    I want to know what kind of naming rule is applied for this name(GBTC2IQ0).
    and where is it saved ?
    Also, I wonder there is a way to put a query code(like select...) when I make VSR.
    (* no badi.)

    Hello, check Finder Preferences>General, & then the Sidebar tab also.

  • Query code cotains Syntax Errors

    Hello Experts,
    In the process of upgrading from 4.6 to 6.0 ECC SAP version, we had some issues at the moment of testing Queries from SQ01 transaction, nevertheless almost all the problems with queries were solved by regenerating them all over again from SQ01 for Queries and SQ02 for Infosets.
    Everything was OK so far, until I tested this Query related to PCH Logical Database and realized that It had Syntax Errors and can't run, and the other 5 Queries related to the same Logical Database are having the same Syntax Errors and they can not be fixed by executing the Query from SQ01 or regenerating the Infoset (PCHORG) from SQ02.
    I guess the Syntax Errors must be fixed by regenerating the code in the new version, but how can I do this?
    Or, is there another process I am skipping to achieve this?
    Any ideas on this?
    Thanks in advance!

    Hello VitorDFPinheiro thanks for your answer,
    I tried to modify the errors manually but in first Instance this is not possible whitout an Access Key and secondly I think this is not the best practice due the code for queries is generated Automaticaly.
    Nevertheless I tried to correct this syntax errors by copying the code and pasted it into a new Z program and compile it, the compiler threw even more errors when I corrected the first one, so I think that this is not the way to procced.
    I guess that there should be a way to "regenerate" the query and this "regeneration" must reorganize the code and its syntax.
    Any other suggestions?
    Edited by: memo_cv on Oct 11, 2010 6:56 PM

  • ABAP Query Code for Count Function

    Hi,
    I have an ABAP Query and just created a new field which requires ABAP Code to do the following :-
    The report is for Purchase Orders and Purchase Requisitions. 2 Purchase Orders may have the same requisition, so what I want to do is count the number of the same requisitions in the report
    e.g.
    PO                Req             Count
    45000001     10015              2
    45000020     10015              2
    Can some one please provide with the full code? Points will be awarded
    Thanks

    Hi,
    No errors in the below code but it is bringing a value 0 even though there are duplicates in the table which is suggesting to me that the code is not working.
    Any help would be appreciated. Thanks
    DATA : BEGIN OF itab OCCURS 0,
            aufnr LIKE ekkn-aufnr,
           END OF itab.
    DATA : count(2) TYPE p.
    DATA : no_of_records(3) TYPE p.
    Clear no_of_records.
    select aufnr from ekkn into itab.
    endselect.
    SORT itab BY aufnr.
    LOOP AT itab.
      ADD 1 TO count.
      AT END OF aufnr.
        IF count GE 2.
          ADD count TO no_of_records.
        ENDIF.
        CLEAR count.
      ENDAT.
    ENDLOOP.
    *WRITE :/ 'Good Bye'.
    DUPLICATES = NO_of_records.

  • My jspx query code doesn't respond

    <?xml version="1.0"?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:sql="http://java.sun.com/jstl/sql"           
    version="1.2">
    <jsp:directive.page contentType="text/html"/>
    <jsp:directive.page import="java.util.*"/>
    <jsp:directive.page import="java.text.*"/>
    <html>
    <head>
         <title>Snap Diary</title>
    </head>
    <body bgcolor="white">
    <sql:query var="img">
    SELECT snap FROM snap_pix
    WHERE name ='param.name'
    </sql:query>
    <![CDATA[<img src="]]<c:out value="${img.snap}" />">
    <p>     
    <form action="recentsnap.jsp" method="post" >
    <input type="submit" value=" Recent Snap " />
    </form>
    <form action="oldsnap.jsp" method="post" >
    <input type="submit" value="Old Snap" />
    </form>
    </p>
    </body>
    </html>
    </jsp:root>
    Error Report
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /databaseimage2.jsp(32,14) XML document structures must start and end within the same entity.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
         org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:214)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:200)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
    Edited by: emma_parker on Jan 6, 2010 11:24 AM

    In place of image there is a crossOk, we've got the page. The url to the image obviously needs a bit of help.
    Right click the image, select properties, and it will show you the URL that the browser is pointing at. Is that URL correct?
    What is the value of ${img.snap}? Are you using relative or absolute links?
    Is the image actually in the web application?
    If you view source on the page you should see something like <img src="/images/myImage.jpg"/>
    At a guess, you haven't accounted for the context path part of the url.
    Possible this might work:
    <img src="${pageContext.request.contextPath"}/${img.snap}"/>{code}
    It depends on the answers to the above questions.
    cheers,
    evnafets                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SAP Query code extension

    Hi experts,
    Normally I don not use SAP Query tool for several reasons.
    Now I have been asked to create something like a user exit for some existing queries: The requirement is to change the contents of one list field using an existing function module.
    I remember a couple of years ago it was possible to add some source code at some events of the query and then save/regenerate the query.
    I can't find anything like this is SQ01 menus.
    Please help: What is the way to make coding extensions to a query  e x c e p t   modification of the generated query report. Or did SAP cancel this?
    Answers to this question highly welcome.
    Regards,
    Clemens

    Thanks Rich,
    that's what I just found out myself - thanks anyway.
    Regards,
    Clemens

  • ABAP Query Code timeout issue

    Hi,
    I have a SAP query which was the following code which is causing a timeout issue when running the report, can anyone suggest how I can change the code to make it more efficent?
    * This gets the sum of all labour costs on WBSEs.
      clear X_COEP_WKGBTR_LAB_W.
      if PRPS-OBJNR is not initial.
      select sum( WKGBTR ) from COEP
        into X_COEP_WKGBTR_LAB_W
        where
        PERIO = ZPERIODT
        and
        GJAHR = ZYEAR
        and
        KSTAR >= 'A43'
        and
        KSTAR =< 'A43ZZZZZZZ'
        OR
         KSTAR = '0005767012'
        and
        OBJNR = PRPS-OBJNR.
      endif.
    thanks
    Joe

    Hi Joe,
    I see none of the Key fields were used in select query.
    Create a secondary index for the table and use it in select query.
    It increases the performance.
    COEP~1 and COEP~2 are already existing.
    select sum( WKGBTR ) from COEP
        into X_COEP_WKGBTR_LAB_W
        where
        PERIO = ZPERIODT
        and
        GJAHR = ZYEAR
        and
        KSTAR >= 'A43'
        and
        KSTAR =< 'A43ZZZZZZZ'
        OR
         KSTAR = '0005767012'
        and
        OBJNR = PRPS-OBJNR
    %_HINTS ORACLE 'INDEX("COEP" "COEP~1").
    Thanks,
    Anil

  • JDBC  Inner Query Code Needed

    Hi
    I have a table called Sale
    contains a column called quantity_Available_For_Sale numeric(18,0)
    Another table called Withdrawal_Operations contains a column called quantity_withdrawan numeric(18,0)
    I need a jdbc code that add quantity_withdrawan value when inserted in the Withdrawal_Operations to the sum of the values of quantity_Available_for_Sale field
    this is my trial code
      String sql= "update Sale  set  Item_code ='"+jTextField7.getText()+"',quantity_Available_for_Sale='"+jTextField10.getText()+"SELECT SUM"+""+quantity_Available_for_Sale+""+" FROM "+'Sale'+"+"'WHERE  withdrawal_id='"+jTextField12.getText()+"'";It generates two errors
    unclosed character literal.
    not a statement.
    thanks
    Edited by: VANPERSIE on May 7, 2011 10:50 PM

    Hi,
    This is what you currently have, I think. All I have done is some formatting in order to be able to read it.
    String sql = "update Sale set  Item_code ='"   +
                 jTextField7.getText()             +
                 "',quantity_Available_for_Sale='" +
                 jTextField10.getText()            +
                 "'SELECT SUM'"                    +
                 ""                                +
                 "("                               +
                 quantity_Available_for_Sale       +
                 ")"                               +
                 ""                                +
                 " FROM "                          +
                 Sale                              +
                 ""                                +
                 "' WHERE  withdrawal_id='"        +
                 jTextField12.getText()            +
    Statement stmt = con.createStatement(sql);That approach is wrong for several reasons, some being
    1. Each time you concatenate a string together, it will be a brand new SQL statement for the server to hard parse.
    Not only is this inefficiant, it breaks your SQL cache, causes latching which is definite resource.
    Always use bind variables when dealing with databases.
    2. You are subject to SQL injection. If your text fields contains SQL or parts of SQL, malicious users could take advantage of that.
    3. Your statement is not type safe, and you need to clutter up with single quotes to turn strings into literals.
    With this kind of code you are at sub-zero level of writing database applications.
    A better approach would be to use PreparedStatement as suggested.
    In your case something like:
    String sql = "update Sale set  Item_code =?"   +
                 ",quantity_Available_for_Sale="   +
                 "SELECT SUM"                      +
                 ""                                +
                 "("                               +
                 quantity_Available_for_Sale       +
                 ")"                               +
                 ""                                +
                 " FROM "                          +
                 Sale                              +
                 ""                                +
                 " WHERE  withdrawal_id=?";
    PreparedStatement pstmt = con.prepareStatement(sql);
    pstmt.setString(1, jTextField10.getText());
    pstmt.setString(2, jTextField12.getText());This should take of the three points listed above.
    In my opinion you are now at level 1 of writing database applications.
    You still have some problems. Above sql, is not SQL, it is nothing but a Java String.
    You will struggle to make it into valid SQL, probably by using a cumbersome trial and error process.
    And this is even quite simple SQL.
    In your case you seem to be pulling data from the front end, and use this directly in the data access layer.
    So, you have no POJO layer (I am not saying that you should have).
    This makes the SQL a perfect candidate for what you already mentioned yourself, stored procedures.
    Using a stored procedure, you have something like this:
    String sql = "{call sales_pck.set_quant_avail(?,?)}";
    CallableStatement cstmt = con.prepareCall(sql);
    cstmt.setString(1, jTextField10.getText());
    cstmt.setString(2, jTextField12.getText());Looks much more appealing doesn't it?
    - And not much room for SQL syntax errors.
    You will of course have to implement that stored procedure. Something many Java developers do not like to do.
    Don't know why - to me it smells like technology anxiety.
    There is nothing wrong about stored procedures, and nothing old school about them. In your case it even seems like a sensible thing to do.
    The first advantage about it, is that you will get to work in a layer (The database) that actually knows SQL.
    Here's an attempt to implement your stored, implmented by using a PL/SQL package:
    create or replace package sales_pck as
      procedure set_quant_aval (
        p_item_code        in sale.item_code%type,
        p_with_drawal_id   in sale.withdrawal_id%type
    end sales_pck;
    create or replace package body sales_pck as
      procedure set_quant_aval (
        p_item_code        in sale.item_code%type,
        p_with_drawal_id   in sale.withdrawal_id%type
      ) is
      begin
        update sale
        set    item_code = p_item_code,
               quantity_available =
               select sum (quantity_available_for_sale)
                  from   sale
               where  withdrawal_id = p_with_drawal_id;
      end set_quant_aval;
    end sales_pck;
    /Doing this, you will soon realize that you are not quite there.
    You SQL is syntactically wrong (At least in Oracle).
    But you are now in the right environment to fix it.
    It is probably also semantically wrong, it gives little meaning, and you are probably facing mutating table
    (At least in Oracle and other databases supporting read consistency)
    Note on syntax errors. You probably mean
        update sale
        set    item_code = p_item_code,
               quantity_available =
                 (select sum (quantity_available_for_sale)
                  from   sale
                  where  withdrawal_id = p_with_drawal_id);Or
        update sale
        set    item_code = p_item_code,
               quantity_available =
                 (select sum (quantity_available_for_sale)
                  from   sale)
        where  withdrawal_id = p_with_drawal_id;I can't say which, they seem equally wrong.
    This is what you should do:
    1. Write a correct update statment in a query tool of your choice.
    2. Put that statment inside a stored procedure
    3. Test that procedure from a query tool
    4. Implement the procedure call in your application
    5. Test it.
    Conclusion:
    If you intend to do any (handwritten) SQL in your application, the goal is:
    - write as little as you can in the Java layer
    - write as much as possible in the database layer
    One way of achieving this, is by utilizing stored procedures.
    Regards
    Peter

  • ABAP Query : code to change the display

    Hi all,
    I have created an Abap Query and generated it. I see the output now as follows:
    <u>Bill.doc</u>     <u>Item</u>   <u>Net value</u>  <u>Total amt</u>
    900000                    10                  100                  600
    900000                    20                  200                  600
    900000                    30                  300                  600
    900001                    10                  250                  250
    900002                    10                  300                  500
    900002                    20                  200                  500
    Now I want the total amt to be displayed only once for each billing document only for the first item and for the other line items it should be blank as shown below.
    <u>Bill.doc</u>   <u>Item</u>   <u>Net value</u>  <u>Total amt</u>
    900000   10      100            600
    900000   20      200           
    900000   30      300           
    900001   10      250            250
    900002   10      300            500
    900002   20      200
    Can someone please explain me where and how I should write the code to get this working?
    Thanks,
    N
    Helpful answers will be awarded for sure.

    Hi Manohar,
    I am getting the total amount from a field which exists in one of the tables which i used in the abap query.
    the total amount is appearing correctly...i dont need to modify that. i just need to display it only once for each billing doc for the first item.
    i want to know where i should do the coding...i mean in the Infoset or the Abap Program that gets created when i generate the infoset.
    Thanks!
    N
    Message was edited by:
            Narmada Mallavaram
    null

  • SCCM 2012 R2 CU2 Can't Edit WMI Query Code in SCCM Reports

    I built a new SCCM 2012 R2 CU2 suite on Server 2012 R2. This also uses SQL 2012 SP1 CU6. This suite has 4 servers: site server, two for WSUS and secondary DPs, and SQL. This problem is true for the built in reports and my custom reports. Our SQL guy has
    been helping me a lot but we've gotten nowhere. I can run a report. I can open one in edit mode after it prompts me for credentials. It loads Report Builder 3.0. But when I go to a dataset/query, enter credentials, and try to open it, I get a popup that
    says "Unable to connect to data source. 'AutoGen_5C6358F2_yayak..." When I click on details it says "The target principal name is incorrect. A connection was succesfully established with the server, but then an error occurred during the login
    process.  (SSL Provider, error: 0 -The target principal name is incorrect.)" In SQL Reporting Services Config Manager the paths for Web Service URL is
    http://ip.ip.ip.ip:80/ReportServer_SC01 and for Report Manager URL:
    http://ip.ip.ip.ip:80/Reports_SC01.
    This is one of three problems I'm having a lot of difficulty with on this network. I'm making separate threads for all three.
    Ben JohnsonWY

    When I do that, browse is dimmed out.
    But, if I deselect "create a data set" and click "choose an existing dataset in this report..." there is no data connection at the end.
    But if I don't use report builder and instead use IE to browse to my ConfigMgr_ABC, I do see the connection at the end: {123...}.
    This problem is on a network that is not on the 'net, so it's hard to do screen shots, so I'll reproduce this problem step by step:
    I pick a report to edit, it doesn't matter which one.
    If I try it in Admin Console, I right-click, Edit the report, it asks me for a login, I login, then I get a popup that says "Cannot continue. The application is improperly formatted. Contact the vendor for assistance. I click the Details button and
    get a long set of text but the key part is "Your web browser settings do not allow you to run signed applications." This msg didn't appear before, so something changed, so I will investigate. I think it used to give a SPN error.
    If I use IE within report builder and navigate to whatever report, click open, everything works, except, when I click on Dataset0 (the key one I normally need to edit), click query, it prompts me for a login and no matter which one I use, i get a popup that
    says "unable to connect to data source 'AutoGen_123...'". If I click details I get "the targe principal name is incorrect. A connection was successfully established with the server, but then an error occurred during the login process. (provider:
    SSL Provider 0-The target principal name is incorrect.)
    Ben JohnsonWY

  • APEX,PDF's, BI Publisher and SQL Query returning SQL code..

    I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
    I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
    Here is my dilemma:
    I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
    The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
    I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
    An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
    Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
    Thank you,
    Tony Miller
    UTMB/EHN
    Title adjusted to allow people to know what I am talking about...
    Message was edited by:
    Tony Miller

    Tony,
    You can find the log as follows:
    - go to http://[yourserver]:[yourport]/em
    - logon to OC4J EM: oc4jadmin/[yourpassword]
    - click on "logs" at the bottom of the page
    - in the hgrid/tree, expand OC4J->home->Application
    xmlpserver
    - click on view log icon
    You can also observe what's going on in BI Publisher
    by going to the command prompt from where you started
    it.
    Or, as a third option, you can locate the file on
    your file system, depending on your setup, the path
    would be something similar to this:
    \oracle\product\10.2.0\bip\j2ee\home\application-deplo
    yments\xmlpserver\application.log
    With that said though, I don't expect you'll find
    much in there that would help with your particular
    problem. I suspect you either get no rows in your XML
    at runtime, due to some session state issues, or your
    XML structure does in fact not match your RTF
    template.
    I'm not quite following your problem description,
    i.e. when did you do what and are you associating
    your report layout with a report query or report
    region. So just some general notes, your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query. If you want to
    use your RTF template with a standard report region,
    you must export the XML file first using the advanced
    XML structure option. And of course the column names
    in your report query need to match the column names
    in your report region.
    Perhaps this helps you further diagnose what's going
    on, if you have additional information that could
    help, let me know. And if you could stage this on
    apex.oracle.com, I'd be happy to take a look.
    Regards,
    MarcMarc,
    Thanks for looking at this issue. Below find my remarks to your questions..
    Re: your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query.At the start of this process, the query code was a function in a package. The function was returning an SQL select statement, for a report region on a page. I took the select statement, built an application query to build a sample of the xml for BI Publisher desktop (Add-on for Word). The code was producing the usual Col01, Col02.. since at design time that is were the column names.
    When I then took the xml from this and built the rtf for loading into my APEX application.
    When testing the Application Query with this RTF report layout, I am getting PDF's. When using it with the report region sending an xml feed to BI Publisher I am getting nothing back.
    I have since taken the sql code and moved it back into the report region, and set the region to have a type of straight SQL Query. I have even tried to hard-code the parameters I was getting from the page to limit data returned.
    Is it possible to see the xml being produced by the APEX page?
    Re: Stage this on apex.oracle.com.. I would love to, but we would have HIPPA issues if I posted the data on a public website.
    Can I send you the RTF file and the xml file that the application query is creating to see if there something weird about them?
    Thank you,
    Tony Miller
    UTMB/EHN

  • At line-selection in SAP Query ( Infoset ) code

    Hi all ,
    Here is one for you :  can I put somehow the following code in a Sap Query ( at infoset level of course ) :
       at line-selection.
      set parameter id 'BUK' field XXX-bukrs.
      set parameter id 'BLN' field XXX-belnr.
      set parameter id 'GJR' field XXX-gjahr.
      call transaction 'FB03' and skip first screen.
    (In other words I would like to see the documents behind a line in the list)
    Some explains : my query's output would be ABAP list , the bukrs, belnr, gjahr fields are on the lines of my resulting list, and my problem is with those XXX 's - I don't know where are stored the lines of my ABAP list.
    I'm pretty new at ABAP so any idea and explains about the generated SAP Query code
    is appreciated . I looked at the final code but seemed very complex for my level.
    Please guide me in this area ( I know the basic things like writing pretty simple reports )
    Thanks !
    Best of all
    Zoli

    Hi,
    You need to add extra piece of code as below:
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                I_callback_user_command = 'USER_COMMAND'   "see FORM
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    "For further information please refer the link below :
    http://www.sapdev.co.uk/reporting/alv/alvgrid_ucomm.htm
    Thanks,
    Sriram Ponna.

  • How do I stop a query from running when the page is loaded

    Hi All,
    I'm using JDeveloper 10.1.3.4. I have a JSPX page that is used to collect search parameters and then when a button is clicked uses those values to run a query and then populate a table on the same page. The problem is that when the page is loaded the system attempts to run the query. The query is a method in a session bean. I can keep the method from running the query code by wrapping it in an 'if' statement and checking the parameters for null (or other value). Once the parameters are collected the query is invoked but it looks like the method is running twice, once with the parameters (here I've checked that the result actually has rows in the list) and then again where the parameters are null and the method returns null.
    What is the best way to do what I want here? From the buttons action method I am called the session beam method and returning null to stay on the same page. I think that is why the method is running the second time and returning null.
    TIA,
    Dave

    Have a look at these screen casts from Steve Muench and see if one of these techniques works for you, or gives you the clue you need.
    Creating Three Simple Search Pages with ADF Business Components and ADF Faces (JSF)
    Part 1: Web-Style Search Form
    Part 2: Oracle Forms-Style EnterQuery/ExecuteQuery Mode Page
    Part 3: Search Form Using View Object with Named Bind Parameters
    I had trouble viewing these with Firefox, but they worked in Internet Explorer.

  • How to Create a Functiona Query

    Dear all,
    Could any body detail me how to create a functional query. Please give me step by step procedure to create a query.
    I would appreciate if you can give me a material with screen shots. Your help will be highly appreciated.
    Thank you
    Raghu Ram

    Hi Raghu,
               Go through this document it may help you,
    SAP Query
    Step 1: Create User Group – SQ03
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
    a) In the User Group: Initial Screen -
    Enter User Group Code (self named)
    Click on “Create”
    b) In the User Group (Code): Create or Change pop-up window -
    Enter the User Group Description
    Click on “Save”
    c) In the Create Object Directory Entry pop-up window -
    Ö Click on “Local Object” button
    Ö The User Group Created is saved
    Step 2: Create User Group – SQ02
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Infosets
    a) In the Infoset: Initial screen -
    Ö Enter Infoset Code (self named)
    Ö Click on “Create” button
    b) In the Infoset: Title & Database Screen -
    Ö Enter Description of Infoset in the “Name” field
    Ö In the Data Source selection: Select appropriate Data Source by clicking
    the radio button
    · Source the data can either be multiple tables OR single table. There are 4
    options for the user to select from
    Ö Click on “Continue” (Enter)
    Ö Selected Table gets displayed in the Infoset : Initial Screen
    c) In the Infoset: Initial Screen -
    Ö Click on “Insert Table” button
    d) In the Add Table Screen -
    Ö Enter the Table Name that is to be inserted
    Ö Click “Continue” (Enter)
    e) In the Infoset: Initial Screen -
    Ö Click on “Back” button
    f) In the Field Group Defaults pop-up Screen -
    Ö Select Appropriate Field Group Option by clicking on the radio button
    · there are 3 options to select from. User can select Empty Field Group
    option and then select the data fields in the steps explained further.
    Alternatively, User can select an option which clubs all the data fields
    From all the tables selected
    Ö Click “Continue” (Enter)
    g) In the Change Infoset Screen -
    · the left side lists the Tables that the user has selected in step b, c & d
    · In the right side, system creates field groups, one for each table listed in the
    left part. Initially, the Field Groups are empty
    Ö In the Left Side, Click on the arror next to the table name and expand and
    display all the data fields in the table
    Ö Select a Data Field from the expanded Table view, which is to be added to
    the Field Group on the right.
    Ö Select a Field Group on the right side, in which Data Field selected above
    has to be added
    Ö Right click on the Data Field selected and click on “Add Field to Field Group”
    Ö The selected Data Field gets added to the selected Field Group, which is
    indicated by an arrow next to the Field Group.
    Ö Carry out the steps above to add the required Data Fields to the respective
    Field Groups
    Ö After transferring Data Fields to Field Groups click on “Generate” button
    h) In the Create Object Directory Entry Screen -
    Ö Click on “Logical Object” button to generate the infoset
    i) In the Change Infoset Screen -
    Ö Click on the “Back” button
    j) User is taken back to the “Infoset: Initial Screen” which displays the
    created Infoset record.
    Step 3: Assigning User Group to Infoset – SQ03
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
    a) In the User Groups: Initial screen -
    Ö Enter the User Group for which Infoset is to be assigned
    Ö Click on “Assign Users & Infosets” button
    b) In the User Group: Assign Users Screen -
    Ö Click on “Assign Infosets” button
    c) In the next screen, select the Infoset, which needs to be attached to the
    User Group selected
    d) Click on the “Back” button
    Step 4: Creating Query – SQ00 & SQ01
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Queries
    a) In the “Query from User Group: Initial Screen -
    Ö Click on “Other User Groups” button
    Ö In the pop-up screen, User Groups, select the User Group for which the
    Query has to created. The pop-up screen closes.
    Ö Enter the Query Code in the “Query” field
    Ö Click on “Create” button
    b) A pop-up screen “Restrict Value Range” shows the list of Infosets assigned to
    the User Group
    Ö Select the Infoset for which Query has to be created
    c) In the new screen Create Query: Title, Format -
    Ö Enter the Description of the Query in the “Title” field
    Ö Click on the “Next Screen” button
    d) In the Select Field Group” screen
    Ö Select the Field Groups from which Data Fields have to be selected for the
    Output
    Ö Click on the “Next Screen” button
    e) In the “Select Field” screen -
    Ö Select the Data Fields, which should appear in the output
    Ö Click on the “Next Screen” button
    f) In the Screen “Selection” -
    Ö Select the Data Fields for the selection criteria
    Ö Enter the sequence in which the selected fields would appear in the input
    screen of the query.
    Ö Define if the selection criteria should be Single Value or Multiple Value Range
    by clicking in the appropriate check boxes
    Ö Click on the “Basic List’ button
    g) In the screen “Query Layout Design” -
    Ö Select the Output Fields from the Data Fields section by clicking the
    appropriate check box
    Ö Change the sequence of Data Field columns if required
    Ö Click on the “Test” button to test the query created
    h) On the “Test Query” screen click “Continue”
    i) In the “Query” screen -
    Ö Enter the selection criteria
    Ö Click on “Execute” button
    j) Save the Query created
    Step 5: Running the Query – SQ00
    a) In the Query From User Group: Initial screen –
    b) Click on “Other User Groups” button to select the User Group
    c) In the pop-up screen “User Groups” select the User Group
    d) System lists all the queries created for the User Group
    e) Select the appropriate Query
    f) Click on “Execute” button
    g) User is taken to the Selection screen
    h) Enter the selection criteria and click on “Execute” button
    i) System runs the query and gives the output
    Regards,
    Murali.

Maybe you are looking for

  • 2nd graphics card doesn't work after upgrade to 10.6

    I ordered my Mac Pro with two ATI Radeon HD 2600 XT graphic cards and they always worked great. After I upgraded to Snow Leopard, it always shows a display connected to the second card even when there isn't. This wasn't an issue until I started havin

  • Error 6971 when trying to update to 2.1

    when trying to update to OS 2.1 for my 1G 32GB itouch (currently running 1.1.4) it freezes in the middle of backup and then gives me the error 6971. I have tried all of the following suggestions in these articles to no avail: http://www.apple.com/itu

  • Problem with setting tooltips for items of a JCombobox

    hi guys, I want to set tooltips for items of JComboBox & the code that i have written is given below , but the tooltip text is set for all the items of Nonitindustrycombo but the tooltips remain the same even for Nonitdesgcombo's items. Is that we ne

  • How to output video as still image frames?

    Hi there, We need to convert a movie file which has something like 375 frames into 60 still image files. How could we go about doing this using After Effects? We have a lot of movie files to convert, is there a way to batch process this so that we ca

  • Making a US account to download ps4 games...?

    Just wondering if this is allowed? or will it be patched ?  as curretly there is a offer of £8 for the last of us remastered digital code but it will only work on a US account...