cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro & Portal Integration: the Work Protect Mode

Former Member
0 Kudos

Hello,

I'm trying to get the Work Protect Mode to work in a Netweaver 7.0 EHP1 Scenario.

Description of Work Protect Mode can be found here.

I have a ABAP web dynpro which lets the user modify some custom data in a table, and commit it to DB. The web dynpro is bound to an Iview in the portal. What I want, is to deliver a message to the screen if the user modifies data he sees, and then navigates to some other Iview on the portal.

Using Work Protect Mode and setting the "dirty flag" should be all I need to do, according to what I read. Yet it does not work, i can see using the debugger that my code gets executed:

* Init portal integration interface, if not already done before
   DATA lo_api TYPE REF TO if_wd_component.
   DATA lo_portal TYPE REF TO if_wd_portal_integration.

   IF wd_this->portal IS INITIAL.
     lo_api = wd_this->wd_get_api( ).
     lo_portal = lo_api->get_portal_manager( ).
     CALL METHOD lo_portal->set_work_protect_mode
       EXPORTING
         mode = 'BOTH'.
     wd_this->portal = lo_portal.
   ELSE.
     lo_portal = wd_this->portal.
   ENDIF.

* Sets dirty flag
   lo_portal->set_application_dirty_flag( dirty_flag = abap_true ).

but to no avail: when I navigate to another portal link, nothing whatsoever happens and data is lost. Things I already tried are:

  1. Using APPLICATION_ONLY instead of BOTH as work protect mode configuration
  2. Following this thread, going to path: system admin -> system config ->service config->Applicaitons ->com.sap.portal.epcf.loader, and setting workprotect.mode.default to 2  (though maybe I already overrided that with code)

Any hints? Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member214137
Participant
0 Kudos

Hi Guiseppe,

Did you find a solution to your problem?

We are experiencing the same issue for existing web dynpros that worked before upgrading to 7.4.

regards

Julian