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

  • Itunes 10.6.1 fails to connect to istore.

    I've tried and tried installing itunes for the past month, different versions etc, but nothing seems to work.  I've doubled check the firewalls, thats not stopping it.  For some reason it comes up with an secure link to itunes store server failed. Ca

  • Db in shared or dedicated mode

    Hello, on DB 11.2.0.1, we have parameter SHARED_SERVERS set to 1 (also, DISPATCHERS parameter), but a connection is made through tns with a definition containint '(SERVER = DEDICATED)'. Is this database running in shared mode? AFAIK, it's only necess

  • I want to change the position in MIGO   PO Data

    Hi experts, The requirement is like that: In MIGO >  Purchase Order Data  >  "Delivery completed" indicator,  is by default  "SET AUTOMATICALLY" (i.e. 1). I want to change the position to   "SET" (i.e. 2). presently position are coming  : 1  Set auto

  • Detail workflow for site survey?

    Hi All, I am new in this field. I had saw some information and I can catch the basic meaning of wireless LAN. But I can not find any information about the detail workflow when doing site survey and how to work when an AP doing as site survey client,

  • Skype Crashing on Startup in Win 7 x64 bit

    I have not been able to launch Skype successfully in several days. the previous weekend, I applied multiple windows updates. I was running my computer when it suffered a crash event, and now whenever I open skype, the following log appears when it im