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: 

Alv field with f4 help without using class

Former Member
0 Kudos

Hi,

Can any one give me a program of "Alv field with f4 help without using class".

Thanking you in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Gurprit,

While building the field catalog, you can provide Reference field name and Reference Table name. This would automatically provide F4 help for the fields.

REF_FIELDNAME

REF_TABNAME

<b>Reward points for helpful answers.</b>

Best Regards,

Ram.

3 REPLIES 3

Former Member
0 Kudos

hi

<b>Linking F4 Help to Fields</b>

For the last section, we will deal with linking F4 help to fields. It is easy. As usual, define, implement and register the event “onf4” at proper places in your code. For F4 help, you must register the fields whose F4 request will trigger the “onf4” event. For this you must prepare a table of type “LVC_T_F4” and register this table using the method “register_f4_for_fields”. While preparing table you must include a line for each field which will trigger F4 event. For each field in the structure;

&#1048766; Pass the fieldname to ‘FIELDNAME’

&#1048766; Set ‘REGISTER’ to make the field registered,

&#1048766; Set ‘GETBEFORE’ to provide field content transport before F4 in editable mode

&#1048766; Set ‘CHNGEAFTER’ to make the data changed after F4 in editable mode.

DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE .

.. ..

lt_f4-fieldname = 'PRICE'.

lt_f4-register = 'X' .

lt_f4-getbefore = 'X' .

APPEND lt_f4 .

CALL METHOD gr_alvgrid->register_f4_for_fields

EXPORTING

it_f4 = lt_f4[] .

Preparing table for the fields to be registered to trigger F4 event

METHOD handle_on_f4 .

PERFORM f4_help USING e_fieldname es_row_no .

er_event_data->m_event_handled = 'X' .

ENDMETHOD .

A sample “onf4” method implementation

Again, we set the attribute “er_event_data->m_event_handled” to prevent further processing of standard F4 help.

regards

Ravish

<b>

reward if useful</b>

Former Member
0 Kudos

Hi Gurprit,

While building the field catalog, you can provide Reference field name and Reference Table name. This would automatically provide F4 help for the fields.

REF_FIELDNAME

REF_TABNAME

<b>Reward points for helpful answers.</b>

Best Regards,

Ram.

Former Member
0 Kudos

HI,

create the fieldcat and give the ref_fieldname and ref_tabname.

rgds,

Kasinath Babu.

Message was edited by:

kasinath Babu