Urgent - Implementing Work Protect Mode

Hi,
I implemented Work Protect Mode in the doInit method of WD.
My view contains a form that the user has to fill.
For some reason, if I fill all the fields and press the "save" button, <b>still</b> the propmt dialog of the Work-Protect appears - as if the data wasn't saved.
<u>My Code is:</u>
WDPortalWorkProtectMode.setApplicationDirtyControl(WDApplicationIsDirtyMode.STANDARD);
String firstName = wdContext.currentContextElement().getFirstName();
if ( firstName != null){               WDPortalWorkProtectMode.setApplicationDirty(true);
Thanks you all so much.
Ruthie.

Hi Ruthie,
Put
WDPortalWorkProtectMode.setApplicationDirtyControl(WDApplicationIsDirtyMode.STANDARD);
WDPortalWorkProtectMode.setApplicationDirty(true);
to wdDoInit.
As Valery suggested Re: Mandatory InputField
<i>For corresponding property create SimpleType in Dictionaries / Local Dictionary / Data Types / Simple Types (see WD outline). For that simple type define either MinLength constraint to be > 0 or FixedLength constraint.
</i>
use new created simple type for context attribute to bind with InputFiled`s "value" property.
And in your action handler for "Save" button put
WDPortalWorkProtectMode.setApplicationDirty(false);
Best regards, Maksim Rashchynski.

Similar Messages

  • Very Urgent - Implementing Work Protect Mode

    Hi,
    Did any Web Dynpro expert here implemented Work Protect Mode ? (WD for Java)
    Promise to award points.
    Thanks.
    Ruthie.

    Hi Ruthie,
    I think that is very much possible in WD for JAVA.
    Please go through the following links for more help,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a891e490-0201-0010-fb99-b7e4f5dda2ec
    http://help.sap.com/saphelp_nw04/helpdata/en/88/585d420447e054e10000000a155106/frameset.htm
    http://sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/2fffe990-0201-0010-aab0-e61c3250bcf3
    I hope this helps you.
    Best Regards,
    Guru.
    PS: Reward points for helpfull answers.

  • Work Protect Mode for transactional iView...

    Hi Experts,
    Please help me to understand significance and features of Work Protect mode in portal.
    How to implement it.
    But main point is, is it possible to implement Work Protect Mode in Transactional iViews, i.e. let say we have created one transactional iView for SU01 tcode, which opens in New Window.
    Now if I directly close that window then ideally one popup should come telling the data is not saved.
    Also let me know if there is any other way to achieve my requirement.
    Appreciate for help.
    Regards,
    Ravi

    Hi Ravi,
    Thanks for your response.
    Kindly suggest what vaue we should give in this property "workprotect.mode.default".
    I was going through one link : [http://help.sap.com/saphelp_erp2004/helpdata/en/37/50fb5066f9db43b3b5d5fc8de0c051/content.htm]
    Also are you sure this setting will enable WorkProtectMode for Transactional iView as well.
    Regards,
    Ravi

  • Work Protect Mode for IAC/BSP iViews

    Does anyone know how I can enable Work Protect Mode for BSP or IAC iViews in the portal?
    It works correctly as per the desired mode level for WDP iViews, but when a user makes changes on a form on a BSP/IAC and navigates away from the page, no pop-up appears.
    Is some JavaScript required in the BSP to set the page as "dirty" or to subscribe to the Work Protect event handler in the portal, or is there a simpler way to enable this or a similar feature?
    Thanks,
      Tom

    Hello friends,
    I have same issue.. I have applied Work Protect Mode to 3.. but it doesn't work for IAC iViews.
    Is your issue resolved by any mean..
    I cant apply Java script code on every back-end application...
    the issue again... is this doesn't come when user directly logs in through ITS. over there user gets the alert. but only when user moves from Portal the work protect mode doesn't.
    It  became very urgent issue.
    I appreciate any help..
    Regards
    pankhuri

  • FPM and Work Protect Mode

    Hi Gurus,
    Need your help with an issue I am facing.
    I need to implement Work Protection in a custom ESS appl. I read in the forum/ help that FPM itself manages WorkProtection/ Confirm Loss-of-Work for ESS applications.
    However, It doesn't prompt for 'saving' data in my case. I am not able to figure out a way to incorporate it?
    Any idea how to implement it? I did go through the FPMComponent in xsfpm dc. But, am not sure how to implement it in my application.
    Thanks in advance.
    Anjana R.

    Hi Ayyapparaj, Thanks.
    I am on NW04 SP 21. And Work Protect Mode works on the standard ESS applications.
    I am not sure how to implement work protection in my application or how to trigger the Standard Work Protect confirmation dialog window.
    I created a custom Confirmation window, but the client wants it to be consistent with the standard Work Protect Pop Up.
    I did set the isDirty to true and turned on the "Prompt to save work" option on Portal. But, still doesnt work.
    Could you please help me with this?
    Anjana R.
    Edited by: Anjana Raghav on Dec 20, 2007 7:42 AM

  • Work Protect Mode on WebTemplates

    Hi folks,
    I'd like to use the Work Protect Mode using set_dirty method, but i didn't find help or instructions to implement it in a WebApplicationDesigner (WAD) WebTemplate correctly.
    E.g. i will get the errors EPCM or WDPortalWorkProtectMode is undefined if i implement it using JavaScript.
    Is there any help outside?

    Okay, other question: How do i get access to object EPCM using JavaScript?

  • Work Protected mode

    Hi friends
    i am working with work protected mode in EP 7.0 its working fine .
       But my problem is display dailog window in two ways
    1 .   showing three radio button with diff option
    2 .   showing unsaved data message with ok & cancel button
    i want to only on way for whole portal
    i want modify work protected mode dailog box
    any one tell ..........urgent
    Regards
    narayana

    Maybe this link may help you :
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/b76f4169e25858e10000000a1550b0/frameset.htm

  • Clear flag of Work Protect Mode

    Hi there,
    I'm using work protect mode functionality in my WD ABAP application. The problem I'm facing at the moment is that I would like to clear this flag explicitly before I trigger a navigation. The scenario looks as follows:
    1. I change data on my OIF screen.
    2. I press a button to navigate to an OCI catalogue and suspend the current WD application. (Navigation is done inplace)
    3. Some data has been chosen and the navigation back to the WD application (resume) is done --> Application is set to dirty
    4. Now I want to navigate to the OCI catalogue again. Before navigation is done, the dirty flag is set to false explicitly.
    Even though the dirty flag is set to false, the work protect mode is doing his job and opens the OCI catalogue in a new window, which is intended be displayed inplace. Now to my question:
    Is there a way how I can clear the Work Protect Mode or set it to false explicitly?
    Kind regards,
    Albert

    Not sure if it will solve your particular problem, but have you tried setting the Work Protect Mode to APPLICATION_ONLY?
    More info here: http://help.sap.com/saphelp_nw70/helpdata/EN/45/b76f4169e25858e10000000a1550b0/frameset.htm

  • Customizing the work protect mode

    Hi,
    I have a problem in customizing the sap providing work protect mode. When I activate the work protect mode, a pop up is coming up and the default radio button selected is to open the unsaved data in a new window. Can you please let me know can we change the default selection by any option like
    1. modifing the com.sap.portal.epcf.loader. par file
    2. By any configuration. etc..
    please help me .
    Regards,
    Rambabu

    I don't think there is a configuration available to change the default selected radio button.
    You will need to make the changes in the par file com.sap.portal.epcf.admin.par
    u2022     Download the com.sap.portal.epcf.admin.par
    u2022     Unzip the com.sap.portal.epcf.admin_core.jar and edit the WorkprotectPopup class
    Thanks,
    Shanti

  • Work Protect Mode

    Hi All,
    I have a requirement to display the work protect mode pop up when the user clicked on the log off link or user directly closes the window.
    Do any of you can confirms if this can be achieved by any means.
    Thanks in advance.
    Best Regards,
    Sash.

    Hi Sash,
    It can be achieved, but it will require some custom development.
    What you need to do is trigger the popup from the logoff link (before the logoff popup I guess) and from the body onunload event.
    The logoff link is inside the masthead, you can add a script there and call it before the logoff script is called.
    Body onunload is a little bit trickier, because you don't have access to the body tag... But what should work is add a script that changes the body onunload function. You could place this script also in the masthead.
              function addUnloadEvent(func) {
                var oldonunload = window.onunload;
                if (typeof window.onunload != 'function') {
                  window.onunload = func;
                } else {
                  window.onunload = function() {
                    if (oldonunload) {
                      oldonunload();
                    func();
    The function you need to create would be something like this:
              function workprotectPopup() {
                   if (EPCM.getDirty()) {
                        EPCM.popupOnUnsavedData();
    You can then add it to the onunload by using:
              addUnloadEvent(workprotectPopup);
    Regards,
    Johan

  • Work protect mode and wedynpro ABAP

    Hi,
    Does anyone know how the work protect mode should work for webdynpro abap?
    We are using webdynpro abap ivews for travel. When i click on the exit button within travel I get a pop up. If I navigate away i.e click on personal information I don't get a pop up.
    When I navigate away form a webdynpro java iview to personal information I always get a pop up.
    Shouldn't this happen  for webdynpro ABAP ivews as well?

    Hi
    In webdynpro java we have the class like WDPortalWorkProtectMode. But I could not be able get that in ABAP. Can you please help me by providing the name of the Class.
    Regards,
    Srikanth.

  • Work Protect Mode Pop up

    Hi,
    I would like to get the source for the Work Protect Mode pop up that we see in the portal.
    Can anyone point out where can I get the actual source code?
    Regards
    J

    Hi Kai,
    Thank you for the response...
    I am not sure of the location of the text you suggested, but I found that
    text is maintained in CL_FPM_CONFIRMATION_REQUEST abap class. this text is divided in to two text 1) This application contains unsaved data which may be lost. and 2) Do you want to continue without saving the changes? And append this is the class constructor.
    We can change the text here... But thought changing the text is not a solution for my issue, so I need to address the root cause....
    I contacted SAP (raised an OSS message) and working with them on this, as of now we modified our logic in Value Determination BADI and it is working fine 90%
    Update: modified Value determination BAdi and V_T77SP_2 table entry to solve this issue!
    Thanks,
    Pradeep

  • Work Protect mode and browser navigation?

    Through testing we have noticed some behaviors with Work Protect that I did not expect. Can anyone help?
    We are on EP6 SP18. When changing data (ie. setting the dirty flag) on applications (CRM PCUI for instance) and then clicking some other link, button, etc. anywhere within the browser content area, the Work Protect mode fires correctly and pops up a confirmation warning.
    However, in these cases:
    (1)user clicks forward/backward browser buttons
    (2)user manually enters URL in address bar
    (3)user close browser
    (4)user clicks mouse buttons for backward/foward navigation (such as 3rd or 4th mouse button programmed to do back/forward)
    ...Work Protect does NOT fire and catch those events.
    Is this truly a limitation of Work Protect or should we investigate further? I can not find any definate wording of the above issues/limitations in any of the documentation (help.sap.com or on service.sap.com in notes).

    Hi
    In webdynpro java we have the class like WDPortalWorkProtectMode. But I could not be able get that in ABAP. Can you please help me by providing the name of the Class.
    Regards,
    Srikanth.

  • Issue with Work Protect Mode

    Dear All,
    I am using SAP EP 6.0 SP21.I have enabled the work protect mode.
    Problem:I am in JSP page ,  I am trying to navigate to top level tab by selecting the option "Open in new Window" its navigating fine. I am closing the new window again from parent window i am trying to open 2nd lavel tab,instead of opening the 2nd level tab its openings the again top level tab, which i was slected before.
    But if i am navgating to top level then its working fine , it also works fine while navigating only in 2nd level.
    Only problem is after navigating from top level ,again navigating to 2nd level its not working.
    Please suggest,
    Thanks & Regards
    Manoj Sahoo

    It solved by upgrading the support pack.
    Regards
    Manoj SAhoo

  • Work Protect Mode with BSP in EP 6.0 SP14

    Hi,
    we need to create a BSP application that runs in a EP portal. We have many BSP pages in this application, each requiring a lot of user input.
    It would be really helpful to send a reminder to the user once he leaves a page and clicks another entry in the portal menu.
    We understand that the "work protect mode" does this trick in NW2004s under certain circumstances (i.e. "dirty flag").
    Is there any chance to build this behaviour also in the combination of a ABAP AS 6.40 (for the BSPs)with an EP 6.0 ?
    We would appreciate any help on this topic.
    Regards
    Marcus

    Hi,
    Does that drop down list change results in a reload of the page with new data on? If so, you should set the variable for confirm to exit after the reload.
    If there is no reload involved, the msg shouldn't show up. If lots of pages with drop down which work like this.
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

Maybe you are looking for

  • Follow on doc(PREQ) not created in teh  backend

    Hi All,   Need some urgent help...We are runnin on SRM 5.0 n the Classic scneario....   When we order the SC,The  backend  doc  is  not created..In the follow on documents...we just get the status  as  Approved....The workflow is in status  completed

  • Title Font Defaults - Can they be Changed?

    I do not like the default font and size on the Title pane I have chosen. Can these be defaulted to something else? If so, how do I change for the entire project versus having to change each clip?

  • Deliver new Content (Cubes, Objects etc.) via AAK

    Hi there, We have developed a project including InfoCubes and related Objects, Queries and Process chains etc. Now we would like to continue and distribute it by using the SAP AAK. So far we have not been able to. It was not possible, because all our

  • Pattern-Matching Syntax in NPS

    Hi All, I am looking for help in creating pattern matching syntax for 8 IP addresses in Network Policies. Want to add condition of NAS IPv4 Address in a single policy. Ip Addresses are: 10.110.7.38 10.110.7.39 10.110.23.38 10.110.23.39 10.110.43.36 1

  • I need to open ports, and nothing I've read seems to help me

    I have an aiport express, it's my only router.  it's connected directly to my cable modem (TWC).  I have no firewall for incoming (there's no options for outgoing) no matter what combination of settings I use, I can't seem to get more than port 5000