To display the same page when an error occurs.

Hi,
  I need to display the same page when an error occurs in the page. For example, I am validating a few fields in a page. If an error occurs, then same page is to be displayed.
  I am presently using MVC type programming.
Thanks in advance.
Regards,
Vara

I usually use the Message class, for handling all possible validations. In the DO_HANDLE_DATA, do the validation, and if your validation fails, put your message in the message attribute available for that method. As you have not given a pointer to a new page, it will refresh that same page.
If your validation is successful, go to next page.
In the layout of this page(where you require validation), there is an attribute called page and it has get_message method. Call that method at the appropriate place in the layout.
For more information , refer to :
http://help.sap.com/saphelp_470/helpdata/en/91/b197ce280011d5991f00508b6b8b11/frameset.htm
Web Applications and BSP --> Programming Environment -->
Handling Incorrect Entries
Let us know, if this answered your query.
Regards,
Subramanian V.

Similar Messages

  • How can I display the same page when I'll press

    i have a jsp page. It contains user name & password.
    and a link like SIGNOUT COMPLETELY. when i press the back button it should show only this page.
    You have noticed one thing that when u sign out from YHAOO MAIL then a page is displayed
    USERNAME : [email protected]
    PASSWORD :XXXXXXXXXX
    SIGNOUT COMPLETELY
    when this page is dispalyed and u press the back button of the browser
    it displays the same page. How it happens?

    Kindly neglect the previous post.....
    Okay check something like this
    1).maintain either a HttpSessionListener or a session flag try to checkout whether the user is active or else close the PrintWriter.
    2).Prevent caching of the webpage by using customary meta tag or by response,setHeader("Cache-Control","no-cache");
    way...
    Guess tht shud work.....

  • When I click on my Yahoo bookmarks, I only get the download Yahoo toolbar page, I downloaded the toolbar again and I still get the same page when I hit bookmark icon - how do I get my bookmarks back - they still show on Microsoft Explorer

    Question
    When I click on my Yahoo bookmarks, I only get the download Yahoo toolbar page, I downloaded the toolbar again and I still get the same page when I hit bookmark icon - how do I get my bookmarks back - they still show on Microsoft Explorer

    julianscars wrote:
    I don't get a page, all I get is the player popping
    Click the green jelly button at the top left of the player.

  • When I turn the iMessages on it always says the same thing. "An error occurred during activation. Try again."

    When I turn the iMessages on it always says the same thing. "An error occurred during activation. Try again."

    Turn off iMessage and FaceTime and restart
    Go to Settings > Messages and turn off iMessage.
    Go to Settings > FaceTime and turn off FaceTime.
    Restart your device.
    Turn iMessage and FaceTime back on.
    Still not activated after an hour?
    It might take a few minutes to activate iMessage and FaceTime. If you've waited more than an hour, try these steps:
    Make sure that your device has the latest version of iOS.
    If you're using an iPhone, contact your carrier to make sure that you can receive SMS messages.
    Contact Apple Support.

  • How to get a form to appear on the same page when a button is clicked?

    Hi,
    I have a report on a page with a create button. When a user clicks the create button, a form should appear on another region in the same page....how do i go about doing this?
    I know how to do this if the form is on a different page, but i'd like the form to appear on the same page as the report and only when the button is clicked.
    Thanks.

    Hi,
    I did the following, but it didnt work....
    1) Created a hidden item on the page, and in the Default Value field, I set the value to N.
    2) Created a button in the report with the following values under "Optional URL Redirect":
    Target is a: Page in this application
    Page: 4
    Set these items: P1_SHOW_FORM
    With these values: Y
    3) Created a form of HTML text type with the following values under "Conditional Display":
    Condition Type: Request=Expression 1
    Expression 1: P1_SHOW_FORM='Y'
    What have I done wrong or have i missed something?
    Thanks.

  • HP Laserjet P3015 double sided - the last odd page prints on the same page when printing two copies

    HP Laserjet P3015 double sided printing is set up on Windows 7.  When printing two copies of a document, if it has odd number of pages, the last page is printed on both sides of the page. There is no page feed for the last page.
    Suppose say there are 3 pages in a document and you want to print two copies. It prints like 1/2, 1/2 and 3/3.  The third page (odd number) print on the same page. The last page page does not print on two pages.
    It works alright on Windows XP.

    Hope that you have configured the correct paper type and size in the printer hardware and also selecting the same paper tray, size, type from the printer driver while printing.
    It may be caused due to the job formatting done by the application software or some jobs settings done from the job/application or printer driver.  Check by toggling the 'collate' option and also try to print from a different application software.
    Please mark the post that solves your problem as Accepted Solution
    Click the 'Kudos Thumbs Up' if this was helpful. Thank You!
    (Although I am an HP employee, I am speaking for myself and not for HP)

  • Why do I get 2-3 of the same page when I want to go back one page

    When I want to go back one page with the back arrow, I frequently have 2 - 3 of the same page and I have to manually go to the one I want or I just increase the number of the same page in the history

    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!
    I avoid this type of problem by opening a new tab / window from
    the page I want to go back to.

  • When I open safari on my iPad, the old pages are opening, is there a solution to have always the same page when starting safari?

    When I open safari on my iPad, the old pages are opening, is there a solution to have always the same new page when starting safari?

    THX Carolyn, I have do it, but it was the case before, without doing this.
    since yesterday I have this matter, before not! It is a pity, my iPad is 1 year old, and always the iPad start page and only this when starting safari, I thing I have change something in the preference, but don,t know what, and where.

  • Stay on the same page when applying changes

    I have a simple master detail form where we have master form and tabular detail on the second page. The first page has a master form in read only as per standard wizard creation. When I delete and or make changes to the detail the app by default commits and navigates to the master read only page 1. My requirement is to stay on the second page after every update or delete to the detail tabular section . Does anyone have any hints ?

    Look at the page branches. There will be one or more which goes to the first page. Change it to go to the current page instead of the first page.

  • Forcing the opendoc call to open in the same page when using web elements

    Hi,
    I'm using the WE Submit web element to send an opendoc call to BOE, I'm calling the same report and re-running with new search criteria.
    Is there a way to force the report to open in the same viewer as opposed to opening a new window?
    Thanks in advance,
    Angela.

    hello Angela,
    i assume that you're using a WETargetPath function along with the submit. normally the submit function should then open the report in the same window.
    for example, if your report has an ID of 12134, then the following code should open the same report in the same window
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "");
    WESubmit ("S1", "Button", "GO", path, '')
    you can also use the last parameter in the WETargetPath to specify a location...using "Same" will force opening in the same window, while "New" will force a new window.
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "weWindow=Same");
    WESubmit ("S1", "Button", "GO", path, '')
    If you've downloaded the latest version of webelements from [here|http://www.sdn.sap.com/irj/boc/webelements] there's a "submit methods" report in the download that you can publish and have a look at the various options.
    cheers,
    jamie

  • How to capture the record value, when an error occurs

    Hi , can you please help us in achieving the below requirement.
    i have source with 10 accounts , i have to update the 5 target tables for the 10 accounts, i am using a for loop to do insert/update operations.
    when an primary key/unique constraint error occurs while doing the insert/update operations, i want to catpure that account number along with the
    error message and store in a table.
    right now i am using sqlerrm,sqlcode in my exception block to capture the oracle error code and error message,i need to capture the account number along with this message. please tell me how to achieve this ...
    thanks

    if you want to log the error in the table and keep going with the rest of them you might want to check out bulk collection exception handling.
    http://psoug.org/reference/array_processing.html
    CREATE OR REPLACE PROCEDURE forall_errors IS
    TYPE myarray IS TABLE OF tmp_target%ROWTYPE;
    l_data myarray;
    CURSOR c IS
    SELECT table_name, num_rows
    FROM all_tables;
    errors PLS_INTEGER;
    dml_errors EXCEPTION;
    PRAGMA EXCEPTION_INIT(dml_errors, -24381);
    BEGIN
      OPEN c;
      LOOP
        FETCH c BULK COLLECT INTO l_data LIMIT 100;
        -- SAVE EXCEPTIONS means don't stop if some DELETES fail
        FORALL i IN 1..l_data.COUNT SAVE EXCEPTIONS
        INSERT INTO tmp_target VALUES l_data(i);
        -- If any errors occurred during the FORALL SAVE EXCEPTIONS,
        -- a single exception is raised when the statement completes.
        EXIT WHEN c%NOTFOUND;
      END LOOP;
    EXCEPTION
      WHEN dml_errors THEN
        errors := SQL%BULK_EXCEPTIONS.COUNT;
        dbms_output.put_line('Number of DELETE statements that
        failed: ' || errors);
        FOR i IN 1 .. errors
        LOOP
          dbms_output.put_line('Error #' || i || ' at '|| 'iteration
          #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX);
          dbms_output.put_line('Error message is ' ||
          SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
        END LOOP;
      WHEN OTHERS THEN
        RAISE;
    END forall_errors;
    /

  • I was downloading ios 8 on the iphone 4 when an error occurred and now the white line froze just before it finished.  what do i do?

    iphone 4 froze after error occured during ios 8 update, how do i fix it?

    Please use the search box at the upper right hand corner of this page.  Your question has already been asked and answered multiple times.

  • How to update a report  from a form on the same page when form item changes

    I have a portal form from a table and a portal SQL report with a bind variable on a page. I want the report to get updated with details based upon what was selected from a form item. The form item is a selection from a dynamic LOV. Whenever the form item gets changed, the report should get updated to reflect the change. Can this be done using a javascript ONCHANGE event?
    Oracle Portal Version is 10.1.2.2.0.

    Your applet can open an URLConnection and read directly a document from your webserver.
    public String readText() {
      java.net.HttpURLConnection conn = (java.net.HttpURLConnection)myURL.openConnection(); ...
    }So using JavaScript on your page, you might call readText() to fill that textarea.
    The interesting link you gave, handled the JavaScript/Applet interaction. Test that with just return "Hello";.
    The real programming is more interesting.

  • InDesign Crash always on the same page

    Hi to all,
    I've a recurrent crash of InDesign when a browse a document of many pages. The crash occurres always on the same page with this error log: inDesign Crash always on the same page - Pastebin.com
    Can you help me to understand the cause?
    Thank you so much.
    Regards,
    Paolo

    Some sort of text problem, possibly a font....
    Is the text on that page threaded to other pages? If it is you can export the story to ID tagged text, place it in a new file and see if it still crashes.

  • I can not open new tabe in the same page

    i can not open new tabe im the same page
    when i click on new tabe , it donsnt open at all

    Uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox that prevents new tabs from being opened.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

Maybe you are looking for