cancel
Showing results for 
Search instead for 
Did you mean: 

opening dialog box on pressing the default Next button

Former Member
0 Kudos

Hi,

I want to call a dialog window on press of a next button in my GAF FPM component.

I wrote the code for calling dialog in one method and called that method from PROCESS_EVENT method of component controller for the correct Next button press event in one of the interface view.

But the dialog is not opening. The code written for opening the dialog is as below:

DATA: lo_fpm type ref to if_fpm,
        lv_window_id
type fpm_dialog_window_id.

  lv_window_id
= 'WINDOW_5'.
  lo_fpm
= cl_fpm_factory=>get_instance( ).
  lo_fpm
->open_dialog_box( EXPORTING
    iv_dialog_box_id
= lv_window_id ).

Is it like I cannot open dialog on default button press and I need to create a new toolbar button?

Pklease suggest

Regards

Arindam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try writing the code directly in method PROCESS_EVENT and use the correct event ID check.

IF io_event->mv_event_id = cl_fpm_event=>gc_event_next_step.

    DATA: lo_fpm type ref to if_fpm,
  lv_window_id
type fpm_dialog_window_id.
  lv_window_id
= 'WINDOW_5'.
  lo_fpm
= cl_fpm_factory=>get_instance( ).
  lo_fpm
->open_dialog_box( EXPORTING
    iv_dialog_box_id
= lv_window_id ).


ENDIF.

Former Member
0 Kudos

Hi Manish,

Many thanks for your response. Still doesn't work. Pasting below my PROCESS_EVENT code.

METHOD process_event .DATA: lv_flag TYPE boolean,
      lo_fpm
type ref to if_fpm,
      lv_window_id
type fpm_dialog_window_id,
      lv_interface_view
TYPE string,
      lv_subrc
TYPE i.

 
CASE io_event->mv_event_id.
   
WHEN io_event->gc_event_next_step.* loop at all views to fetch which view triggered this action
     
LOOP AT it_interface_views INTO lv_interface_view.
       
IF lv_interface_view = 'WINDOW_2'.
         
CALL METHOD wd_this->mt_validate
            RECEIVING
              subrc
= lv_subrc.
         
IF lv_subrc IS INITIAL.
            wd_this
->mt_validate_before_save( ).
         
ENDIF.
       
ELSEIF lv_interface_view = 'WINDOW_3'.
          lv_window_id
= 'WINDOW_5'.
          lo_fpm
= cl_fpm_factory=>get_instance( ).
          lo_fpm
->open_dialog_box( EXPORTING
            iv_dialog_box_id
= lv_window_id ).
          wd_this
->mt_save_details( ).
       
ENDIF.
     
ENDLOOP.     

ENDCASE.

Please help.

Reagrds

Arindam

Former Member
0 Kudos

Can you check the value of MV_EVENT_ID in debugging mode?

After that check the interface view table in debugging for the following check.

lv_interface_view = 'WINDOW_3'.

I think the code is not getting triggered due to some mismatch of conditions.

Former Member
0 Kudos

Hi Manish,

I debugged and the value of MV_EVENT_ID gets a value FPM_NEXT_STEP.

The condition lv_interface_view satisfies

and the lo_fpm also gets populated with a reference of the class after the execution of this line

lo_fpm->open_dialog_box(

  iv_dialog_box_id = lv_window_id ).

I have also executed the code by commenting the line below.

wd_this->mt_save_details( ).

Still dialog doesn't appear.

Please suggest further.

Regards

Arindam

Former Member
0 Kudos

Hi,

Have you included the dialog box during Configuration?

You should include the interface view WINDOW_5 as a dialog box in the configuration when you create the application configuration.

Answers (0)