Execute Query from LOV

Hi
There is a Button that run LOV(Show LOV) ,
how could make the Form Execute Query According to the user Selection from that LOV?
Thanks

hi
Thank you Rahamath and thank you Joachim
-Create non database item (Item_A). (As you told me Rahamath)
-Used the LOV to return the value at non database item
(Item_A) . (As you told me Rahamath)
-Create Global variable (g_var). (as you told me Joachim)
-At the trigger When_Button_Pressed I wrote :
if show_lov (my_lov) then
go_block('database_block');
:global.g_var :=:block.Item_A;
     Execute_Query;
End if;
- Create Pre_Query Trigger at database block level
(as you told me Joachim)
     if :global.g_var is not null then
:id := :global.g_var,
:global.g_var := null;
end if ;
so finally its work
Thank you a lot for all of you
bye
mahmoud

Similar Messages

  • Execute qrey from LOV

    I am using this piece of code on when-button_Pressed trigger
    DECLARE
         LV BOOLEAN;
    BEGIN
         LV     :=     SHOW_LOV('AGENT_LIST');
              GO_BLOCK('INFO_MAST');
              EXECUTE_QUERY(NO_VALIDATE);
    EXCEPTION
    WHEN OTHERS
    MESSAGE(SQLCODE||' - '||SQLERRM);
    PAUSE;
    END;
    It works fine but it show all records while i m selecting only one record from List of values.
    Please tell is it possible to execute query from list of values after selecting a values.
    thanks,

    Ghulam Yassen wrote:
    I am using this piece of code on when-button_Pressed trigger
    DECLARE
         LV BOOLEAN;
    BEGIN
         LV     :=     SHOW_LOV('AGENT_LIST');
              GO_BLOCK('INFO_MAST');
              EXECUTE_QUERY(NO_VALIDATE);
    EXCEPTION
    WHEN OTHERS
    MESSAGE(SQLCODE||' - '||SQLERRM);
    PAUSE;
    END;
    It works fine but it show all records while i m selecting only one record from List of values.
    Please tell is it possible to execute query from list of values after selecting a values.
    thanks,Check this Oracle Searching

  • Problem class important error while executing Query from favorites

    Hi Experts,
    1. I have tried execute the query from favorites it is showing the error message. " Problem class important"
        In the message text: logs showing error message [Attached the message screenshot].
    2. From "Query Designer" Execute [Ctrl+R] gives the error "500 Internal Server Error" [Attached the screenshot]
    3. Able to execute the reports from RRMX.
    No ST22 dumps. Can any one suggest about...how to rectify the errors.
    Thanks in advance...Surya

    Need tyo make sure the problem is with the query/workbook are general issue with all workbooks/query.
    1. Make sure the base query of work book is still executable. RRMX/RSRT.
    2. Execute the work book in Bex/Excel and look for definition of workbook; there might be some thing in the workbook referencing other than base query.
    3. If other workbook are also not working? need to check if other users have same issue.?
    Hope this will help to narrow the problem.
    Gopi

  • Execute query from report

    Hello,
    I would like to have a report wich contains a checkbox and a description. Depending on the checkboxes checked, the corresponding queries (stored in the same table, and for each description) should be executed and display the result on another page. The queries should be executed as from clicking a button.
    I have 2 question:
    1. how should I handle it for executing a query stored in a table? is it just report type sql query or something else...
    2. how can I know the exact lines (depending on the checked checkboxes when clicking the button?
    Thanks in advance!
    Regards,
    Sofie

    I'm first trying to count the checked boxes, to see if it is really doing the right thing.
    HTMLDB_APPLICATION.G_F01.COUNT counts the checked ones, right?
    so in my process i have:
    begin
    if HTMLDB_APPLICATION.G_F01.COUNT is not null then
    :P80_TEST := HTMLDB_APPLICATION.G_F01.COUNT;
    end if;
    end;
    but nothing is displayed in the field P80_TEST...
    what is wrong?
    Regards,
    Sofie
    PS: this seems to be a topic only for me :-)

  • Execute Query from string

    Dear forum members,
    Is it possible to execute a query from a string like this:
    DECLARE
      thishere  VARCHAR2;
    BEGIN
      f:='from iv_view_cqir_sum where 1=1 ';
      select sum(a) into thishere [...];
    END;The [...] should be taken from the string f...
    Any comments welcome!
    Cheers,
    Johann

    You can do it in this way:
    SQL> create table test1(id number);
    Table created.
    SQL> insert into test1 values(1);
    1 row created.
    SQL> insert into test1 values(2);
    1 row created.
    SQL> DECLARE
       v_var     VARCHAR2 (10) := 'where id=1';
       v_count   NUMBER;
    BEGIN
       EXECUTE IMMEDIATE 'select count(1) from test1 ' || v_var
                    INTO v_count;
       DBMS_OUTPUT.put_line (v_count);
    END; 
    1- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Calling execute query from WVI

    i wans to call the execute query function from the when-validate-item or in other words when i exit a text box i know calling execute_query from WVI is restricted but this is my requirement so pls tell me what is the way out for it... is there any other trigger in which i can do this or any other way out
    do reply
    thanx in advance
    amyt

    U will have to use combination of triggers
    depending upon your form.
    Key Next Item and WHen Mouse leave should be used

  • Execute query from OBIEE report

    Hi,
    Is it possible from an OBIEE report, after filtering records, to simply execute a (insert) query/function/stored procedure with this subset of filtered records (only id's are enough) as parameter ?
    Regards

    I'm first trying to count the checked boxes, to see if it is really doing the right thing.
    HTMLDB_APPLICATION.G_F01.COUNT counts the checked ones, right?
    so in my process i have:
    begin
    if HTMLDB_APPLICATION.G_F01.COUNT is not null then
    :P80_TEST := HTMLDB_APPLICATION.G_F01.COUNT;
    end if;
    end;
    but nothing is displayed in the field P80_TEST...
    what is wrong?
    Regards,
    Sofie
    PS: this seems to be a topic only for me :-)

  • Error execute query from stateful session bean

    Hi,
    I created a stateful session bean, it's flow are as following:
    - client invoke open()
    - client "iterate" using method next()
    - client invoke close()
    In open, I get Connection to db-source, create a PreparedStatement, and execeute the query, store in a resultset.
    In next(), I traverse the resultSet using next().
    In close(), I close both resultset, statemtn, and connection.
    Here's the snippet of my code:public SynchCatalogBean implements SessionBean {
        private Connection conn;
        private PreparedStatement stmt;
        private ResultSet rs;
        private static final String = "SELECT ? FROM ?";
        public void openCategory() throws RemoteException {
            DataSource dataSource =
                (DataSource)jndiContext.lookup(DATASOURCE);
            con = dataSource.getConnection();
            stmt = con.prepareStatement(QUERY);
            stmt.setString(1, "id");
            stmt.setString(2, "category");
            rs = stmt.executeQuery(); //this throws exception
        public String next() throws ... {
            if (rs.next())
        public void close() throws ... {
            rs.close();
            stmt.close();
            conn.close();
    }Well, the problem is, once I test with a simple client, the line rs = stmt.executeQuery() produce exception like this:[SynchCatalog] TRANSACTION ROLLBACK EXCEPTION:Error opening category; nested exception is:
        java.rmi.RemoteException: Error opening category
    [SynchCatalog] java.rmi.RemoteException: Error opening category
    [SynchCatalog]  at matashop.product.ejb.SynchCatalogBean.openCategory(SynchCatalogBean.java:66)
    [SynchCatalog]  at java.lang.reflect.Method.invoke(Native Method)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
    [SynchCatalog]  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
    [SynchCatalog]  at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
    [SynchCatalog]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
    [SynchCatalog]  at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
    ...My stateful-bean is "read-only" bean, it just execute a select statement, so why Jboss complain about transaction exception? Can anyone help me?
    -- Verdi March --

    agree, you cannot pass tablenames as ? parameters. Instead you should generate your SQL statement dynamically
    private static final String = "SELECT ? FROM ";
    public void openCategory() throws RemoteException {
    stmt = con.prepareStatement(QUERY + "category");
    stmt.setString(1, "id");

  • Execute Query from SAP Menu with Analyzer

    Hi.
    I have created a menu for users. This menu contains links to queries that are opened with Internet Explorer.
    Now, i want to have another link but instead of opening it with Internet Explorer, i want to open them with Analyzer.
    Is possible to launch a query trough SAP Menu link in Analyzer? User will not need to open it trough 'Folder + Open Query ..'
    Kind regards,
    Inigo.

    Here are couple of directions:
    1. Create a local workbook which has embedded query. Store this workbook on a remote server or BI/FTP and create a link from it. But once this link is clicked, that workbook will be downloaded and user will have to login again in BEx analyzer.
    2. If we can call transaction "RRMX" from web, it will eliminate problem of relogin.
    3. Launching BExAnalyzer.exe file from web should launch analyzer automatically. Check whether this file accepts any parameters like open dialogue or query name??
    Hope something helps..
    Abhijeet

  • Error During executing query from OBIEE

    Hi,
    I have installed EBS and i have integrated OBIEE with EBS. (on Windows server 2003).
    Now after logging to OBIEE, I went to the subject area for creating a Query.
    After selecting the column when i press button "Display Result"
    The following message is displayed.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.ICX_SESSION_COOKIE, has no value definition. (HY000)
    SQL Issued: SELECT "- Equipment"."Organization (Department Hierarchy)" saw_0 FROM "Manufacturing Hub Catalog" ORDER BY saw_0
    I have added the entry for my DB in Data Source (ODBC).
    Please tell me the reason for this error.
    Regards,
    Niranjan.

    Hi,
    i have a problem:
    when i open a query with OBI Answers i have this error:
    Error Code:OPR4ONWY:U9IM8TAC:OI2DL65P
    Stato: HY000. Codice: 10058. NQODBC [SQL_STATE: HY000|http://forums.oracle.com/forums/] [nQSError: 10058|http://forums.oracle.com/forums/] Si è verificato un errore generico({color:#ff0000}generic error{color}). [nQSError: 16001|http://forums.oracle.com/forums/] Stato errore ODBC: 28000 codice: 18456 messaggio: Microsoft[ODBC SQL Server Driver|http://forums.oracle.com/forums/][SQL Server|http://forums.oracle.com/forums/]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.. (HY000)
    Istruzione SQL eseguita: SELECT BEN010_TIPO_BENEFIT.X_DESCRIZIONE saw_0 FROM dbo ORDER BY saw_0
    What's the problem and can i do?
    Sorry for my bad english.
    I'm waiting an answer..
    Tanks.
    Roberto Testa
    Edited by: user10366555 on 7-ott-2008 2.42

  • How to dynamically query from an LOV CO?

    Hi,
    I have a page and AM
    I also have an LOVVO linked to LOVAM.
    The LOV Vo is query based and contains a whereclause like user_id = :1
    I have created a LovRN and LovCO based on the RN
    I want to filter LOV values based on logged in user ID during PR
    How to dynamicaly invoke the execute query from Lov CO PR() ?
    I have written a method in LOV AM and when I try to invoke it from Lov CO, i get an error 'Method does not exist'. Should I write the method in Room AM?
    In case I write the method in Root AM (linked to OA pages), how can I access the LOV VO as it is assigned to LOv AM only.
    Thanks,
    Kamath

    Hi
    write this code in CO
    OAApplicationModuleImpl am =
    (OAApplicationModuleImpl) pageContext.getApplicationModule(webBean);
    System.out.println("Inside CO");
    am.invokeMethod("initEmpVO");
    write this code in AM
    public void initEmpVO()
    VacancyVOImpl vo = getVacancyVO();
    System.out.println("Inside initEmpVO");
    if(vo == null)
    MessageToken errTokens[] = {
    new MessageToken("OBJECT_NAME", "VacancyVO")
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
    } else
    vo.executeQuery();
    System.out.println("Execute Query");
    Thanks
    Nilesh

  • Not able to execute Query in BEx Netweaver 2004s

    Hello Experts,
    I'm trying to execute query on the web from BEx Netweaver 2004s.
    But I get this message:
    The page you are looking for might have been removed or had its name changed.
    And the wired thing is I don't get host and port number in the address bar.
    http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=0CCA_C03_Q1000&VARIABLE_SCREEN=X&DUMMY=1
    But when I execute query from BEx 3.x it works.
    What settings should I check and make so that it works fine in the new version.
    One of the parameter icm/server_port_0  has a timeout limit set to 150.
    Thanks in advance.

    Thanks All of you but no luck as of now.
    While manually adding host and port into the address bar i got this message:
    The initial exception that caused the request to fail, was: 
    Connect from SAP gateway to RFC server failed
    Connect_PM  TYPE=A ASHOST=soanetp2:8001 SYSNR=01 GWHOST=soanetp2.GWSERV=sapgw01 PCS=1
    LOCATION    SAP-Gateway on host soanetp2 / sapgw01
    ERROR       hostname 'soanetp2:8001' unknown
    TIME        Fri Oct 10 15:52:43 2008
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -2
    MODULE      nixxhsl.cpp
    LINE        223
    DETAIL      NiHsLGetNodeAddr: hostname cached as unknown
    COUNTER     10
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect from SAP gateway to RFC server failed
    Connect_PM  TYPE=A ASHOST=soanetp2:8001 SYSNR=01 GWHOST=soanetp2GWSERV=sapgw01 PCS=1
    LOCATION    SAP-Gateway on host soanetp2 / sapgw01
    ERROR       hostname 'soanetp2.us:8001' unknown
    TIME        Fri Oct 10 15:52:43 2008
    RELEASE     700
    While following SAP note 947148 I found that we don't have any entry in table RSPOR_T_PORTAL
    What entry it should have? The note says that there should be a prefix maintained for your portal.
    Hope to solve this problem this weekend and let you all know what all steps i took.
    Thanks in advance
    Sonu

  • Trigger to execute query when value from LOV is selected

    HI Guys,
    I have a form in which I have 2 fields in Master and 4 fields in detail, all showing on the same canvas.
    I have put an 'execute_query' in when_new_form_instance trigger so that when I open the form it is pre - populated.
    The Master fields draw values from LOVs. I want to execute the master block query when the user selects a value from LOV, so in which trigger should I put it.
    I have tried in 'when_validate_item' and 'when_list_changed' triggers but it is showing an error.
    So, what should I do?
    Regards
    Ranjan

    I have designed a form in which there are two items in header level and two in line level. I have defined master - child relationship between the two blocks.
    I have put a execute_query for header in when_new_form_instance trigger so that when user opens the form, all fields are initially populated.
    Each Field has an LOV attached to it.
    Form Outline :
    Header : Ledger Name
    Ledger_approver
    Line : Approver
    Amount
    Initially all details for Ledger L1 is populated.
    If the user now selects Ledger L2 from LOV, then when he moves out of that item, immediately all details about L2 should get populated in the fields.
    I Have tried execute_query in when_validate_item of Ledger Name but I get error that we cannot use restricted procedure in when_validate_item trigger.
    I hope this explains my issue.
    Regards,
    Ranjan

  • 0ADHOC error while executing the query from Report Designer

    Hi All,
    When I am executing The Query from Report Designer,  am getting the below error.
    Please help me in this regard.
    The initial exception that caused the request to fail was:
    The Web template "0ADHOC" does not exist in the master system
    com.sap.ip.bi.base.exception.BIBaseRuntimeException: The Web template "0ADHOC" does not exist in the master system
    at com.sap.ip.bi.webapplications.runtime.service.template.impl.TemplateService.getTemplateContent(TemplateService.java:57)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.service.template.PortalTemplateAccessService.getTemplateContent(PortalTemplateAccessService.java:82)
    at com.sap.ip.bi.webapplications.runtime.preprocessor.Preprocessor.parseTemplate(Preprocessor.java:163)
    at com.sap.ip.bi.webapplications.runtime.xml.XmlTemplateAssembler.doInit(XmlTemplateAssembler.java:79)
    at com.sap.ip.bi.webapplications.runtime.template.TemplateAssembler.init(TemplateAssembler.java:133)
    Thanks,
    KVR

    Hi,
    The web template 0ADHOC is usually the standard web template for 3.x queries. The Report Designer executes the reports in java web, thus tries to find the template 0ADHOC in the 7.0 templates and does not find it. Check whether you have maintained the standard web template 0ADHOC for 7.0 reports also:
    Transaktion SPRO -> SAP Reference Image -> SAP NetWeaver -> Business Intelligence -> Settings for Reporting and Analysis -> Bex Web -> Set Standard Web Templates
    Best regards,
    Janine

  • Error while executing report from Query designer

    Hi All,
    When I am executing from query designer, I am getting following error.
    Even I can't execute it from another portal where i created source system of BI server.
    But i can execute queriew from Query analyser and t-code RSRT.
    When I execute from Query desinger the url is as follows.
    http://XXX:00/irj/servlet/prt/portal/prtroot/pcd!3aportalcontent!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=0PA_C01_Q0201&VARIABLE_SCREEN=X&DUMMY=5_
    And the error is:
    500 Internal Server Error
      BEx Web Application
    Failed to process request; contact your system administrator
    Information for Administrator
    To avoid this exception see the steps below. To help SAP better investigate this issue, you will need to provide the diagnostic information from these steps.
    1. Most likely, the issue you are experiencing has already been corrected. Please make sure that the most recent patch level is deployed on your system according to notes 1033246 and 1011241. Starting with Support Package Stack 16 patch level 30, BI Java is delivered according to the synchronized delivery process described in the note 1033246.
    2. Please ensure that NetWeaver Business Intelligence Diagnostics & Support Desktop Tool  does not report any issues on your server according to note 937697. You can start it by clicking here (administrator permissions are required).
    3. When opening any customer message on this issue, please attach:
    Support Desktop Tool support info ZIP  file according to note 937697,*
    Required information for reproduction  according to note 948490.*
    Error Summary
    Exception occured while processing the current request; this exception cannot be handled by the application or framework
    If the information on this page does not help you locate and correct the cause of the problem, contact your system administrator
    To facilitate analysis of the problem, keep a copy of this error page Hint: Most Web browsers allow you to select all content, and copy and paste it into an empty document (such as in an email or simple text file)
    Root Cause
    The initial exception that caused the request to fail was:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at com.sap.ip.bi.webapplications.runtime.service.metadata.impl.MetadataAccess.getMetadataModel(MetadataAccess.java:139)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.getMetadataModel(Page.java:8953)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.normalizeCommands(Page.java:4963)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:4473)
    at com.sap.ip.bi.webapplications.runtime.impl.Page._processRequest(Page.java:3316)
    Details: Full Exception Chain
    System Environment
    Server
    BI Java Release: 7 - Patch level: 0000000100 - Description: BI Web Applications Java - Additional info:  - Production mode: true
    BI ABAP unknown
    Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM - Sun Microsystems Inc. - 1.4.2_24-b04
    Operating System SunOS - amd64 - 5.10
    REgards
    Mohan

    Hi mohan ,
      You can check these OSS notes for the issue  .
    1. 795699 - Customizing default error messages for HTTP
    2. 807000 - Http requests are not fully read after timeout
    3. 804124 - HTTP communication with XI Adapter Engine fails
    Regards,
    Lokesh

Maybe you are looking for

  • File causes crash

    Everytime I try to open a certain file, inDesign crashes. I really need the file. Help?

  • Blind Network

    Hey everyone, I work on a mac (OS X, 10.4, G4.) in windows environment. Recently I needed to connect to the shared network first time, but when connected, the network seems empty, not a file insight. When I tryed to upload files, it didn't work eithe

  • Runtime.exec  problems

    Hi I would like to open a chm file from my "help" menu. I got two problem related to that: 1.The first time the menu is clicked i start the process and the help is opened on top of my application frame. but - the second time It is opened - the only w

  • "DPM uses the Volume Shadow Copy Service (VSS)"

    "DPM uses the Volume Shadow Copy Service (VSS) to create a snapshot of the protected data." According to MS (http://technet.microsoft.com/en-us/library/bb808827.aspx) Does that mean  I have to set asides space on the protected server (a file server),

  • Latest version of Photoshop

    What is the latest version of Photoshop and where can I buy it?