Suppress the enter-query mode when no-data-found after execute a query.

HI,
Greetings of the day, Can any one suggest me that how to Suppress the enter-query mode when no-data-found after execute a query on the form by a button.
whenever i execute query on form and result is no data found then form :system.mode is still in enter-query mode.
i want that if result is no data found then form comes back it initial state.
i will thank full of him who will help me..
Thanks in Advance..

Put this in your Key-ExeQry trigger:Execute_Query;
If Get_block_property(:System.current_block,query_hits)=0 then
  Exit_form; --this cancels the Enter-Query mode; Does not exit the form.
End if;You may want to trap and prevent the "FRM-40353: Query cancelled" message, and change the "FRM-40301: Query caused no records to be retrieved. Re-Enter" message. To do that, you need an On-Message form-level trigger:Declare
  Msg_Code Number        := MESSAGE_CODE;
  MSG      Varchar2(150) := SUBSTR('   '||MESSAGE_TYPE||'-'
                         ||TO_CHAR(Msg_Code)||': '||MESSAGE_TEXT,1,150);
BEGIN
  If Msg_Code=40301 then
       -- 40301: Query caused no records to be retrieved. Re-Enter
    Message('  NO RECORDS FOUND',No_acknowledge);
  Elsif Msg_Code=40353 then -- Query cancelled.
    null;
  Else
    MESSAGE(MSG,NO_ACKNOWLEDGE);
  End if;
End;

Similar Messages

  • Need to change the standard error message when no data found in a window

    Hi All,
    We have a button in our screen, on clicking we show a window with details from a view for the selected record in the screen using master-detail relationship.
    But, if i dont have any data to display, it is giving standard message,
    " FRM-40350 Query caused no records to be retrieved " in a seperate window,
    And if i click on Ok then the window is opening up with no records/data.
    My Requirement is to
    1. I need to show a custom message(some user friendly mesg) instead of standard mesg
    2. And the window should not open at all.
    I tried putting with :system.message_level=5 to suppress the standard mesg. But how we can achieve other two requirements.
    And this should happen at block level only not at form level.
    Please suggest me in this.
    Thanks
    Pavan

    Hi,
    No, I have just put my original code.
    This is what i have tried based on our suggestion.
       BEGIN
              IF event = 'WHEN-BUTTON-PRESSED'
                   --AND cnt <> 0
              THEN  
              GO_BLOCK('XXSCP_GBL_CUST_PEG_V');
          EXECUTE_QUERY;
          l_chr_so := :xxscp_gbl_cust_peg_v.sales_order_number;
          fnd_message.DEBUG('SO:'||l_chr_so);                                                                    
          :parameter.p_excep_detail:='FALSE';
              IF l_chr_so IS NOT NULL
                   THEN
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_CON');
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_STK');
              app_window.set_window_position('XXSCP_GBL_CUST_PEGGING_WIN',
                                             'CASCADE',
                                             'XXSCP_GBL_EXCEP_DETAILS_WIN');     
          fnd_message.DEBUG('xx');                                                                    
          END IF;                                        
          ELSE
              NULL;
              END IF;
        EXCEPTION
             WHEN OTHERS
             THEN
             NULL;
       END;I can see, its not going to IF conditon, stil the window pops up.
    Thanks
    Pavan

  • Message "No applicable data found" after executing the report

    Hi all,
    I have 60 records in a cube which is extracted from a function module. I am able to see the data in the cube but when I execute the report I am getting the message u201CNo applicable data foundu201D. Why is that so?
    Can any one please explain me what to do to bring data when the report is executed?
    When I execute the query there is only one field selection criteria 0P_FPVANT and this is mandatory. When I checked the data in the cube I didn't find any field 0P_FPVANT but I found a field Fiscal Period Variant with the technical name, 0FISPER
    I executed the query in RSRT and there also I am getting the same message, "No applicable data found".
    Please advise what do I need to do inorder to get data when the report is executed?
    Thank you.
    Regards,
    Pavan.

    I think so.
    Ok let me take the other report 0FIAR_C02_Q1003. For this report the selection criteria is
    Company code,
    Customer and
    Period/Fiscal Year
    Of these only company code is mandatory. In the data in the cube I see that for co. code BP01 data is available. So I executed the report with co. code as BP01 but no data.
    Then I gave co. code BP01 and Period /Fiscal year as 2008, 2008.03, still I see no data.
    I tried with values in all the fields that are available in cube
    co. code - BP01
    Customer - PCS-C10
    Period/Fiscal Year - 2008011
    Now with respect to Period/Fiscal Year selection field in report, in cube there are 4 columns
    Fiscal Year Period,
    Posting Period,
    Fiscal Year Variant and
    Fiscal Year
    I've tried all of them but when I enter values in all the fields still I am getting the same error, "no applicable data found".
    Please advise.
    Thank you.
    Pavan.

  • My macbook pro 2.0 early 2011 will not go to sleep with the power source connected. only enters sleep mode when running on battery. Someone did this happen, and it could solve?

    Alo, my Macbook pro i7 2 GHz Intel Core i7 (early 2011) will not go to sleep with the power source connected. only enters sleep mode when running on battery. Someone did this happen, and it could solve?

    There is no output from that command line?   Maybe the pid changed.
    I'll repeat what I am trying to find out...
    1. You do a pmset -g on the terminal.
    2. The output from that pmset should have a line that says "sleep 0 (imposed by n)" where n is some number.
    3. The ps ax | grep n is supposed to display what the process associated with n is.
    It's the output from step 3 that should indicate what is causing you not to sleep.
    But speaking of sleep, that's where I am going.

  • TS1538 ipad does not come on once its unpluged from power source,it enters recovery mode when both power and home botton are pressed with usb on powersource but does not come up at all when connected to computer or out of power source

    ipad does not come on once its unpluged from power source,it enters recovery mode when both power and home botton are pressed with usb on powersource but does not come up at all when connected to computer or out of power source

    What model iPad do you have? If it's an iPad 1, the battery may have expired and needs replacement.
     Cheers, Tom

  • All-in-one 6830 printer Does not enter sleep mode when connected to a phone line

    HP staff  help. HP all-in-one printer 6830 does not enter sleep mode when conntected to a phone line via 1-Line jack.  The Firmware is PNP1CN1521AR. On August 1, 2015,  I purchased an HP all-in-one 6830  printer and upgraded to firmware PNP1CN1521AR.When a phone line is connected to 1-Line jack of 6830, the printer will no longer enter  sleep mode and the display remains on indefinitly.Removing the phone connection either from the wall outlet or from the printer causes the sleep mode to work correctly again where the control panel display turns off after 5 minutes (or optionally  after 10 or 15 minutes).This problem was previously reported by a user and has not been resolved, see:http://h30434.www3.hp.com/t5/Other-Printing-Questions/Sleep-mode-of-Officejet-Pro-6830/td-p/4772182 The user did not receive a resolution to this problem according to the thread.
    There seems to be a  6830 printer firmware or hardware problem causing this. HP  should be able to confirm this problem on 6830 easily.
    Please advise ASAP.
    Thanks 

    It's a regular analog phone line. I've tested it with other phone lines. No difference. I have another all-in-one printer which works fine (goes to sleep mode) when plugged into the same phone line.
    The 6830 works ok in other aspects. The only problem is the sleep mode. Any 6830 with the firmware I mentioned should replicate the same result, regardless of anything else. The previous firmware to PNP1CN1521AR also created this problem according to the original report of this problem by another user.
    I'm sure there's a bug in the firmware. A subroutine in the firmware monitoring the incoming fax ringing, mistakenly, sees the voltage across the phone jack pins as an event and wakes up the printer instantly even though there's no ringing. As the previous user also suspected, there seems to be an error in the phone line voltage threshold used by the firmware. The present firmware always sees a ringing at the phone line which causes it to never stay in sleep mode.

  • What is the default staging mode when it is: (not specified) ?

    Hi All,
    What is the default staging mode when none is specified?
    As per docs, there are three: stage, no stage and external stage
    http://docs.oracle.com/cd/E17904_01/apirefs.1111/e13952/taskhelp/deployment/SetAServerStagingMode.html
    Many thanks.
    Running Weblogic 10.3.5.0 on OEL.

    "stage" directory means that the EAR file will be temporarily copied to that location and will be used only when the application source directory is not available OR when the administration server is down.
    It is like a local copy of the source directory for your application.
    Sometimes, during restart/redeployment, the managed server could pick the application files from the stage directory.
    But, in general if you use the "Update" option in "Deployment", the files in the stage directory are replaced by the files from the "source" directory.
    What I suspect here is in PROD, if you might have any permission issues with the stage directory?
    Can you please check that the stage directory is owned by the user running the server process AND that the directory permissions is set to 755. And not only directory the files also should inherit the same ownership and permissions.
    That is the only thing I can suspect.
    Arun

  • Collapsed Tabular Form Heading when "No data found".

    The ' Collapsed Tabular Form Heading when "No data found" ' problem (speculated to be bug 9893564) is discussed here: {message:id=4419231}. Warning link is out of date. I'm still seeing it in APEX 4.2.
    I support Kelly's comments "looks like something is broken" and "Now this header (which is sized smaller before data is retrieved) comes between the search items and the help message and looks clumsy.".{message:id=9185914}.
    Any suggestion to get around it when no data is found?
    1) Is there a way to hide the header when there is no data? Or,
    2) Is there a way to adjust the width of the columns if the header must display? I'd like them to be about what they are when data is displayed. I know those lengths but not how to affect the header width for a tabular report with no data.
    Example:
    WS APEX_EXAMPLES_01
    demo
    demo
    Appl 78329 Tabular Form - page 1. (I forced query not to find any data for demo purposes.)
    Thanks,
    Howard

    Howard (... in Training) wrote:
    Paul --
    Great! So many new techniques here -- new to me. Generally, I much prefer positive logic as well. But this solution seems to have more pieces than the other.There is method in that.
    Firstly, with Aljaz's approach you can see a flicker as the tabular form is actually rendered and then hidden when the script in the footer is eventually run. This will be more apparent with a longer or more complicated page where it takes longer to reach the script and more content needs to be adjusted following removal of the form. Reversing the logic and hiding the form using CSS in the page header prevents this as the form elements are initially created as hidden nodes in the DOM before any of the page is rendered.
    More important is that this approach applies the principles of the separation of concerns and unobtrusive JavaScript. At some point when developing in APEX you're going to find yourself seriously losing your cool in a situation where you know the app is executing some JavaScript, but you can't find where that script is defined (maybe you've already been there). Look at the page 2 definition using the tree view: where's the JavaScript that is going to run? Now look at page 1: ah, there are a couple of dynamic actions...
    APEX now includes a lot of containers specifically for JavaScript: File URLs, Function and Global Variable Declaration and Execute when Page Loads in page templates and page headers, and declarative and custom Execute JS Code Dynamic Actions. These provide for good separation of concerns: we should use these locations for JS code, and avoid the exasperation of hunting through templates, page/region headers/footers, page 0 regions, pre-/post-element text or wherever to find the script we can see in the page source or JS debugger.
    Aljaz's solution also depends on detecting the presence of the No Data Found message with class <tt>nodatafound</tt>, and on modifying the Add Row button.
    What if someone changes the class of the No Data Found message in the report attributes? The Exists... condition on the dynamic action performs this check in a more direct way (although it's not ideal: DRY is violated by having both 2 copies and 2 executions of the report SQL; nor is it reusable on other form regions).
    Modifying the Add Row button JavaScript directly is intrusive. Like footers and templates, it's another non-obvious location for JS customisation. By using a dynamic action to bind another click handler to the button we're making the modification more obvious, and more importantly we don't have to modify what it's already doing&mdash;or in this instance, even care what that is (in other circumstances we might need to change the order or propagation of events, or suppress the original behaviour).
    As for reusability, my original solution didn't really consider this (as it wasn't mentioned in the OP). Since the subject has been raised, and in accordance with my comments above, I'd approach it in a different way.
    As discussed, I suggest not squirrelling JavaScript away in region templates. I'd create a reusable report template for tabular forms rather than a region one. A <tt>class</tt> defined on the report container there will provide a more direct selector for hide/show behaviour. I'd stick to initially hiding this report via CSS, and use dynamic actions defined on the global page to conditionally show it on page load and bind show behaviour to the Add Row button click. To make these DAs reusable I'd remove the Exists... condition from the first one and replace it with a JS condition that checks to see if the tabular form report contains any visible data rows (the class on the report template will help there as well). Binding the show behaviour to the Add Row button would use the <tt>onclick</tt> attribute as a selector (rather than an ID selector that requires an intrusive edit of the button) so that all Add Row buttons would be affected: <tt>$('button[onclick^="apex.widget.tabular.addRow"]')</tt>.
    And about the style code:
    #report_tabular-form,
    #report_tabular-form .report-standard {
    min-width: 90%;
    } That is an improvement. I had read about it but not considered it for this. I tried the technique used to adjust column width on other reports but when I use "div," it makes the data in that column display only. I really want to adjust the width of the individual column header. Is there a way to do that?I'm not really clear what you're asking here. (Use "div"? Where? How?)
    To control the width of individual report column headers, use the following CSS:
    th#COLUMN_ALIAS {
      width: 10em;
    }Where <tt>COLUMN_ALIAS</tt> is the alias of the column in the query: APEX uses this as the HTML <tt>id</tt> attribute for the column table header element. (Note that <tt>id</tt> attributes must be unique within a document, so it the same column appears in multiple reports/forms, ensure each column alias is unique.)

  • Can't do anything to table- data tab after cancelling initial query

    When I select a table and go to "Data" tab, sqldeveloper executes initial query to fetch first 50 rows. While it does so, "refresh", "add" etc. icons, and "Sort..." button are blocked. The problem is, if I cancel that initial query, icons and buttons STAY grayed-out, so I can't refresh the table. Pressing enter on "filter:" field also doesn't work. The only way to restore functionality is close the tab and open it again.
    Steps to reproduce:
    1) Open a large table
    2) Filter it with some query
    3) Sort results
    4) Close the tab
    5) Open the table again. "Sort" settings persist, so SQLDeveloper starts running a very long query
    6) Press "Cancel Query" in the appearing box
    Canceling the query somehow resets persisted Sort settings, so it works fine next time I open the table.

    Can't reproduce it,Is there any setting
    Umm, I'm not exactly sure what do you mean by that. I don't remember modifying anything in the preferences for persisted settings (like sorting order or hidden columns). In fact, I'm pretty sure there is no such settings in preferences.
    As for reproducing the bug, may I ask you which step fails, exactly? Do sort settings reset when you open the table again? Or does the query executes instantly? Oracle sorts table too fast if it's under 1 000 000 rows, and it becomes visible on 8 000 000+ rows table.

  • Failed to parse SQL query: ORA-01403: no data found

    I'm going to post and answer my own question in the hope that others will not have to struggle with this error.
    Using a report of the type PL/SQL Function Body Returning SQL and using generic columns you may run into this error
    failed to parse SQL query:
    ORA-01403: no data found
    The SQL will run stand alone but the report fails.
    There is a setting just below the source you should check:
    "Maximum number of generic report columns"
    In my case the number of columns was dynamic and when it exceeded the number set as the maximium number of generic columns I received the 1403 error.
    Hope this helps someone.
    Greg

    Thanks for much for the pointer. For anyone else struggling with this too, I found that my generic columns had unordered themselves. Reordering them solved the problem for me.
    Edited by: user11096971 on Jul 22, 2010 3:19 AM

  • ApEx 4: after upgrade, "when no data found" message on report not shown

    I have a page that displays a tabular form. Initially, the table is empty, and so I have text in the "when no data found" block of the report attributes.
    After upgrading to ApEx 4, this text is no longer shown when no results are returned. It displays the table header, but no rows. So for some reason, it thinks data is being returned -- even though the table is completely empty. I've tried several permutations, but have not been able to find a workaround.
    I'll try to set up a standalone page, but I can provide a pointer to the existing page on apex.oraclecorp.com on request.
    UPDATE: I think this may be related to the bug I reported on tabular forms.
    Is it possible that the empty, hidden row we are adding now counts as a returned row, even though the SELECT statement returned nothing? And thus the report never thinks that there is no data found? This would also explain why it's displaying the table headers, even though no rows are visible.
    Edited by: kswartz on Jul 8, 2010 12:18 AM

    Interesting. I didn't see anything about this change in behavior in the Release Notes. Did I miss something? It definitely didn't do this in 3.2.
    Overall, I think that's actually a very non-obvious change. Seeing a set of table headers with nothing below it looks to me like a mistake. Why would you ever show headers for something when you have no rows? In fact, I thought that was a bug the minute I saw it. With due respect, I don't think the new design is less desirable from a usability perspective than the old one.
    It also doesn't work as you described regarding the proportions: in my case, the columns in the header row did not match the sizes of the columns as I defined them. Although I didn't place anything beside the tabular form, if I had, it would still alter the layout when "Add Rows" is clicked. If you know what the size of those columns is supposed to be (because they are text fields of size xyz, for instance), why wouldn't you define the header cells to use that information? You won't get it exact most of the time, but you can get close, if they're all text fields of specific width.
    Plus, there's nothing on the Report Attributes tab that indicates the "When No Data Found" option won't apply if you are using a tabular form. The textareas should be disabled -- and at the very least, the on-line help should be mentioning this. It doesn't mention anything about this only applying to standard reports.
    Finally, I think you should also put this in the Release Notes, because this requires changes to any application where someone with a tabular form required this. In one case, that was where I provided instructions to users entering data for the first time. Now I have to move it. (Not a big deal, but it would have been nice to know that in advance.) On another page, I put a JavaScript block in there to submit and automatically add a row, because I wanted there to always be a blank row if nothing had been entered -- and that was the easiest way. Okay, granted, that's probably not something you intended to support, but there was nothing wrong with it, technically. And, again, it's fixed by moving that block to the header instead and testing for the number of rows in the table -- easy, now that you provide JQuery for us -- but still manual migration work.
    Thanks for the explanation.

  • Can not view/export a report which has 2 group by field when no data found

    Recently I developed a report, which contains 2 group by fields. it runs successfully when the report displays some data.
    but when there is no data, i cann't view/export this report.
    It shows nothing by html format and shows "this file cannot be opened because it has no pages" message by pdf format.
    even there is no records for this report, i still want to see the template file and show some basic information.
    please help me.
    Daniel

    I've found that, just like I used to do in Oracle Reports, if you put in a COUNT column to count your returning rows, you can put 'No Data Found' when there's no data. That way, your report will return and not error out.
    For .pdfs, this is the code I use; COUNT with code of <?if:count(field_name)=0?>.
    In the .rtf..
    COUNT
         No Data Found     
    END COUNT
    Put this in the .rtf before your data should appear or else it won't work.
    Hope this helps!
    Kris

  • Error: No data available while executing BEx query

    Hi BI expert,
    Please help me out as I am very new in BI. I am getting error "No data available" after executing query in BEx query designer.
    thanks

    Hi,
    Pl check for the Filter Conditions of the query.Have the same filters data  as that in the Cube/ODS.
    Hw is the Data Flow ???
    A)From ODS to Cube to Query ????
    or
    B)From ODS
    or
    C)From Cube
    1)Check on which Infoprovider the Query is built.
    2)If it is Cube then Check the data in the Cube.Right click Cube ,Display data and Execute.
    3)If data is avaliable in cube then it shud come in Query except for the Filter conditions .
    4)then check for the Filter conditions of the query.
    5)If data is not avaliable in Cube then check in ODS ????
    6))If data is not avaliable in ODS then check in PSA
    7))If data is not avaliable in PFA then check in R/3.
    Also search in SDN as to how the Data flows
    A) both from Flat File and 
    B)R/3 and FULL and DElta Load.
    That will give clear uinderstanding  !!!!!
    Rgds
    SVU123
    Edited by: svu123 on Dec 15, 2008 2:15 PM

  • Hello I have a problem with my ipod touch 1G the problem is that see me key to the floor! And when recogi not prendia after 5 minutes prendio but it gave to me the surprise of which the battery had finished completely! What I did was to set it to load wit

    Hello I have a problem with my ipod touch 1G the problem is that see me key to the floor! And when recogi not prendia after 5 minutes prendio but it gave to me the surprise of which the battery had finished completely! What I did was to set it to load with the USB but do not load the battery me the icon of the battery appear and below of her the beam that indicates that this being loaded but this way I have left it the whole yesterday and what goes of today and continues without loading anything! They can help me porfavor I am grateful for them to him very much!   And my PC does not detect it not itunes

    Try the not-charging topic of:
    iPod touch: Hardware troubleshooting
    It could be that the battery is dead.

  • Running iTunes 11.0.3 64bit Windows 7. The "join Tracks" line has disappeared from the box that opens when you click "options" after inserting a CD. Only 2 lines show up: "Get track names" and "Submit CD Track names". Where did "Join Tracks" go?

    Running iTunes 11.0.3 64bit Windows 7. The "join Tracks" line has disappeared from the box that opens when you click "options" after inserting a CD. Only 2 lines show up: "Get track names" and "Submit CD Track names". Where did "Join Tracks" go?

    i have the same problem no radio stations at all bit shabby hate technolgy now adays

Maybe you are looking for

  • How would I count items in DataSet2 and have them grouped by the column that is tied to DataSet1?

    Greetings! First, thank you for looking at my question. I am trying to count the number of items that = "True" in DataSet2 and display them in the "Week" column in a table who is pointed to DataSet1. I have a simple table that is set up something lik

  • Textarea formatting for read-only display

    Hello, I currently have a textarea field that is on a data entry screen, which can be displayed as editable or read-only, based on certain criteria. I noticed that when text with line breaks is entered into the textarea, it keeps these line breaks as

  • F-44 Vendor Clearing: Not able to save the reason code

    Hello Experts, We are testing t-code F-44.  We are attempting to perform a vendor clearing with a Debit Balance Write-off.  As part of the test we require to add a Reason Code to the transaction posting.  Unfortunately, the reason code is not being s

  • SRM PO profit center addition

    Hi All; We have extended classic scenario in our project. So approved & complete shopping carts are automatically converted into PO. Now the client is asking to add profit center for certain type of indirect expenses as they have to be assigned to a

  • How to remove a dialogue with the placement of the signature in Acrobat XI

    Hello I have a problem. After upgrading to Acrobat Standard XI during the signing dialog still shows: "To start the certification process, select the Create a new rectangle for signature and then drag to select the area where you want the certifying