cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a custom button to FPM - how to manage the custom event

matteo_montalto
Contributor
0 Kudos

Hello experts,

I'm dealing with a simple task, that is, adding a custom button to FPM (OIF) in a standard application.

So; I found that the standard application (RFx process in SRM) uses FPM_OIF_COMPONENT with the configuration /SAPSRM/WDCC_FPM_OIF_RFQ_PR_PU.

I then used the Component Configurator on /SAPSRM/WDCC_FPM_OIF_RFQ_PR_PU , enhancing that in order to add a custom button, say FOO.
The element ID is the set to "FOO" while FPM Event ID is set to "FOO_BAR" (I have to implement this, right?).

Now, starting from the point that the button is visible thru the application but obviously, it doesn't work...Searching in SDN I found that I should write my own code into the PROCESS_EVENT of ComponentController... but which ComponentController?

As the application uses FPM_OIF_COMPONENT, it has a lot a subordered MainView, and each one of these contains a WD Component. Each one has its own ComponentController.

This makes me thinking that once I add to identify what's called "appCC" for a certain configuration. I used to do it via Configurator on a SAP SRM 700.

Is this the right direction or I'm missing something?

If I'm following the right path... there's a problem. I'm now dealing with a SAP SRM 702 and the Component Configurator layout has been modified a bit; I cannot locate the option to see what's the appCC reference for that configuration.

Could you please help me? Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you add your custom button on UIBB toolbar then uibb must be using some WDcomponent you haev to place your code in process_event method of that wdcomponent.

but if you add it at toolbar of  FPM_OIF_COMPONENT then it will trigger for all uibb you can place your code in any uibb WDcomponent in your configuration.

matteo_montalto
Contributor
0 Kudos

Hello Jitendra,

you mean I can place my code on just one COMPONENTCONTROLLER -> process_event method of a UIBB WDComponent and it will work for the whole application?
Or you mean I should take *every* UIBB WDComponent in the configuration and fill COMPONENTCONTROLLER -> process_event with my routine?


The second option seems not so smart... I should replicate exactly the same code in dozen points..

By the way; I tried considering a WD Component used by the application (/SAPSRM/WDC_DODC_RFQ_H_BD) and put a breakpoint on its componentcontroller->process_event method (which I overrided with a simply sketch of code just to see if the execution flow pass from there).... and the method isn't triggered, neither for my custom button and for any standard FPM standard button (check, copy, etc).

Am I missing something?

Former Member
0 Kudos

its depend on your bussiness logic if you need to change context of one uibb on that event than you only need to place code in that uibb componentcontroller

but if you need to change multiple uibb context then you haev to put code in all uibb in which you have requirement to change context

matteo_montalto
Contributor
0 Kudos

Ok, it's better then to explain further the requirement...

The application is a standard one, in SRM 7, and it is used to process RFx and Bids.


I need to add to the FPM toolbar (the main toolbar, above all the tabs) a custom buttom, which should behave as a standard one ("publish") and - in addiction - has to do some other stuffs.

So, I was thinking it could be possible to add the button from Component Configurator: in order to do so, I went to se80 -> FPM_OIF_COMPONENT and searched for the specific configuration used the application.

There I added my custom button by means of an enhancement.

Now, the tricky stuff. Where do I have to manage my code? In each WD Component underlying the application? It seems quite a wrong approach, as there should be a smarter way to obtain the desired behaviour.

By the way, as told before, if I get any WD Component used as UIBB in the application and place a dummy code in componentcontroller -> process_event, I can see that these methods are NOT triggered by normal user's activity.

Any hint/suggestion/reference to howto documentation would be highly appreciated.

Thanks again

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Ok, I found some documentation and how-to... but I have a doubt,

If someone can kindly confirm my doubts or just explain why the procedure is correct... I'll appreciate very much.

In this tutorial:

https://scn.sap.com/docs/DOC-25271

is shown how to add a custom button to Shopping Cart.

This is quite the same requirement as mine (I have to add a custom button to RFx), so I could follow it .... BUT:

I'm stuck on the "where do I have to put my code?" question and for the above tutorial says it must be managed with a post-exit on the method  "ONACTIONBUTTON_PRESSED" (via enhancement).

However, I've heard many times that the FPM_OIF_COMPONENT should *never* be modified as mods here affects not only the application I'm working on, but the entire set of application that make use of FPM_OIF_COMPONENT.

Is this true? Or should I follow the tutorial ?

Former Member
0 Kudos

your button have specific event id  make sure that your  code only execute  when this event trigger this won't impact other application functionality

matteo_montalto
Contributor
0 Kudos

Hi Jitendra and thanks for your valuable help,

I'm trying adding code to FPM_OIF_COMPONENT via enhancement, restrincting the execution of that code to my specific event. Anyway, I'm kinda confused about this approach as for what I've seen, FPM_OIF_COMPONENT shouldn't be taken into account when dealing with custom dev.

I'm gonna try it anyway, while looking for the best practice to accomplish the task.