cancel
Showing results for 
Search instead for 
Did you mean: 

Custom FPM Event for Button row element

former_member583823
Participant
0 Kudos

Hi Expects,

I have created a new button row element in standard screen, where I want to add custom FPM event and handle the same in get_data( ). But by default SAP is providing few event ID's in drop down.

Please help me how to add custom FPM event for  button row element.

Regards,

Reny Richard

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Remy,

You will have to create an enhancement in Get Definition method of your feeder class.

You can get custom event ID's by appending the event ID's in signature parameter "ET_ACTION_DEFINITION" of get definition method.

Once you have appended the events in this parameter they will appear in the FPM Event ID drop down in Component Configuration for the screen.

former_member583823
Participant
0 Kudos

Hi Arpitha,

I have handled the custom event in process event method. At the end of enhancement, i need to change the button to read only.

Please help me how to do the same..

Thanks in advance.

Regards,

Reny Richard

Former Member
0 Kudos

Hi Remy,

Process Event method does have any signature parameters in it which allow us to disable/enable buttons.

We can handle this in Get data method.Get Data is always triggered after Process Event. So you can write that in Get Data instead.

****this is a sample code to do the same. You can do a read as well if single button needs tobe handled***

LOOP AT CT_ACTION_USAGE INTO lw_action WHERE id = (your event id for the button).
    lw_action-enabled = abap_false.
    MODIFY CT_ACTION_USAGE FROM lw_action TRANSPORTING enabled.
    EV_ACTION_USAGE_CHANGED = 'X'.
ENDLOOP.

***use field symbol to avoid modify if you want***

former_member583823
Participant
0 Kudos

Hi Arpitha,

I am using the following code to make the field read only in get_data. But it is not happening. Can you pls help me on the same.

LOOP AT CT_FIELD_USAGE INTO lw_field WHERE NAME = '<name of the field>

   lw_field-read_only = ABAP_TRUE.

   MODIFY ct_field_usage FROM lw_field TRANSPORTING read_only.

   ev_field_usage_changed = 'X'.

ENDLOOP.

Answers (1)

Answers (1)

Former Member
0 Kudos

The code is correct.

Is there any code after this which is resetting the change. While debugging check the ct_field_usage table value till the end of Get Data method.

You must be doing this based on some condition. Check the condition.