cancel
Showing results for 
Search instead for 
Did you mean: 

Can "Previous" button be disabled on the last step of custom GAF application

jitendra_mehta
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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 ).

jitendra_mehta
Participant
0 Kudos

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.

Former Member
0 Kudos

You might be getting the short dump because a button with the same event already exists. Try to see if you can disabled the standard button instead of creating you own.

jitendra_mehta
Participant
0 Kudos

No. I have not defined my own buttons for 'NEXT' or 'PREVIOUS' step. They are default buttons.

anand_govardhan
Active Participant
0 Kudos

Hi Jitendra,

You can use this link to achieve this requirement.

http://scn.sap.com/docs/DOC-53324

Thanks,

Anand

jitendra_mehta
Participant
0 Kudos

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.

former_member206479
Participant
0 Kudos

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

jitendra_mehta
Participant
0 Kudos

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.

Former Member
0 Kudos


Hi Jitendra,

I have experienced this with OIF, when i wanted to disable continue button, i got a ref of CNR and passed the relevant value, it didnt change but visibilty works.

and I am assuming since they are standard buttons, there is a limiation on disabling those.

Regards

Anurag

former_member184741
Active Contributor
0 Kudos

This message was moderated.

jitendra_mehta
Participant
0 Kudos

Hi Sankara:

Thanks.

Can you please describe how to get element CNR_VIEW over there. When I go to tab strip view for
'Web Dynpro Built-In', the screen has no option to edit (or add) values in that screen.

Jitendra