on 10-14-2009 1:23 PM
Hi,
I have one FPM OIF application which is consuming several generic UIBBs (Form, List. etc). I have created two configuration variants. DISPLAY and CHANGE and setting desired VARIANT in the "SHARED_DATA" component which implements IF_FPM_OIF_CONF_EXIT like this:
METHOD override_event_oif .
CASE io_oif->mo_event->mv_event_id.
WHEN if_fpm_constants=>gc_event-start.
io_oif->set_variant( 'DISPLAY' ).
WHEN if_fpm_constants=>gc_event-save.
io_oif->set_variant( 'DISPLAY' ).
WHEN if_fpm_constants=>gc_event-edit.
io_oif->set_variant( 'CHANGE' ).
ENDCASE.
ENDMETHOD.
Scenario:
In DISPLAY mode user selects TAB "B" . After switch to CHANGE mode becomes TAB "A" active.
PROBLEM DESCRIPTION:
After each VARIANT switch always the last selected TAB of every single Variant becomes active which is confusing for user, which is in DISPLAY mode in TAB "B" and wants to continue changing data on the same TAB switching to CHANGE mode.
I can read current VARIANT, MAINVIEW, SUBVIEW within override_event_oif like this:
DATA l_state TYPE if_fpm_oif=>ty_s_state.
io_oif->get_current_state( IMPORTING es_current_state = l_state ).
BUT I CAN NOT FIND OUT, how to set those values back to the FPM framework.
Thank you in advance for your proposals.
Kamil
Yes... this works. Thank you!
Edited by: Kamil Hasek on Nov 2, 2009 11:17 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kamil,
Before you set the variant, you have to save the actual tab to a global variable. After it the other variant will be used, then you have to raise an FPM event (cl_fpm_event=>gc_event_view_switch = "FPM_VIEW_SWITCH"), where you can set again the saved tab.
DATA:
lo_event_params TYPE REF TO if_fpm_parameter,
lr_event TYPE REF TO cl_fpm_event,
lo_fpm TYPE REF TO if_fpm.
CREATE OBJECT lo_event_params TYPE cl_fpm_parameter.
lo_event_params->set_value(
EXPORTING
iv_key = if_fpm_constants=>gc_event_param-view_id
iv_value = 'YOUR_SAVED_MAINVIEW_ID' ).
lo_event_params->set_value(
EXPORTING
iv_key = if_fpm_constants=>gc_event_param-subview_id
iv_value = 'YOUR_SAVED_SUBVIEW_ID' ).
CREATE OBJECT lr_event
EXPORTING
iv_event_id = cl_fpm_event=>gc_event_view_switch
io_event_data = lo_event_params.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event( lr_event ).
This is the trick! I hope it will help you.
Best regards,
Andrá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.