Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

Custom POP UP in ESS Open Enrollment

$
0
0

Hi Experts ,

                 I am having a requirement to show a custom pop up screen when an employee add or edit's  a medical plan in ESS open enrollment. As shown in the images below. The system throws a standard pop up as soon as the user try's to edit or add icon. My requirement is show a custom POP Up before the standard pop up and when the user clicks on the acknowledge button, the system then should show the standard pop up. The issue is, I am getting both the pop-up's Custom as well as StandardWhen i edit the plans. I should be only getting the custom pop up first and then when the user clicks  on the  acknowledge Button the system should show the standard Pop Up

Note : The custom pop up should happen only for Medical plans.

01.png02.png

I have enhanced the component "FPM_LIST_UIBB"  and captured the medical plans inside the method  "PROCESS_BEFORE_OUTPUT". The code is Shown below.

 

CODE:

 

wd_assist->Z_dispatch_pbo( EXPORTING io_event = io_event

                            IMPORTING lt_data  = gt_data ).

 

 

ASSIGN gt_data->* TO <FSDATA>.

 

IF <FSDATA> IS ASSIGNED.

MOVE-CORRESPONDING <FSDATA> TO lt_out.

 

READ TABLE lt_out into wa_out with key pltyp = 'MEDI'.

IF sy-subrc = 0.

*loop AT lt_out INTO wa_out WHERE pltyp NE 'MEDI'.

*  EXIT.

*ENDLOOP.

 

loop AT lt_out INTO wa_out .

  EXIT.

ENDLOOP.

 

IF wa_out-dep_name is NOT INITIAL.

  lv_MED = 'X'.

ENDIF.

ENDIF. " sysubrc

ENDIF. " IF Assigned.

 

IF lv_med = 'X'.

   DATA lo_nd_lt_flag TYPE REF TO if_wd_context_node.

   DATA lo_el_lt_flag TYPE REF TO if_wd_context_element.

   DATA ls_lt_flag TYPE wd_this->element_lt_flag.

   DATA lv_flag TYPE wd_this->element_lt_flag-flag.

*  navigate from <CONTEXT> to <LT_FLAG> via lead selection

   lo_nd_lt_flag = wd_context->get_child_node( name = wd_this->wdctx_lt_flag ).

   lo_el_lt_flag = lo_nd_lt_flag->get_element( ).

*  @TODO handle not set lead selection

   IF lo_el_lt_flag IS INITIAL.

   ENDIF.

 

   lv_flag = 'X'.

 

*  set single attribute

   lo_el_lt_flag->set_attribute(

     name =  `FLAG`

     value = lv_flag ).

 

 

ENDIF.

 

 

*** POP Up On Medical Plan.

IF lv_flag = 'X'.

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

DATA lo_api_component  TYPE REF TO if_wd_component.

DATA lo_window         TYPE REF TO if_wd_window.

DATA lt_buttons        TYPE wdr_popup_button_list.

DATA ls_canc_action    TYPE wdr_popup_button_action.

 

lo_api_component           = wd_this->wd_get_api( ).

lo_window_manager          = lo_api_component->get_window_manager( ).

* create the cancel icon, but without any action handler

ls_canc_action-action_name = '*'.

* Simple example, see docu of method create_and_open_popup for details

lt_buttons                 = lo_window_manager->get_buttons_ok(

*    default_button       = if_wd_window=>co_button_ok

).

 

lo_window                  = lo_window_manager->create_and_open_popup(

    window_name          = 'W_ACKNOWLEDGE'

 

*    title                =

    message_type         = if_wd_window=>co_msg_type_none

    message_display_mode = if_wd_window=>co_msg_display_mode_selected

*    is_resizable         = ABAP_TRUE

    buttons              = lt_buttons

    cancel_action        = ls_canc_action

).

ENDIF.

 

 

I have created a node for the flag when it is medical plan,that the user is editing and i am  trying to read the flag value in different methods of the component to by pass the standard pop-up, still no Luck!!. Please help me with this issue.

 

Thanks,

Vishnu


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>