Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SET HANDLER ONF4 Event does not work.

Former Member
0 Kudos

Hi,

I am trying to Implemennt the ONF4 Event for My ALV where I want to Display the possible help for the given fields and also select one of the fields which would be repalced by the Orginal Value once seletced by the user. This ALV field is an Editable Field.

When I try to set the hander

SET HANDELER gr_events->on_f4 for gr_alv_grid the method is not getting triggered.

Can u please tell me where is the Fault and also how should I dispplay the possible Values list and also select one of the Vaues from the Existing values.

I want to use F4IF_INTERNAL_TABLE_VALUE_REQUEST'.

Please advice.

Regards,

Deepak.

1 ACCEPTED SOLUTION

MarcinPciak
Active Contributor
0 Kudos

You also need to register the fields which you want F4 event to become active for.


DATA: it_f4 TYPE lvc_t_f4,
        wa_f4 TYPE lvc_s_f4.

  wa_f4-fieldname = 'CONNID'.
  wa_f4-register = 'X'.
*     wa_f4-GETBEFORE = 'X'.   "if you want to trigger before F4
*      wa_f4-CHNGEAFTER = 'X'. "or just after it
  APPEND wa_f4 TO it_f4.

  CALL METHOD g_alv_grid_ref->register_f4_for_fields
    EXPORTING
      it_f4 = it_f4.

Regards

Marcin

1 REPLY 1

MarcinPciak
Active Contributor
0 Kudos

You also need to register the fields which you want F4 event to become active for.


DATA: it_f4 TYPE lvc_t_f4,
        wa_f4 TYPE lvc_s_f4.

  wa_f4-fieldname = 'CONNID'.
  wa_f4-register = 'X'.
*     wa_f4-GETBEFORE = 'X'.   "if you want to trigger before F4
*      wa_f4-CHNGEAFTER = 'X'. "or just after it
  APPEND wa_f4 TO it_f4.

  CALL METHOD g_alv_grid_ref->register_f4_for_fields
    EXPORTING
      it_f4 = it_f4.

Regards

Marcin