Executing ABAP on Navigating away from BSP

Hi All,
I would like to know if it's possible to execute a piece of ABAP code when the user navigates away from a BSP page.
I have the necessary ABAP clean-up code that I need to execute if the user decides to quit the BSP page (that includes closing the browser window, going to another website like cnn.com, or hitting the "Back" button).
Can anyone think of a possible solution? I tried to use javascript function on page "unload" property, but it appears it is not possible to restrict ABAP statements by enclosing them in javascript tags.
Thanks in advance!
Roman D.

Hi Thomas,
Thanks for the quick response. No, the application is stateless.
Due to the programming design, the person who developed the application created a certain document on the "OnInitialization" routine. What I need is to delete that document unless the user hits the Save button...sounds absurd, but it's more of a workaround than a real solution.
So, in other words, if the user enters the page and hits "Save", everything is OK. But if the user doesn't hit "Save", but instead just quits the BSP application, I need to make sure that the document is deleted.
Is this problem more clearer now?  Let me know if I can provide more details.
Thanks!
Roman D.

Similar Messages

  • Can we stop user navigating away from Block in an Error condition?

    Hi all,
    I am writing validation code in custom library attached to an Oracle Form. Is there any way to stop
    the user from navigating away from a Data Block if there is a validation failure?
    Many Thanks,
    Prathima.

    it depends. some triggers fire, before validations are complete, e.g. when-button-pressed. there is also a difference between navigable and non-navigable buttons/items.
    better you check it out by putting messages inside your code.

  • Detecting navigation away from a screen

    To play mp3 files in my web application, I've a  simple audio player with play/pause buttons, progress bar, etc. Just the way  VideoPlayer stops playing video when user of the application switches to some  other screen, I would like my audio player to stop playing audio when the user  switches to some other screen. What event can I use to detect that the audio  player (s:VGroup) isn't 'visible'?
    Although this question is framed around stopping an  audio player, the same applies to a situation where user is navigating away from  a form without saving modified data.
    Thanks,
    Dilip

    Hey Dilip,
    You need to include Javascript here. What you need to do is put an event on window.blur and on window.blur call a code of Flex application to make the audio player mute.
    I think that make sense to you still if you have any question let me know.
    Thanks & Regards
    Ankur Arora
    Project Leader(Flash and Flex)
    http://flashdeveloper.blogspot.com
    http://www.ankur-arora.com

  • How to Prevent Navigating Away From a Page?

    Hi all,
    I�m developing a JSF application using IBM Rational Application Developer v6.0 and have this scenario:
    Background:
    I have a page that acts as a 3 step wizard. It also contains links to other pages. The page has a corresponding �pagecode� bean with a request scope and another managed bean with a session scope and basically everything happens here, all the action and action listeners. Also this managed bean handles three important events the �page load�, �page load ends�, and �page post�.
    Desired Behavior:
    I want to enforce the user to complete all three steps of the wizard without navigating away from this wizard like page by displaying a message �hey you must complete all three steps� or something like that :).
    Problem:
    The user can click on other links on the page and navigate away from the wizard without completing all three steps.
    Any suggestions to this issue would be of great help.
    Thanks in advance.

    First: how do I change my stupid screen name? :)
    Thanks for your solution. Would this also work for normal html navigation? My understanding that this may only work for the JSF framework navigation rules. On the other hand I also have plain html links on the page and not really sure if the JSF framework also handles these types of navigation.
    This maybe a partial solution though and I really appreciate this.
    Thanks.

  • Navigating away from a quiz

    In the course I am creating I have quiz questions to test understanding that I am not scoring.  At the end of the course I have quiz questions that will be scored for a final grade.  Here is a problem that I am facing.  You start the first of two quiz questions, you answer the first, correctly or incorrectly it does not matter.  On the 2nd quiz question you navigate away from the quiz to reference the course for the answer.  When you come back to the quiz I can no longer answer the question or any questions in the rest of the course.  What am I doing wrong here?

    I will ask this question another way:
    I have 4 modules in a course.  I present content in module one and I pose 2 quiz questions that are not graded, just testing understanding and keeping the student engaged and give feedback using the quiz tool (Correct, Incorrect).  I present content in module two and pose more quiz questions again part of the final grade.  This patterns continues until the end of the course where I have several quiz questions that are given point totals and graded for a final grade.  The problem I have is that when the student starts the quiz all is fine until the student navigates back or forward in the course other than slide by slide one after the other.  When the student navigates away either using TOC or the playbar, the course thinks the quiz has ended and does not allow for the student to take anymore quiz questions.  I do want to have TOC available for course navigation.  This course will be launched from an LMS.
    Has anyone else created a course like this?  Can this be done another way?

  • Multiple Audio CD Burn, Navigation Away from Playlist Breaks Things...

    Wonder if anyone else has noticed this behavior:
    I was burning a playlist to Audio CDs. It was a 2 disc set. While iTunes was busy burning the first disc, I navigated to another play list, and looked at some stuff. Then I went to my Party Shuffle to see what was coming up (as this was already playing before I started the burn of the other playlist).
    Then, the first disc completed and ejected itself. At this point, iTunes usually asks for another disc. But not this time. I put in another CD, but I was prompted by the system for action. It appears that if one navigates away from the playlist that you are burning, it breaks like this. In a previous 2-disc set I burned, I did not change the source (navigate away) and all operates as it should.
    Anyone else experience this? Do you think it warrants a bug report?
    Beavis2084

    I think this is worth a bug report - unless there's a
    way that you can start burning from the second CD
    again
    I looked and looked for a "resume" function, no joy.
    Beavis2084

  • SWF in PDF stops playing after navigating away from page

    I have a PDF ebook with SWF movies embedded each movie is a music track controller that plays a track from a soundtrack to the book.
    I want readers to be able to play the tracks while they read the book.
    This works fine in Acrobat. But in Digital Editions, as soon as I navigate away from the page showing the track controllers/SWF movies, the movie/track stops playing.
    Is there any way around this? Perhaps there are technical limitations to a Flash-based app. at play here.

    Arthur, this sounds like content you've created yes?
    If it's content you're creating then I'll have to send you to Engineering via the Digital Publishing Center at
    http://www.adobe.com/devnet/digitalpublishing/.
    There's a feedback form on that page (we don't currently do any ebook dev support on this forum.. there might be a forum unique to that at some point in the future). It's not very clear, but if you send a dev question to that feedback form you should get an answer from engineering. This ONLY applies to questions about creating content for consumption in ADE 1.5.... (end user questions regarding ADE 1.5 still go through web case support at http://www.adobe.com/support/digitaleditions/)
    Regards,
    Bentley Wolfe
    Senior Support Engineer, Flash/Flash Player/Digital Editions
    Adobe

  • Navigating away from current page

    I have an annoying problem that hopefully someone will possibly have a solution to with there browser knowledge. I have an account with a music promotional company they service me with music from their site. There are clickable links that download a .zip file when clicked on or CTL clicked on. The problem is when I select a file to download Safari (and FF) doesn't let me navigate away from the page it seems stuck and the blue 'loading' box appears and I can go to any other web pages whilst the download is in progress. Has anyone any ideas what this could be? I have Click to Flash installed but I can't see that being the problem? This also happens with FF so its not necessarily a Safari problem but nevertheless I'm sure someone will have an idea whats going on?
    Many thanks

    HI,
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Click to Flash I doubt has anything to do this download issue.
    Try emptying the cache and resetting Safari and see if it makes a diffeerence.
    For Firefox ...
    1. From the Tools menu, select Clear Recent History... .
    2. From the Time range to clear: drop-down menu, select the desired range; to clear your entire cache, select Everything.
    3. Click the down arrow next to "Details" to choose what history elements to clear. Click Clear Now.
    Firefox 3 for Mac OS X
    1. In Firefox, from the Tools menu, select Clear Private Data.
    2. Make sure Cache and Cookies are checked, and then click Clear Private Data Now.
    Carolyn

  • Navigating away from phone call

    Hello. I want to love my new Q10 as I loved my bold, but some seemingly simple things are frustrating me!  And I am not technical, so help appreciated.  Can anyone tell me if I can navigate away from a phone call to go into another area (for example my calendar) while staying on the call?  Used to be so easy and allowed me to check my calendar or even send a bbm if I was stuck on a long speakphone call.  Thanks!

    Hey nottechnical,
    Welcome to the BlackBerry® Support Community Forums.
    To minimize the phone application Swipe up from the bottom of the screen.
    Let me know if you have any other questions.
    Thanks.
    -HB
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Navigating away from Web Dynpro after warning.

    Hi Experts,
    I wanted to see if anyone can shed light on something I've been trying to implement. I'm working with NWDS 7.0.18
    I developed a collection of WDP Java apps that reside in the same workset.
    While working in one of the apps, if the user clicks a link to another app in the detailed navigation area and they haven't saved what they have been doing in the current app, then I want to display a message like: "You haven't saved you worked, are you sure you want to leave?? YES/NO"
    If the user clicks yes, how do I navigate them to the app they clicked on? Or the role they clicked on? Or the workset they clicked on? I have put the above message in the wdDoExit() method of the View controller. The method checks for unsaved changes and if so, displays the message.  I have two event handlers YesExit and NoExit. NoExit does nothing, what do I need to put in YesExit??
    Any help is greatly appreciated.
    Thanks
    MM

    Hi,
    have you tried "work protect mode"? I don't know, if it works, when work protect mode is set in the onExit function, but give it a try.
    The first example demonstrates how to define the work-protect mode level:
    // Define the needed level. The level can be switched during
    // the application lift time, i.e. it can for example be
    // switched for different views.
    WDPortalWorkProtectMode.setApplicationDirtyControl(
    WDApplicationIsDirtyMode.NONE);
    WDPortalWorkProtectMode.setApplicationDirtyControl(
    WDApplicationIsDirtyMode.APPLICATION_ONLY);
    WDPortalWorkProtectMode.setApplicationDirtyControl(
    WDApplicationIsDirtyMode.STANDARD);
    The second example demonstrates how to define the u201Cdirty stateu201D of an application:
    // Set the u201Cdirty stateu201D to YES, i.e. the application is dirty and
    // a navigation should be launched in a new window to make sure that
    // no data is lost
    WDPortalWorkProtectMode.setApplicationDirty(true);
    // Set the u201Cdirty stateu201D to FALSE, i.e. the application state is u201Ccleanu201D
    // and therefore the navigation is launched inplace and the
    // running application is left.
    WDPortalWorkProtectMode.setApplicationDirty(true);
    Here is the document, i got this code from with some explanations about work protect mode: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a891e490-0201-0010-fb99-b7e4f5dda2ec&overridelayout=true
    best regard,
    Christian

  • ADF viewScope is creating new instance without navigating away from view

    Hello,
    I'm using JDeveloper version 11.1.1.6.0.
    In a Portal application, I'm using view scoped Managed Beans. When I navigate to a page, as expected one instance of the Bean is created. I have dependent selectOneChoice objects inside this page, therefore a partial page refresh is generated when the user chooses a value, a value change listener is called, I read bean variables and do my thing. But here's the catch, a new instance of the Managed Bean is created before the value change listener is called. I have no idea why. According to documentation the viewScope bean should persist until the viewId changes. The end result is I'm screwed trying to read variables that should persist from page load inside this value change listener.
    But wait, that's not all. The issue here is the very first partial page refresh (or whatever it should be called). Only the first partial page refresh will cause the creation of a new managed bean instance. Any subsequent ones will not.
    So it goes like this:
    Page load -> @PostConstruct runs once -> Partial page refresh -> @PostConstruct runs again -> Partial page refresh -> @PostConstruct doesn't run -> Partial page refresh -> @PostConstruct doesn't run...
    I'm really at a loss of options here, the @PostConstruct running twice inside the very same view in a viewScope Bean is news to me. But then again, I'm new to ADF so what do I know. I noticed this happens with every viewScope bean in my application, not just this particular one. It just so happens that only in this case this became a problem.
    I'm in an all out war against this thing for more than a day now. The internet is my last resort before I make some dumb workaround that will consume me in my sleep. Any help is greatly appreciated.
    Edited by: 934172 on Sep 6, 2012 12:35 PM
    Edited by: 934172 on Sep 6, 2012 12:36 PM

    I'm determined to fix this thing no matter what the hell it takes.
    I found out exactly what is happening, even though I'm not sure why it happens. But the important question here is how to fix it.
    Here is the first request, the one that happens when I navigate to the page:
    http://localhost:7101/teste-Portal-context-root/faces/pages_test?_adf.ctrl-state=18hjxv8lyw_4Here are all the subsequent ones, the ones that happen when I select a choice:
    http://localhost:7101/teste-Portal-context-root/faces/oracle/webcenter/portalapp/pages/test.jspx?_adf.ctrl-state=18hjxv8lyw_4It's no wonder the server is confused and creates a new bean instance. Now what the hell? Why are they different? But more importantly, can I fix the first one? Can I force the bean created by the first one to answer for the second one?
    I still don't know. But hopefully I'll find out.

  • Having trouble navigating away from a page with streaming video or using menu items-extremly slow to react

    I watch twit.tv daily. anytime I am on the twit page and try to open another tab or try to use a menu item it takes an extremly long time to react to mouse click. At least 15 to 30 seconds. This started happening several updates ago for version 3.6.

    So, since I got no reply to my question I took the iPod into the Apple store and tried to dock it to another third party device. Same problem, no digital control of the iPod. After about 30 minutes of looking it over, the Apple Genius agreed the issue was likely hardware related and issued me a replacement. So apart from about an hour of my time in the store and however long it will take me to reload my library, I'm rather pleased.

  • Considering navigating away from DEs. Advice needed.

    I got a new netbook (an Asus 1001p) which I am taking with me while I go travelling throughout Europe this spring.  There is one problem, I absolutely hate the netbook interfaces for both KDE and GNOME. I also find them sluggish.  Consequently, I am thinking about switching to some sort of WM based setup, possibly a tiling one as my experience with KDE4 on my main computer has shown me that I prefer to do most of my window management via the keyboard.  But before I begin working on my setup for my new netbook I need some advice.
    Firstly, what do you non-DE people use for power management?  I really like all the options that power management system for KDE provides (i.e. specific power profiles and such).  Is there a program not associated with a DE that I can use to accomplish this?
    Secondly, what tiling window manager is easiest to setup and use?  I am considering going for wmii, as I like that it can be switched between tiling, floating, and dynamic tiling.  It also doesn't require the use of LUA to configure it like awesome does, which is good because I am not a programmer (I've always struggled a little bit with computer science).  Also, I only have about a week to get the setup up and running, as I refuse to spend my vacation reading documentation.
    Thirdly, should I just abandon the idea of using a tiling WM and go for fluxbox, or use a lightweight DE like xfce?
    How do you advise I proceed?
    Thanks!

    I am using Musca as my WM on an Eee PC 1005hab, it is very simple, no more options that neccesary, and nothing done automatically for you. I have customized my keybindings for it and my main browser (uzbl) to make all my window management actions sensible in their layout.
    I haven't felt the need to use any power management apps yet, I just us sudo pm-suspend when i want to suspend, but my netbook stays plugged in next to my bed all night, and rarely sits around long enough to need anything like auto-suspend or anything. I haven't really installed any applications that do things for me automatically, I don't even start many daemons at start-up, I connect my wifi manually everytime. I am liking the DIY approach.
    I would reccomend Musca only if you want to manage every window action. It is much easier for me to understand than a dynamic tiling system, but also takes a bit more effort.

  • Get rid of the Walmart Gift Card Page!!!!! It ties up firefox, will not allow navigation away from page!

    I was doing a search and an add for a $1000 Walmart gift card pops up and won't allow you to quit firefox or close the page.
    Very annoying!!! Looks like a scam!!!!!

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Also, make sure you update to Firefox 16 to stay secure. [[Update Firefox to the latest version]]
    Did this fix your problems? Please report back to us!

  • Af:query filter state becomes incorrect on navigating away and back to page

    Hi,
    I've added two named view criteria to my VO. One to show all records ('All Records') and one to show records created by the currently logged in user ('My Records'). I've added an af:query element on my page to allow the user to select one of these two named criteria. This all seems to work, however I've noticed I'm getting some strange behaviour when I navigate to a different page and then return to my filtered page.
    When I load the page 'All Records' shows by default, I can switch between 'My Records' and 'All Records' successfully (data set changes). However if I do the following:
    - select 'My Records'
    - navigate to another page
    - navigate back to the original page
    'My Records' is still selected (great) and the table still shows the results of 'My Records' (great), but when I now select 'All Records', I seem to be only operating within the scope of records created by the currently logged in user. So 'All Records' now shows the same as 'My Records'.
    It seems that by navigating away from then back to my page, I'm fixing whatever criteria were being applied to the VO at the time I left the page. Then all queries from that point on operate only on a reduced data-set.
    How can I stop this happening? I'd ideally like to be able to fix this without having to reset the filter back to 'All Records' whenever a user enters the page. I like the fact that the selected search is remembered, I just want All Records not become broken. I've tried pressing 'Reset' on all the queries, but this doesn't help.
    Any ideas on how what's going wrong here?
    Edited by: japher on Aug 17, 2009 3:25 PM

    There are several issues related to ADF Faces query components. One of them is that these components do not remove eventual previously applied view criterias. In fact query components keep track of last applied view criteria since current entry into the page. If you have entered the page, applied a view criteria and executed the query and after that you have switched the view criteria and executed another query, then everything is OK (since you have not left the page and it keeps track of the first applied criteria). But if you have left the page between the two query executions, then the previously applied view criteria remains applied (since you have applied it before current entry into the page) and it affects the query result.
    There are several workarounds of this problem. One of them is to include your ViewObject twice into ApplicationModule's data model - 1st one with 1st ViewCriteria pre-applied and 2nd one with 2nd ViewCriteria pre-applied - and to use two ViewObject instances in your application instead of switching ViewCriterias. Another workaround is to set custom query processing method in "queryListener" property of the query component. You have to implement a custom processQuery() method in some managed bean that clears any unnecessary applied ViewCriterias at the beginning and after that invokes the standard implementation of processQuery() method of the corresponding FacesCtrlSearchBinding. In order to be able to find the corresponding search binding within your custom method you will have to get the binding's name. You can either hard-code it within your custom method or use <af:setPropertyListener> tag to write the binding's name to the pageFlowScope, for example.

Maybe you are looking for

  • Still rendered in FCP 6 looks worse than preview???

    I'm importing a still from Photoshop (CS1) into FCP 6. It's a PICT file w/ alpha channel (logo). When I slap the logo on top of my video it looks clean and sharp. But, when I render the clip, it comes out looking rasterized and I loose my smooth edge

  • What's with the boxes?  Checking all these boxes is a pain.

    I upgraded to 6.02.23. All of the song names suddenly have little boxes to the left of them. To listen to a playlist I have to go through and check the box on every song in the playlist. It might be nice sometimes to be able to select a subset of son

  • Slow movie sync

    Does anyone know why a movie is taking so long to sync to my iPhone? I have Windows XP, 2.0 USB ports, 1.73GHz, 1G ram, etc., and the latest iTunes. Songs seem to sync normally, but I have one 900 MB movie that takes 1 hour 15 min to sync. The movie

  • How to remove Solaris 9 to install Solaris 8 on Sparc?

    Okay, I'm fairly new to this. I've got some software compiled to run on Solaris 8, not 9, so what would be the best way to remove the existing Solaris 9 installation to make way for 8? The box is an Ultra10 elite 3d, 1 hard drive, 512MB RAM, 440Mhz.

  • Why do I have to double tap my apps now?

    My iPhone is acting crazy.  Can't slide any screen or touch to open apps.