cancel
Showing results for 
Search instead for 
Did you mean: 

Steps for using interface IF_FPM_CNR_GAF for SRM enhancement

Former Member
0 Kudos

Dear forum members,

I am an SRM consultant and want to change the toolbar labels for some buttons in the FPM.

SRM uses a GAF FPM and I need to know how to implement a supported enhancement to change the label of the 'Save' button to 'Hold' for some applications only.

Can someone please provide detailed steps for me to be able to achieve this?

I have found the following, but it is not detailed enough for me:

"IF_FPM_CNR_GAF Interface

This interface provides you with methods to dynamically change the FPM toolbar of

an initial screen or main screen.

The interface is accessed via the CL_FPM_SERVICE_MANAGER, as the code below

shows:

Accessing the API for a GAF application:

Syntax

1. DATA: lo_cnr_gaf TYPE REF TO if_fpm_cnr_gaf,

2. lo_fpm TYPE REF TO if_fpm.

3. lo_fpm = cl_fpm_factory=>get_instance( ).

4. lo_cnr_gaf ?= lo_fpm->get_service(

cl_fpm_service_manager=>gc_key_cnr_gaf )."

Can someone please help me to set this up?

Many thanks in advance,

Best regards,

Nick

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You are there !! I would do some thing like this to get the buttons per main view and loop through them and change them as you wish.

field-symbols:
    <fs_button>	                       type if_fpm_cnr_gaf=>s_button.

   data:
    lt_button	                         type if_fpm_cnr_gaf=>t_button.

   wd_this->go_fpm_cnr_gaf->get_buttons( importing et_buttons = lt_button ).


  loop at lt_button assigning <fs_button>.
    wd_this->go_fpm_cnr_gaf->define_button(
      exporting
        iv_variant_id = <fs_button>-variant_id
        iv_function   = <fs_button>-function
        iv_element_id = <fs_button>-element_id
        iv_design     = <fs_button>-design
        iv_enabled    = <fs_button>-enabled
        iv_on_action  = <fs_button>-on_action
        iv_text       = <fs_button>-text
        iv_tooltip    = <fs_button>-tooltip
        iv_visibility = <fs_button>-visibility
        iv_hotkey     = <fs_button>-hotkey     ).
  endloop.

Former Member
0 Kudos

Hi Baskaran,

I am fine with the code itself, just don't know where to code it and how to create the enhancement (user exit) for the interface.

Can you pls provide these steps?

Thanks,

Nick

Former Member
0 Kudos

Hallo Nick,

I am not a SRM guy and have no access to SRM .

In Webdynpro component do you have any methods from the interface IF_FPM_UI_BUILDING_BLOCK.

If you have this interface implemented then i would do a enhancement of post exit to the method PROCESS_BEFORE_OUTPUT.

Former Member
0 Kudos

Hi Baskaran,

In SE80, that interface does not exist in SRM.

I guess my question is more generic. I need to create an enhancement for an interface, how do I do that? Are there steps which you can tell me which apply irrespective of the interface in question?

I have written BADI's before, but I don't really understand how you create an enhancement from an interface.

Thanks a lot,

Nick

Former Member
0 Kudos

HAllo Ross,

In SRM you have some places where the FPM events are handled right ? you need to enhance that method to adjust the button.

I am not even sure if you can enhance a interface.

Former Member
0 Kudos

How do I enhance the method? I don't do a direct repair presumably?

Thanks,

Nick

Former Member
0 Kudos

Hallo Nick,

If it is a webdynpro then you can do a enhancement via ctrl+f4 or see that in the workbench top menu Controller/view->enhance

Former Member
0 Kudos

Hi,

We're going round in circles here now because the code to change are in methods which are part of standard interface 'IF_FPM_CNR_GAF' such as the method 'GET_BUTTONS'.

The help doc I found says it has to be done via:

"The interface is accessed via the CL_FPM_SERVICE_MANAGER"

Can someone please help with this enhancement? How is it done step by step please?

Thanks,

Nick

Former Member
0 Kudos

>

> Hi,

> We're going round in circles here now because the code to change are in methods which are part of standard interface 'IF_FPM_CNR_GAF' such as the method 'GET_BUTTONS'.

>

> The help doc I found says it has to be done via:

> "The interface is accessed via the CL_FPM_SERVICE_MANAGER"

>

> Can someone please help with this enhancement? How is it done step by step please?

> Thanks,

> Nick

HAllo Nick,

I am sorry that i could not help you as i already said that i am not SRM expert.

I hope someone in SRM area would respond the step by step procedure for you.

You can try something like this to get the reference of the cnr_gaf object.

wd_this->mr_cnr_gaf ?= cl_fpm_service_manager=>get_service( cl_fpm_service_manager=>gc_key_cnr_gaf ).

You do this one enhancing wddoinit method (post-exit).

Success

Former Member
0 Kudos

Hi Baskaran,

I don't think you need to be an SRM expert for this - the documantation on the interface and class I found was in the 'Floorplan Manager for ABAP - Developer's Guide' document, so the enhancement I need to do should appy to any SAP system which uses FPM.

Thank you for your help anyway, but hopefully someone else with this experience can help.

Best regards,

Nick

Former Member
0 Kudos

>

> Hi Baskaran,

> I don't think you need to be an SRM expert for this - the documantation on the interface and class I found was in the 'Floorplan Manager for ABAP - Developer's Guide' document, so the enhancement I need to do should appy to any SAP system which uses FPM.

>

> Thank you for your help anyway, but hopefully someone else with this experience can help.

> Best regards,

> Nick

Hallo Nick,

In webdynpro i would have done this with out any problem. For example

-FPM_TEST_NAVIGATION component.

-Select this component->controller->enhance

-fill in the enhancement details in a popup -> i use the ZZSBN_TEST_IMPL3 as enhancement implementation , fill in short text and press enter.

-Fill in the transport data (i choose local object ).

-close (f3) , go back to the package/local user->local object in object naviagtor->select enhancement-> choose enhancement implementation(i slect ZZSBN_TEST_IMPL3)

-travel through the node until you reach the a method where you want to enhance.(i choose COMPONENTCONTROLLER)

-Choose controller(top left)->enhance->popup->choose ZZSBN_TEST_IMPL3(select this line).

-You see the right side pane status "Enhanc.inactive" ,pre exit,post exit,overwite buttons with delete icon (ignore this part )

- select a method (PROCESS_BEFORE_OUTPUT)->use bottom scroll bar to traverse right side until you see enahncement buttons like pre,post,overwrite buttons in every cell.

- i choose a post-exit, method opens and the name is like this PSTD9IMD481CRS9OXKK1AZJR917J

- Here i write my logic to get the reference to the cnr_gaf and get_buttons.

-

Former Member
0 Kudos

Hi Baskaran,

Thanks for the tip.

If no-one can help me with the class and interface problem I may try this out.

Best regards,

Nick