What I am trying to explain:
1.Navigation between views in OIF Application .
2.How to change UIBB at run time (hide)
3.How to change FPM toolbar at run time (This is different case,will explain later in this document)
What I have done:
I have developed very simple FPM application with 2 main views,4 sub views, with 2 webdynpro components and and custom button 'Next'.I used same webbdynpro component interface view for 3 UIBB with different configuration . The first screen we have to enter name,education,job.If person is illiterate and working and click on Next it should skip eduction details sub view and directly go to job details screen.If he is illiterate and not working it go to last conformation screen and Next button should not be there in that screen.So when we click on Next button navigation depends on person entered details.
Navigation:
What we should do.?
Create event object with ID CL_FPM_EVENT=>GC_EVENT_VIEW_SWITCH and parameters
IV_KEY = CL_FPM_EVENT=>GC_EVENT_PARAM_VIEW_ID ,
IV_VALUE = <main view ID to navigate>;
IV_KEY = CL_FPM_EVENT=> GC_EVENT_PARAM_SUBVIEW_ID,
V_VALUE = <sub view ID to navigate >,then raise the event
Where we have to create event object and raise?
Generally we can create event object any where in FPM application,But for this event to work we should create in class or webdynpro component which implemented application specific configuration controller for OIF interface IF_FPM_OIF_CONF_EXIT. It has only one method IF_FPM_OIF_CONF_EXIT~OVERRIDE_EVENT_OIF so we should write our code in that.
So I Created new class and implemented Interface .
If we create event with main view parameter and not assigned sub view parameter then we can navigate to particular sub view by calling SET_SELECTED_SUBVIEW method like below
What else?
Let be known the Implemented class or webdynpro to fpm application.
How?
Go to component connfiguration of your fpm application click on Change ,Global setting and assign your class or webdynpro component to Webdynpro component field as below
My application.
If user click on Next button I read the user entered values in Process_event method of component controller and raise FPM event depend on entered values
Suppose user is illiterate and notworking then we raising event 'CON'.
Then depend on event we filling navigation details in IF_FPM_OIF_CONF_EXIT implemented class.
In the above case so we setting parameters main view as MAIN and subview as CONV. So it goes to subview of CONV in Main view of MAIN2 that is Conformation or last screen .So if user entered illiterate , notworking and click on the Next button fpm navigate to conformation screen
If you observe Conformation screen Next button is missing.
Toolbar modification.
We can use methods of IF_FPM_CNR_OIF to change the toolbar at runtime.Gena rally we write the code in WDDOMODIFYVIEW of interface view. I used same webdynpro interface view for three subviews education,job and conformation. So if I hide Next button WDDOMODIFYVIEW then it applies to all three subviews. I need more information to hide only on last screen only.I can get that information as below and hide on last screen as below.
Hide subview
We can change the configuration at run time in IF_FPM_OIF_CONF_EXIT~OVERRIDE_EVENT_OIF.
In my application if user entered literate and notworking I can hide the job subview as below.
We can do similarly in GAF also with event id CL_FPM_EVENT=>GC_EVENT_CHANGE_STEP and parameters
iv_key CL_FPM_EVENT=>GC_EVENT_PARAM_MAINSTEP_ID and CL_FPM_EVENT=>GC_EVENT_PARAM_SUBSTEP_ID
You can watch http://youtu.be/atyBwN-dMZA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |