Skip to Content
0
Former Member
Sep 06, 2012 at 02:57 PM

Integrating WD4A and Work Protect Mode

18 Views

Hi all,

I have 3 WD4A applications that run in a new window when launched from the portal. I'm trying to stop the user closing the window and losing data.

In the component controller doInit method I set work protection to on and set the Christina Aguilara flag (isDirty) to TRUE:

DATA LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA LO_PORTAL_MANAGER TYPE REF TO IF_WD_PORTAL_INTEGRATION.

LO_API_COMPONENT = WD_THIS->WD_GET_API( ).
LO_PORTAL_MANAGER = LO_API_COMPONENT->GET_PORTAL_MANAGER( ).

CALL METHOD lo_portal_manager->SET_WORK_PROTECT_MODE
EXPORTING
MODE = 'BOTH'
.
call method LO_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG
exporting
DIRTY_FLAG = abap_true
.

I thought that if the user then pressed close (X) it would prompt the user as per:

http://help.sap.com/saphelp_nw70/helpdata/en/45/b76f4169e25858e10000000a1550b0/frameset.htm

Can anyone help?

Cheers,

Russ.