cancel
Showing results for 
Search instead for 
Did you mean: 

How do I hide multiple steps in GAF FPM

Former Member
0 Kudos

I have a GAF FPM that has five steps. Based on some data condition I want to hide steps 2 and 3. I have implemented the interface IF_FPM_GAF_CONF_EXIT to get the OVERRIDE_EVENT_GAF method. WIthin in that I am calling the HIDE_MAINSTEP two times, however, it appears that only the second HIDE_MAINSTEP is taken.

Is there some way to commit or update between calls.

My code is:

CALL METHOD IO_GAF->HIDE_MAINSTEP

EXPORTING

IV_VARIANT_ID = 'MAIN'

IV_MAINSTEP_ID = 'Account'

.

CALL METHOD IO_GAF->HIDE_MAINSTEP

EXPORTING

IV_VARIANT_ID = 'MAIN'

IV_MAINSTEP_ID = 'Profile'

.

When I test my application only the PROFILE step is hidden. What do I need to add to make sure that both steps are hidden? I know that I can create a variant with these steps removed but in the end I will need to conditionally hide one to main of the five steps which will end up being main variants. Ideally I do not want to maintain all possible combinations of 5 steps.

Thanks for the help...

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I have implemented the GAF exit in the first web dynpro component so it is executed before the first step of the floor plan is displayed. To be clear, my FPM has 5 steps and I am trying to hide steps 2 and 3 at the same time.

I have tested only trying to hide one step and that works great. As soon as I add another step to hide only the last call to HIDE_MAINSTEP is actually completed. So in my code example above the first call to HIDE_MAINSTEP is not actually completed. So instead of taking by FPM from all steps 1-2-3-4-5 and hiding steps 2 and 3 like it want (1-4-5) I only end up with 1-2-4-5.

Thanks for any other suggestions...

Former Member
0 Kudos

Hi Brad,

Did you find a solution for this? I am facing a similar situation.

Thanks,

Puja

Former Member
0 Kudos

Hi,

I actually can confirm this behavior ,it does work that way. When you issue hide_mainstep it is not immediately going to execute the statement. It does only at the end of the method. Meantime if you code it second or third hide_mainstep then only the last statement is in the call stack.

I have done the same thing by creating a method which will be called every time in the override_method. There in i check the main step ids to see if they are to be enabled or not.

I shall post the code tomorrow if you need.

Former Member
0 Kudos

Hi Bhaskaran,

Yes, I tested the behaviour in debug and indeed , the enablement applies only to the last step that you enabled/disabled.

That's a pretty cool approach to override the hide_mainstep behaviour. It would be helpful to us if you could post the code.

Thanks,

Puja

Former Member
0 Kudos

Hi ,

i have used the following code on the FPM_START event IN OVERRIDE METHOD to disable the steps.

TRY.
      io_gaf->get_mainsteps( IMPORTING et_mainstep = lt_main_step ).

 LOOP AT lt_main_step INTO ls_main_step.
          io_gaf->enable_mainstep(
            EXPORTING
              iv_variant_id  = ls_main_step-variant
              iv_mainstep_id = ls_main_step-id
              iv_enabled     = abap_false ).
        CATCH cx_fpm_floorplan INTO lx_fpm_floorplan.
ENDLOOP.
ENDTRY.

Former Member
0 Kudos

Hi

According to the developpers guide this should work.

have you tried only hiding account main step alone . Is it working ?

Check that you havent made spelling mistakes with the MAINSTEP_ID.

Former Member
0 Kudos

Hi Brad,

I just want to know in which component you have implemented that interface.

Regards,

Srikanth.