on 07-12-2012 8:23 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.