cancel
Showing results for 
Search instead for 
Did you mean: 

Add custom button in RFx

Former Member
0 Kudos

Hi all,

I want to put a custom button in the RFx.

I managed to do it but I do not know where to put the code.

For add the button I did it;

SPRO -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Define and Assign Actions

I've defined a new action, and i assigned it to the object BUS2200 in header level. Then i went to the component FPM_OIF_COMPONENT and Component Configurations: /SAPSRM/WDCC_FPM_OIF_RFQ_PR_PU and i've actived the button.

At this point i can see the button in the RFx, but where i need to put the code for this button?

I've gone to the next option in SPRO: Control Actions, but I do not see where to put my code.

The Dynamic Customer Class is only to control the display mode of the button, not?

any idea?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Husalban,

We added customer button in the rfx iview.

When you finish the configuration adding, you can go to the WDA component 'FPM_OIF_COMPONENT'/View:CNR_VIEW/Methord:ONACTIONBUTTON_PRESSED.

You can make repair here or continue to find the rfx PDO class.

Please be careful when you decide to make repair code and considerate the upgrade.

In the methord ONACTIONBUTTON_PRESSED,please refer to follow code:

***---->Add By lorry for test Action

IF lv_event_id = 'ZAPPWLF' OR lv_event_id = 'ZAPPWLF_VIEW'.

*****************Get the Parameter Vaule

DATA:lt_keys TYPE STANDARD TABLE OF string,

lv_key LIKE LINE OF lt_keys.

TYPES:BEGIN OF y_parameters,

name TYPE string,

value TYPE string,

END OF y_parameters.

DATA lt_parameters TYPE STANDARD TABLE OF y_parameters.

DATA ls_parameter LIKE LINE OF lt_parameters.

lt_keys = lo_fpm->mo_app_parameter->get_keys( ).

LOOP AT lt_keys INTO lv_key.

ls_parameter-name = lv_key.

lo_fpm->mo_app_parameter->get_value(

EXPORTING

iv_key = lv_key

IMPORTING

ev_value = ls_parameter-value

).

INSERT ls_parameter INTO TABLE lt_parameters.

ENDLOOP.

DATA:ls_boid TYPE bbp_guid,

ls_botype TYPE string,

ls_mode TYPE string.

CLEAR ls_parameter.

READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOID'.

ls_boid = ls_parameter-value.

CLEAR ls_parameter.

READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOTYPE'.

ls_botype = ls_parameter-value.

IF ls_botype = 'BUS2200'.

...............................................

ENDIF.

ENDIF.

Former Member
0 Kudos

Thanks lorryhappy, I've added a post-exit in that method and works fine.

Thanks, that is what i need.

Answers (1)

Answers (1)

Former Member
0 Kudos

For this you'd have to develop an enhancement on the relevant WebDynpro UI screen by

1) adding a button on the layout

2) associating your button with an event, e.g. z_new_action

3) implement the onaction_ method for the button

Former Member
0 Kudos

Then this path in SPRO is for ??

Former Member
0 Kudos

The path in SPRO for action/button extensions are for customized button enablement, i.e. whether or not a button should be activated. It does not involve the actual event handling when the button is clicked. For this, you have to enhance the WebDynpro UI.

Former Member
0 Kudos

Hello Jay.

I need your help.

I added a button in RFx: View -> CNR_VIEW (/SAPSRM/WDCC_FPM_OIF_RFQ_PR_PU); i see the customer button but don´t work.

Where i add the event and what method i would enhacement?

Thanks for your help.