cancel
Showing results for 
Search instead for 
Did you mean: 

Close Browser Window with view button element when view embedded into fpm

rico_stoll
Explorer
0 Kudos

Hi,

is it possible to build a button into a component view which is embedded into a fpm to close the browser window?

tried to build a exit plug within the view/window of my component. But nothing happened. the window stays open

Maybe is it an option to fire the fpm close plug of the fpm from my component view embedded into the fpm?

Hope you can help me.

Using the close button of the fpm is not an option because the window should automaticaly close when clicking on a button embedded into my component view.

Kind Regards

Rico

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Check this it might helps...

Cheers,

Kris.

rico_stoll
Explorer
0 Kudos

Hello Kissnas,

thanks for your answer.

I implemented on the button event the following:

data: lo_fpm type ref to if_fpm.

lo_fpm = CL_FPM_FACTORY=>GET_INSTANCE( ).

  • lo_fpm->RAISE_EVENT_BY_ID( cl_fpm_event=>gc_event_close ).

lo_fpm->RAISE_EVENT_BY_ID( cl_fpm_event=>GC_EVENT_CLOSE ).

wd_this->MO_DOM_SCW_FIN->CREATE_NEW_SHOPPING_CART( ).

The old window closes now but the new window the new floorplan closes too.

the code

wd_this->MO_DOM_SCW_FIN->CREATE_NEW_SHOPPING_CART( ).

should open a new window with a new fpm.

When using cl_fpm_event=>GC_EVENT_START_OVER it opens a new fpm but some informations missing and some fields are not activated.

Hope you can help me.

Thank you

Kind Regards

Rico

rico_stoll
Explorer
0 Kudos

Hello,

one more question.

Is it possible to change the method. so that the fpm opens within the same browser window instead of a new one?

Maybe is there a solution with the portal?

This is the Method to create a new Shopping cart. This opens a new browser window.

method /SAPSRM/IF_CLL_DOM_SCW_FIN~CREATE_NEW_SHOPPING_CART.
data:
       LV_TASKCONTAINER      TYPE REF TO /sapsrm/if_cll_task_container,
       ls_obn_components     type /sapsrm/s_wd_ui_obn,
       lo_navigation_service TYPE REF TO /SAPSRM/IF_CH_WD_NAVI_SERV.

try.
  LV_TASKCONTAINER = mo_parent_bo_mapper->get_task_container( ).

  CALL METHOD lv_taskcontainer->GET_NAVIGATION_SERVICE
    RECEIVING
      RO_NAVIGATION_SERVICE = lo_navigation_service.

  ls_obn_components-obn_system = 'SAP_SRM'.
  ls_obn_components-object_type = 'sc'.
  ls_obn_components-operation = 'shop'.

  CALL METHOD LO_NAVIGATION_SERVICE->LAUNCH_TARGET
    EXPORTING
      IV_TARGET_TYPE          = /sapsrm/if_ch_wd_navi_serv_c=>gc_target_type-obn
      IS_OBN_COMPONENTS       = ls_obn_components
      IV_OBN_PARAM_CLASS      = /sapsrm/if_ch_wd_navi_serv_c=>gc_param_class-taskcontainer
      IV_OBN_PARAM_METHOD     = 'GET_OBN_PARAMETERS_RM'
      .
  catch /SAPSRM/CX_PDO_ERROR_GEN.
 endtry.
endmethod.