cancel
Showing results for 
Search instead for 
Did you mean: 

FPM : OVERRIDE_EVENT_GAF method of Component Controller

carlin_willams
Participant
0 Kudos

Hello All

I am not able catch the button evenet value in OVERRIDE_EVENT_GAF method of Component Controller.

What i have done is

1) Created FPM Application with Road Map 4 Mainsteps.

2) In the First Road Map contains view, having two buttons. On click of buttons need to hide MainStpes

Example : On Click of Button1 need to show Step1 Step2 and Step3 means Step4 is hiding

On Click of Button2 need to show Step1 Step3 and Step4 means Step2 is hiding

3)For the above requirement In the View created two actions for two buttons. In Button1 action written below code.

Code for Button1 Action in the View

data: lo_fpm type ref to if_fpm,*lr_event type ref to cl_fpm_event.

  • create event

lr_event = cl_fpm_event=>create_by_id(

cl_fpm_event=>gc_event_change_step ).

lo_fpm = cl_fpm_factory=>get_instance( ).

lr_event->mo_event_data->set_value(

iv_key = 'B1'

iv_value = 'BUTTON1').

4) onclick of Button 1 when i m trying to get the value of B1 it is coming empty in the OVERRIDE_EVENT_GAF method of Component Controller. Expecting "BUTTON1" written below code

Code for OVERRIDEEVENT_GAF method of Component Controller_

DATA: lo_fpm TYPE REF TO if_fpm,

lr_event TYPE REF TO cl_fpm_event.

  • get reference to FPM API

lo_fpm = cl_fpm_factory=>get_instance( ).

  • create event

lr_event = cl_fpm_event=>create_by_id(cl_fpm_event=>gc_event_change_step ).

lr_event->mo_event_data->get_value(iv_key = 'B1' ).

5) Based on condition planning to hide the steps.

IF BUTTON1

Hide Step4

IF BUTTON2

Hide Step2

Please help how to get value in OVERRIDE_EVENT_GAF method of Component Controller onAction of Button

Edited by: CarlinWilliams on Jun 17, 2011 1:56 PM

Edited by: CarlinWilliams on Jun 17, 2011 1:57 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi CW,

I think chris has explained it.

I assume from your post that you have a buttons in the WDA view and you are creating the FPM event based on that button action.

In that case , make sure that you fire the event as suggested by Chris.

IF you have the FPM buttons,instead of the wda view buttons , then you do not need these firing event. You can directly catch the event.

ChrisPaine
Active Contributor
0 Kudos

Hi Carlin,

You need to ensure that you raise the event:

e.g. here I raise an event to pass some data from an org chart:

lo_event =
     cl_fpm_event=>create_by_id( zpa_os_org_struc_flex_n_assist=>c_island_nav_up_requested ).

  lo_event->mo_event_data->set_value(
           iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
           iv_value = ls_nav_node ).

  wd_this->ao_fpm->raise_event( lo_event ).

Then you need to read the event. In the OVERRIDE_EVENT_GAF method you can read the event by referring to

io_gaf->mo_event

e.g.

io_gaf->mo_event_data->get_value( exporting iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
                                          importing ev_value = ls_node_detail  ).

let me know if you need any other help/explanation,

Cheers,

Chris

carlin_willams
Participant
0 Kudos

Thanks Cris.

Provided code helped to resolved my issue. BUT i am unable navigate to Variants based upon Buttons action

I have explained my problem in the below thread, If you have any suggestions let me know.

How to trigger Variants in WDA FPM

BR

-CW