Execute query  not give result

Hi master
Sir lets suppose I have emp form and I put under blow code in when button press event
When_Button_press
go_block('emp');
enter_query;
:emp.deptno := 10;
execute_query;
but
when I press button then no result no data in any field and curser present in first column or form.
It is my idea the execute query are not run or these command are not run
:emp.deptno := 10;
execute_query;
system not replace data and no run execute_query
please give me idea
Thanking you
Muhammad Fahim Aamir

Hi master
Sir when I use this code with numeric data work fine
DECLARE
     DD VARCHAR2(15);
BEGIN
     DD:=10;
set_block_property('emp', default_where, 'where
DEPTNO='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
But When use with string data then not give result I
press f8 and show all record
With character not give any result
DECLARE
     DD VARCHAR2(15);
BEGIN
     DD:='SALESMAN';
set_block_property('emp', default_where, 'where
RTRIM(EMPNO)='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
Please give me any ideaYour problem is in your where clause you do not put the word where in the where clause as it is assumed
I usually declare a variable v_where VARCHAR2(200);
and then assign it my new where clause
v_where := ' RTRIM(EMPNO)='||DD;
GO_BLOCK ('emp');
SET_BLOCK_PROPERTY('emp',default_where, v_where);
EXECUTE_QUERY;
v_where := null; ---clean up
This allows you to easily put your where clause into a message
message(v_where);
so you can see what is really being queried. This is very useful when you are using multiple values to make sure you have all the apostrophes that you need
eg: v_where := v_where := 'item_type <> ''CAT'''||' and user_id = '''||:login.user_id||'''';

Similar Messages

  • Execute query  run fine with numeric data not give result on string data

    Hi master
    Sir I use under blow code for execute query
    sir when I use numeric data then run fine but when I use character data then not give any result
    with numeric run fine
    DECLARE
         DD VARCHAR2(15);
    BEGIN
         DD:=10;
    set_block_property('emp', default_where, 'where DEPTNO='||DD);
    go_block('emp');
    execute_query;
    set_block_property('emp', default_where, '');
    END;
    With character not give any result
    DECLARE
         DD VARCHAR2(15);
    BEGIN
         DD:='SALESMAN';
    set_block_property('emp', default_where, 'where RTRIM(EMPNO)='||DD);
    go_block('emp');
    execute_query;
    set_block_property('emp', default_where, '');
    END;
    Please give me any idea

    bro it is not working on string format coz of the missing quotes. e.g. 'smith' or smith. so the quoted string will be compared. in set_block_property u have to include extra quotes on the variable. e.g.
    set_block_property('emp',default_where,'where ename='''||:emp.ename||'');
    or with conditional statement
    set_block_property('emp',default_where,'where ename='''||:emp.ename||''' and dname='''||dept.deptno||'');
    there i included two extra qoutes before joining ename and in the an extra quote to complete to string. if u would like to debug at runtime to show if the qouted string condition is proper then assign the where clause to a variable and message it up.
    like
    myvariable:='where ename='''||:emp.ename||'';
    message(myvariable);
    message(myvariable);
    set_block_property('emp',default_where,myvariable);
    after the string is quoted properly the execute query will work fine, also use the function upper or lower to compare strings.
    zaibi.

  • BEX Query not dispaying results

    Hi All,
    I think this week am hit with number of issues....as mentioned in my earlier posts am new to SAP BW and having issues.
    Issue:
    We have a BEx query and it is not displaying results(in Web report). Error is "could not find any records for the given selection......... "
    I have checked the Infocube for the given selection in Query and I can display the records where as it is not displaying at all in BEx query results.
    I have reactivated the cube to see whether the data flows through but it didn't work.
    I tried executing query using RSRT and it is not displaying any results.
    I have deleted data in the infocube and loaded it again and it didn't work
    Any help would be much appreciated.
    Cheers
    Sandeep

    Hi Akshay,
    No errors while executing query under RSRT.
    Yes we are using time variants and we have included fical variant under characteristic restrictions.
    Cheers
    sandeep

  • Execute query not working  in CALL_FORM

    Hi,
    I am opening FormA from FormB, when clicking a button, and pass the values to Form B,
    by using the global variables, and assigned these values in the pre-query of Form B, When clicking button Form B is
    opening, but nothing displaying, I need to click on Execute Query to get the data displayed.
    I am calling Form B by using CALL_form('FORMB.FMX');
    Statment In the WHEN-NEW-FORM-INSTANCE of Form B
         EXECUTE_QUERY; << This not working >>           
         GO_BLOCK('NRT_HEADER');
    Oracle & Forms Verison : 10g
    Thanks in advance
    Rizly

    Thanks Francois & Tony.
    The problem got solved by using NO_HIDE
    CALL_form('POPUP_NRT_FILE_HEADER.FMX',NO_HIDE);
    Now the data & form is visible, But when I click on the any other field ( other than the first field), the screen is becoming blank, again I need to click on the Execute Query button, but after that I can click on any other field it wont go invisible.
    THanks in advance
    Edited by: RizlyFaisal on Sep 25, 2008 2:30 AM

  • Execute Query not working on custom forms

    Hi
    After upgrading from 11.5.10.2 and Oracle 9.2.0.5 to ATG6, AD6, oracle 10.2.0.4, Forms 6.0 (Form Compiler) Version 6.0.8.28.0 . The execute query (F11 & CTRL F11) is not working on custom forms. But after tabbing from one column to another column then press CTRL F11 is working.
    Please any one help me on this issue.
    Thanks
    sva

    Hi
    I found this error in the trace file. Please help me what is the problem, the data is there in the table.
    Out Argument 0 - Type: String Value: ORA-01403: no data found
    Executing NAME_IN Built-in:
    In Argument 0 - Type: String Value: parameter.G_query_find
    Out Argument 0 - Type: String Value: NULL
    Executing USER_EXIT Built-in:
    In Argument 0 - Type: String Value: FND MESSAGE_CLEAR
    MCXQPBULKINVOICEENTER, -1, Built-In, Entry, -1196178744, USER_EXIT
    TSE FSERVER_START -1 1407 1279530838565801000
    TSE FSERVER_END -1 0 1279530838579778000MCXQPBULKINVOICEENTER, -1, Built-In, Exit, -1196091744, USER_EXIT
    Executing COPY Built-in:
    In Argument 0 - Type: String Value: Entering app_debug.clear
    In Argument 1 - Type: String Value: global.frd_debug
    Executing FIND_GROUP Built-in:
    In Argument 0 - Type: String Value: APP_DEBUG
    Executing COPY Built-in:
    In Argument 0 - Type: String Value: Completed app_debug.free.
    In Argument 1 - Type: String Value: global.frd_debug
    Executing MESSAGE Built-in:
    In Argument 0 - Type: String Value: FRM-41003: This function cannot be performed here.
    In Argument 1 - Type: Number Value: 121
    Unhandled Exception ORA-100501
    State Delta:
    MCXQPBULKINVOICEENTER, -2, Trigger, Exit, -1190876744, ON-ERROR
    ##### CTIME STARTS HERE
    # 8 - MCXQPBULKINVOICEENTER:BLOCKNAME.RADIO_BUTTON81.1279530839956685000
    KEY Execute_query
    Error Message: FRM-41003: This function cannot be performed here.
    N-ERROR Trigger Fired:
    Form: MCXQPBULKINVOICEENTER
    State Delta:
    MCXQPBULKINVOICEENTER, -2, Trigger, Entry, 181183256, ON-ERROR
    MCXQPBULKINVOICEENTER, -1, Prog Unit, Entry, 181304256, /MCXQPBULKINVOICEENTER-3/P58_07_DEC_200909_04_40
    Executing COPY Built-in:
    In Argument 0 - Type: String Value: Entering app_standard.event. Event is ON-ERROR.
    In Argument 1 - Type: String Value: global.frd_debug
    Executing ERROR_TYPE Built-in:
    Out Argument 0 - Type: String Value: FRM
    Executing ERROR_CODE Built-in:
    Out Argument 0 - Type: Number Value: 41003
    Executing ERROR_TEXT Built-in:
    Out Argument 0 - Type: String Value: This function cannot be performed here
    Thanks
    sva

  • Execute Query - Not finding data

    I have a form with a Master-Detail-Detail (I will refer to them as Master, Detail_1, Detail_2) relationship between blocks.
    There is a WHEN_NEW_FORM_INSTANCE trigger that populates a record group and then sets a list item in Detail_1 to the record group values. All other behavior is default forms.
    When I perform an execute query using the default toolbar buttons, no data is returned even though data exists in the corresponding tables.
    I am thinking that the setting of the list item may be causing the query to fail but I'm not sure. I have commented out the working code in the WNFI trigger and just have a NULL; statement as a test, but the default query still returns no data.
    Do I need to clear the list item of its values? If so, at what point should I do this (enter-query)?
    My Forms version is 10.1.2.
    I appreciate guidance on this matter.

    The query may be failing because you are retrieving a record that has a value that is not listed in the list item's list of values. Use the list item's Mapping of Other Values property to tell Forms what to do when it retrieves a value not found in the list of values. Also see the CONVERT_OTHER_VALUE built-in.

  • Execute query not workin on application server

    i have upgraded my form to 10.1.2.0.2 successfully and can host them using the application server ....
    in the form i have got various tab canvas,stacked canvas,contect canvas.....
    but my execute query function is not working ...dont know why

    @abdetu...
    hey buddy every thing is working fine now ....
    according to your suggestion i checked the errors...
    and found that some of the columns were not exported properly from the targer database ...
    after adding the database everything started to work perfectly fine
    once again thnx a lot for ur help and time

  • Query not fetching results and shows executing

    All,
    When I run a query from SQL Plus I am getting query results immediately table with more than 50,000 rows), but when I run from TOAD or PL/SQL Developer am not getting any result and all I see is query executing no error message also.
    Surprising part is I am able to see results if the table is less than 100 rows in SQL Plus, TOAD and PL/SQL Developer.
    Please tell me is there anything I have to do in the database configuration, I am facing this issue due to database move to a new server.
    Thanks in advance

    Anand,
    I don't see this as an issue with TOAD or PL/SQL Developer, the reason is using my TOAD or PL/SQL Developer I am able to connect to the copy of this database (DEV) and able to fetch results. Only in the database I migrated to the new server I am not able to fetch results from connecting through any application, the only place I am able to run and get results is SQL PLUS.
    So I believe this is something which I am missing in my database configuration or in my new server.
    Please help me
    Thanks in Advance

  • Stop executing query once the result is more than n rows

    Hi,
    Is it possible to stop executing a query for a View Object once the result hits n rows?
    Any pointers are appreciated
    Thank you for your time.
    Edited by: user594688 on Sep 12, 2008 8:21 AM

    Rownum is indeed the attribute. If you really want to stop the query after the first n rows, that's pretty much the only way to do it, to my knowledge.
    If you're primarily worried about database load, but want to give the user the option to query more rows if and when they really need them, check out the following in the Fusion Dev Guide for Forms/4GL developers:
    37.1.5 Efficiently Scrolling Through Large Result Sets Using Range Paging
    (Note that this is not the same as simply using a range size, which ADF does by default--the range size simply limits the number of rows displayed ot the user, not the number queried. It's also not the same as setting the JDBC Fetch size, which limits the number of rows loaded into the cache, and therefore onto the app server, at one time, but again not the actual query result.)

  • QUERY NOT SHOWING RESULTS

    Hi Experts ,
    iam facing issue with one the quey, the query has built on cube and it is restricted based on calday, when iam exwecuting the query the below message is coming.
    "Warning Aggrehate cannot be used ,as 0REQUID IS IN DRILLDOWN
    wARNING mAXIMUM number of rows(65535) ecxeeded.Result is in complete."
    and when i click on cancel button the below messahe is coming .
    ""There is not enough sapce to dispaly all the rows of query result" and in cube the records are only 50,000.
    So could any one let me know what are the possible reasons for this issue and how i rectify this issue.
    when i checked in RSRT it leads to short dump "SYSTEM_NO_ROLL"
    Error analysis
        More main memory area was requested.
        However, all the available space has been used up.
        Possible reasons:
        - Many (large) internal tables.
        - Many (large) programs active.
        - Deep nesting of subroutines with a lot of local data.
    Please give me the appropriate resolution for the same.
    Thanks in advance,
    Madhu.

    Hi Madhu
    Are on BW 3.5 or Bi7?
    Please check your query definition if you have  0REQUID in Row /Colums/ or Filter tab.
    First of all this error message is saying that your query is not using aggregates because of some reason, may be 0REQUID is present the query definition.
    Secondly, when you run the query from RSRT open another session in use transaction code SM50 to know what the query is reading. May be your Cube contains too much of data for which system can not provide enough memory area.
    You can also look at the below notes if you are on SAP BW 3.5 system..
    https://service.sap.com/sap/support/notes/842495
    https://service.sap.com/sap/support/notes/1085471
    Regards
    Anindya

  • QBE style(Find-Execute) Query not executing when VO has bind parameter

    I have an Entity Based ViewObject that is composed of 3 Entities so the entities are related through an Assoc. Then the ViewObject also has a bind paremeter defined and used in the WHERE clause.
    In my page everything is fine until when I use/click on the Find operation on the JSF page. When the Find operation is executed the page/form goes blank so I can enter by QBE query. Now when I Execute my search by executing the ExecuteWith params operation. Nothing is happening to the screen, it seems that query was not executed. Although there was no errors or exceptions displayed.
    However if I remove the bind parameter, and execute the Execute operation instead after going to Find mode, the query is executed properly and I get expected results.
    My problem is a bit general, but are there anyone who had a similar problem like this? Im still in the process of creating a test case.
    regards,
    Anton

    Hi Frank,
    But the "ExecuteWithParams" operation provides the bind variable right? (i had the value hardcoded on the pagedef). So it must have supplied a value. I also noticed that this is happening only when if the VIewObject contains two or more Entities. If the Viewobject has only 1 entity, the ViewObject queries properly.
    Anyway Frank, I had found a fix for this. I set an InvokeAction on the pagedef that binds to the ExecuteWithParams that is invoked during page load only(!postback condition). and then I just use the Find-Execute operations instead of the Find-ExecuteWithParams operations that I used previously.
    I will try to replicate the issue again to investigate what's really going on. I just want to know if its a bug or just an expected behavior or i just made a mistake.
    regards,
    Anton

  • Query Not Showing result

    Hi all,
    I am having one query which i have included into Workbook. and query is based on purely Zee datasource and Zee infoprovider.
    While refreshing my workbook it is not brining any result. but cube has reporting status available. I have tried all option like copy, again trasport etc but still not working. One thing if i have run without structure means free selection then it is brining the result. I m not understading why it is happening like this.
    I am in BI Prod server.
    please revert back.
    amit shetye.

    Structures have restrictions check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm

  • Query not showing result  for 1st column

    dear all,
    i want to show the result row for my query for the 1st column...
    e.g. i have column cost center, po number and vendor both po number and vendor will show the result column but not cost center.. any idea why?
    here are my bex settings for cost center
    supression = never, normalization = no normalization.

    Hello -
    You check for costcenter data in the data targets, for the given PO and vendors,.
    If data exists then it should be available in the reports,.
    Else it won't .
    Regards,
    Vishwa

  • Unoin all Query not showing result

    I write the query with sub query
    query 1 has no any record
    query 2 has one record
    I do query 2 - query 1 (qty)
    display nothing??
    select null doc_type,
            null docno,
            null docdate,
            qry1.itemcode,
            qry1.itemname,
            null party,
            null itemunit,
      nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty
          from (                                           --------- Query 1 for Check Out Quantity ----
                                                select itemcode,itemname,sum(qty) OUTQTY from smd
                                           where (doc_type ='SAO'or doc_type = 'D.C')
                                            and (docdate < :dd1)
                                            group by itemcode,itemname) qry1,
                                                        ------------Query 2 for check In Quantity ----
                                              (select itemcode,itemname,sum(qty) inqty from
                                            (select itemcode, itemname,qty from smd where doc_type ='OPN'
                                            union all
                                            select b.itemcode, b.itemname,sum(nvl(b.qty,0)) qty from smd b
                                            where (doc_type ='SAI' or doc_type = 'MRN')
                                            and (docdate <= :dd1)
                                            group by b.itemcode, b.itemname)
                                            group by itemcode,itemname                              
                                            ) qry2                                         
                                            ----------- to check the conditions ---------                                                                      
                                            where qry1.itemcode = qry2.itemcode (+)
                                            and qry2.itemcode between :itm1 and :itm2     
    Results of both sub query
    Qry1 =itemcode = null, itemname = null, outqty = null ( has no any record)
    qry2 = Itemcode = 0010002 , itemname = Computer , inqty =100why nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty not working
    What is wrong in this query

    Thank you experts
    I try but showing error
    select null doc_type,
            null docno,
            null docdate,
            qry1.itemcode,
            qry1.itemname,
            null party,
            null itemunit,
      nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty
      from (                                           --------- Query 1 for Check Out Quantity ----
                                                select itemcode,itemname,sum(qty) OUTQTY from smd
                                           where (doc_type ='SAO'or doc_type = 'D.C')
                                            and (docdate < :dd1)
                                            group by itemcode,itemname) qry1
                                               full outer join
                                                        ------------Query 2 for check In Quantity ----
                                              (select itemcode,itemname,sum(qty) inqty from
                                            (select itemcode, itemname,qty from smd where doc_type ='OPN'
                                            union all
                                            select b.itemcode, b.itemname,sum(nvl(b.qty,0)) qty from smd b
                                            where (doc_type ='SAI' or doc_type = 'MRN')
                                            and (docdate <= :dd1)
                                            group by b.itemcode, b.itemname)
                                            group by itemcode,itemname                              
                                            ) qry2                                         
                                            ----------- to check the conditions ---------                                                                      
                                            on (qry1.itemcode = qry2.itemcode)
                                            and qry2.itemcode between :itm1 and :itm2          
    ORA - 00600

  • Content Query not producing results when using [Me] filter

    Hi
    I'm using a Content Query web part and I'm trying to show the most recent document modified by each site user by applying it across the site collection and using the Filter, Modified By [_Hidden] equals [Me]. However, this doesn't seem to work for any user
    - the web part is always blank. I have tried different combinations such changing equals to contains, and using the Modified By field etc - nothing gives me the correct results. If I instead take the [Me] out and instead use the "people chooser"
    and set to a specific person then I seem to get the results I would expect - however I cannot hard code a given user.
    Does anyone know how to use [Me] correctly?
    Thanks

    Hi  sjb500,
    According to your description, please take steps as below to meet your demand:
    With the page layout open in Design view, double-click the Content Query Web Part.
    In the Content Query Web Part dialog box, click the plus sign (+) next to Query to expand it.
    In the Source section, click Show items from all sites in this site collection.
    In List Type section, in the Show items from this list type, click Document Library.
    In the Content Type section, in the Show items of this content type group list, click Document
    Content Types.
    In the Content Type section, in the Show items of this content type list, click Document.
    In the Additional Filters section, under Show Items When, click Modified By [_Hidden] in
    the first box, click Is Equal To in the second box, and then click [Me].
    In the Content Query Web Part dialog box, click the plus sign (+) next to Presentation to expand it.
    In the Grouping and Sorting section, in the Sort items by list, click Modified
    and Select Show items in descending order.
    Click OK.
    Reference:http://office.microsoft.com/en-us/sharepoint-designer-help/display-data-from-multiple-lists-with-the-content-query-web-part-HA010174134.aspx
    [Me] is a variable that stands for the user who is currently viewing the page that contains the Content Query Web Part in the browser.
    Here is some scenarios using [Me] in Content Query Web Part:
    http://social.technet.microsoft.com/Forums/en-US/346ffbe6-d7ba-467e-b7f5-6d6e289677a1/user-tasks-web-part
    Please inform me freely if you have any questions.
    Thanks

Maybe you are looking for

  • In reference to Adjusting  the width of the column in ALV

    Hi All, This is in reference to the thread Adjusting size of column Here LR_COL is of type what? I did as follows. data: lr_column type ref to cl_salv_wd_column. create object lr_column. I am getting an error saying "The obligatory parameter "ID" had

  • Report parameters when using DoCmd.OutputTo

    OK,   Thank you one and all for answering my last question. I have another one. OK, I can set the report's parameters using the where clause part of the DoCmd.OpenReport. Great! But I also save that report as a text file using the following command D

  • OS 3.1 install nuked my iPhone data! How can I recover it? Help!

    I have an original 2G iPhone. This week, I updated my MacBook Pro (previous generation, OS 10.5.8) to iTunes 9, and installed the iPhone OS 3.1. Before doing so, I made sure to back up all the apps, music and media and all data on my iPhone. When I i

  • External hard drive icon has disappeared

    I have a 160gb acomdata external on FW. About a week ago the icon for the external disappeared (prior to the icon dropping out everything worked fine). Finder does not display it. If I use DU I can see the drive, get drive info and see the files on t

  • Yellow tinted iphone 3G screen compared to other 3G iphones?

    Hi guys, I juts purchased a new iPhone 3G, however when I compare this to either my friends iPhone 3G or any of the demo handsets instore, mine has a noticably yellowish tinge to it. I am aware that Apple changed the white point between 1st gen iPhon