cancel
Showing results for 
Search instead for 
Did you mean: 

Custom button in FPM component

YayatiEkbote
Contributor
0 Kudos

Hello experts,

In a requirement i want to add custom button in FPM_OIF_COMPONENT. For this i followed following steps -

1. In SE80 transaction open FPM_OIF_COMPONENT

2. Select the requisite component configuration.

3. Start Configurator.

4. In configuration, enter component name & configuration ID then select option 'Continue in Display mode'.

5. In display mode, in 'Additional Functions', select 'Create customization' or if configuration already exists, then select 'Edit Configuration'.

6. In toolbar schema, I added one toolbar element as 'Other Function' and set the properties as enabled checked and visibility as 'Is Visible'.

7. Save.

8. After this to control the action of the new button, i added the action 'ZACT' in 'CNR_VIEW' by enhancing the view.

9. In SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Assign actions, i assigned the action to set type and business object.

10. Then in SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Control Actions->Configure control on header level, I added PDO action type, BO type, PDO action enabled, dynamic class & method to control the button visibility.

After doing all the steps above, when i open the required window in SRM portal, I am unable to view the custom button added.

Please let me know where i am going wrong.

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Yayati,

Please check the below document

Hope this helps you.

Regards,

Rama

YayatiEkbote
Contributor
0 Kudos

Hello Ramakrishna,

Thanks for the document reference. After reading this document, i found that my FPM settings are correct. Then i did intensive debugging. I found that, in buttonpressed method of component controller of FPM_OIF_COMPONENT. I found that action_id of my button is coming different. I had set FPM_EVENT_ID in FPM config as ZACT. But in action id, i am receiving FPM_ACTION_ID_1.

But now, even if i define an action with the name of this action ID, in the method ONACTIONFPM_ACTION_ID_1 of CNR_VIEW of FPM_OIF_COMPONENT, control does not reach there. I want to trigger the action which i defined in CNR_VIEW actions tab.

Regards,

Yayati Ekbote

Former Member
0 Kudos

Hi Yayayi,

You need to refer FPM event id of the corresponding button but not action id. As you said you have given FPM_EVENT_ID as ZACT, write the code in process event of component controller of  your WDP component in which IF_FPM_UI_BUILDING_BLOCK interface has been re-implemented.

But dont forget to follow the below steps shown in snapshot.

Hope this helps you.

Thanks

KH

Answers (1)

Answers (1)

YayatiEkbote
Contributor
0 Kudos

Hello experts,

Now i am able to see the button. In the method of action created, i have written some code. When i press this button, control does not reach to this method. I tried to put a break point in the method. But control does not reach this method and nothing happens when i press this button.

Could you please let me know what i am missing?

Regards,

Yayati Ekbote

Former Member
0 Kudos

Hi Yayati,

Have you check if there is any EVENT_ID associated with that button which you were taking about.

If not , assign event id and in PROCESS_EVENT( ) of COMPONENT CONTROLLER handle that event.

CASE IO_EVENT->MV_EVENT_ID.

WHEN "<your button event>".

"Write your code here .

ENDCASE.

Thanks

KH

YayatiEkbote
Contributor
0 Kudos

Hello Katrice,

Thanks for your quick reply but i am unable to find any process_event method in methods tab of component controller. I am working on SAP SRM 7.0 EHP3 environment. But as this issue is related to general FPM configuration, i posted this message in Web dynpro ABAP space.

In FPM configuration, in the attributes of the custom button, i had given FPM_EVENT_ID and element_ID. Is the FPM_EVENT_ID the same as event_ID in WD?

I defined the action with name same as FPM_EVENT_ID.

Regards,

Yayati Ekbote

Former Member
0 Kudos

Hi ,

FPM_EVENT_ID/EVENT_ID  for a button are one and the same.

Thanks

KH

YayatiEkbote
Contributor
0 Kudos

Hello Katrice,

I have defined FPM_EVENT_ID then. Also i have defined action in CNR_VIEW of FPM_OIF_COMPONENT. How do i link this FPM_EVENT_ID with the action defined in CNR_VIEW?

Regards,

Yayati Ekbote