on 02-10-2016 7:26 PM
Hi All,
I am looking to implement a development where I need to navigate between two pages on the click of a button and then come back again on clicking back button. I wanted to know the best way to achieve this.
Environment is OIF.
I did use the interface IF_FPM_OIF_CONF_EXIT and via method OVERRIDE_EVENT_OIF, I can manage to call the new screen. But this method has it's own shortcomings. Hence, wanted to know if there is a way to trigger a new page/ variant from the PROCESS_EVENT or GET_DATA methods of a feeder class.
Thanks in advance for any help in this regard.
OIF does not have pages, it has views and subviews on a single page.
Go with OVP if you want to implement multiple pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the following code at a button event, whether from OVERRIDE or PROCESS_EVENT thats upto your code.
DATA: lo_fpm TYPE REF TO if_fpm,
lo_event_param TYPE REF TO cl_fpm_parameter.
lo_fpm = cl_fpm_factory=>get_instance( ).
CREATE OBJECT lo_event_param.
lo_event_param->if_fpm_parameter~set_value(
iv_key = if_fpm_constants=>gc_event_param-target_content_area
iv_value = iv_page ## PAGE ID
).
lo_fpm->raise_event_by_id(
iv_event_id = cl_fpm_event=>gc_event_change_content_area
io_event_data = lo_event_param
).
Thanks Vaibhav. That worked while moving from 1st page to 2nd. However, while coming back from 2nd page to 1st, using the same code, it triggers the first page but also triggers an error
No valid target content area found
Please let me know if you are aware of this error. I am triggering the back button at FPM_BACK_TO_MAIN event.
If your first page is main page and the second page is edit page then from the first page call the second page with event "FPM_CALL_DEFAULT_EDIT_PAGE"
So,
lo_fpm->raise_event_by_id(
iv_event_id = 'FPM_CALL_DEFAULT_EDIT_PAGE'
io_event_data = lo_event_param
).
then you can use FPM_BACK_TO_MAIN from second page.
But if both are main page then use cl_fpm_event=>gc_event_change_content_area in both cases.
For more refer: Navigation events for OVP
Regards
Vaibhav
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.