on 07-01-2014 12:26 AM
Hi FPM experts:
I have created a custom application using GAF component. I have created 4 screens each with input fields. On the 4th screen, I have provided a custom "SAVE" button. On clicking that button, I save the record and I kick-off event FPM_NEXT_STEP so that it goes on the 5th screen that shows the acknowledgement of record saving (or error in Saving). On that last screen, I have created a custom button "Return to Main Menu" and I have writted code so that clicking it takes me back to the portal link from where I started.
On the last (5th) screen, I get a "Previous" button and I would like to disable it. Is that possible? If so, how? If not, is there any graceful manner where I can provide an acknowledgement and the only option (button) to return to the main menu on screen 5?
Any answers/suggestions is greatly appreciated.
Quick thought:
If you implement interface IF_FPM_GAF_CONF_EXIT in your WDA component, you can use method OVERRIDE_EVENT_GAF to capture the event of displaying the last page.
Another thought:
In the application controller, (where you implement interface IF_FPM_APP_CONTROLLER), use method BEFORE_PROCESS_BEFORE_OUTPUT where you can handle the event of displaying the last page.
Once you handle the event of displaying the last page, get hold of the FPM instance and then edit the CNR object. Here is a snippet from the FPM Developer Guide on how to get CNR:
DATA: lo_cnr_gaf TYPE REF TO if_fpm_cnr_gaf,
lo_fpm TYPE REF TO if_fpm.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_cnr_gaf ?= lo_fpm->get_service(
cl_fpm_service_manager=>gc_key_cnr_gaf ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdullah:
I had earlier implemented interface and coded method override_event_gaf. Somehow, when I run my application with a breakpoint in this method, it never stops in this method.
For your next suggestion, I had already tried it. But when I use method define_button of instance lo_cnr_gaf, (with parameter iv_function = if_fpm_constants=>gc_button-next_step and iv_enabled = '01'), I get a dump.
I had also tried the above in method process_before_output in my web dynpro component and I got the same dump.
Hi Jitendra,
You can use this link to achieve this requirement.
http://scn.sap.com/docs/DOC-53324
Thanks,
Anand
I had already tried this solution before writing this post. It does not work.
It skips the entire logic in the post-exit code (for method MODIFY_VIEW_ASSEMBLY of FPM_GAF_COMPONENT) at the following sentence.
CHECK wd_this->mr_app_cc_usage IS BOUND.
Since this instance attribute comes as initial, it leaves the method without executing the further logic.
Hi Mehta,
It worked for me, Did you write the code in disable_previous_step method?
method disable_previous_step.
rv_disabled = abap_false.
IF is_gaf_info-mainstep = 'MAINSTEP_5'. < here you have to specify last step name from the FPM Configuration it should be hard coded value>
rv_disabled = abap_true.
ENDIF.
endmethod.
Regards,
Venkat
Hi Venkat:
I did code methods for disable_previous_step and disable_next_step.
The problem is different.
In post-exit code (for method MODIFY_VIEW_ASSEMBLY of FPM_GAF_COMPONENT), here are the first few lines. On line 4, since wd_this->mr_app_cc_usage is initial, it skips the logic down below (I have not shown here) where I try to call method to disable previous or next step.
CHECK iv_event_failed <> abap_true.
ls_fpm_info = wd_this->mr_fpm->get_runtime_info( ).
CHECK ls_fpm_info-floorplan = 'GAF'.
CHECK wd_this->mr_app_cc_usage IS BOUND.
TRY.
lr_stdbtns ?= wd_this->mr_app_cc_usage->get_interface_controller( ).
CATCH cx_sy_move_cast_error .
RETURN.
ENDTRY.
This message was moderated.
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 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.