cancel
Showing results for 
Search instead for 
Did you mean: 

IF_FPM_WORK_PROTECTION is not working in portal

Former Member
0 Kudos

Dear Experts.

IF_FPM_WORK_PROTECTION is not working in portal . Which i have re-implemented in my Z-Wdp Component and in IS_DIRTY( ) method, following is the code which i have written.

  ev_dirty = abap_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 = if_wd_portal_integration=>co_wp_mode_application_only.

  lo_portal_manager->set_application_dirty_flag( dirty_flag = ev_dirty ).

The scenario is : I have CANCEL button on my screen. And on click of that button,It is triggering go data loss popup.But on click of OK in that popup, It is giving the below message.

When i click on OK button, Instead of closing the appl'n is it giving the above error.

Thanks

KH

Accepted Solutions (0)

Answers (2)

Answers (2)

amy_king
Active Contributor
0 Kudos

Hi Katrice,

Behind the popup in one of your screen shots, I can see a messages that reads, "The application has closed and you can now close the window". I believe that when you click the popup's OK button, the parent application has already been terminated and so you get the 500 error. Maybe the application's "Close" button is terminating the session?

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

On the click of OK button in godataloss popup, it is closing the parent window. But it is not closing the godataloss popup window. Again on second click of OK button inthat popup, it is giving timeout error.

But if i excute the appl'n independently(not from portal),evert thing works fine i.e on the click of OK button on godataloss popup, it closes both the appl'n and also godataloss popup.

Can you help me out to resolve this issue?.

Thanks

KH

ramakrishnappa
Active Contributor
0 Kudos

Hi KH,

IF_FPM_WORK_PROTECTION is not working in portal . 

As per my knowledge, the method Is_Dirty( ) method just sets the EV_DIRTY flag and informs the portal about unsaved data on application.

Please refer the below help link

Work-Protect Mode - Floorplan Manager for Web Dynpro ABAP - SAP Library

I don't think we need to do any thing else at WD side.

Please consult portal team member to assist you in this case.

Settings for WorkProtect Mode (SAP Library - iViews)

Hope this helps you.

Regards,

Rama

amy_king
Active Contributor
0 Kudos

Hi Katrice,

It sounds like the data-loss popup's OK button is doing what it is supposed to do-- allow the user to terminate the application window-- but when running in the portal environment, the portal doesn't allow the application window to close.

I wonder if you run demo component WDR_TEST_PORTAL_PROTECT in the portal if it can help you identify the problem. I notice that its "Close Window" button uses parameter CLOSE_WINDOW = TRUE when it fires its exit plug. This is the action handler for its "Close Window" button...

method onactionto_exit .

   data url type string.
   data close_window   type wdy_boolean.

   close_window = 'X'.

   wd_this->fire_to_exit_plg( url = url close_window = close_window ).

endmethod.

Cheers,

Amy

ramakrishnappa
Active Contributor
0 Kudos

Hi KH,

Its session timeout error and it usually occurs when you have idle time more than the allowed session time.

Are you sure that this message occurs always ?

Regards,

Rama

Former Member
0 Kudos

Yes Rama,

The message occurs always. And there is no idle time.

Thanks

KH