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: 

F4 help to ALV output Field

Former Member
0 Kudos

Hi All,

I am displaying an ALV output using class. In the output list, i have added one push button 'ADD'. If user clicks on this button, new line should be available to enter the data. This is working fine.

Now i want to give an F4 help for a column for which values is to be generated in the program. I have an internal table with values which is to be displayed when user clicks on that column.

This is very urgent.

Pls. suggest me.

best regards,

4 REPLIES 4

0 Kudos

HI,

Check the report BCALV_EDIT_08 from the package SLIS.

Regards,

Sesh

Former Member
0 Kudos

Hi,

pass these two values in field catalog.

lwa_fieldcat-reffieldname = 'FIELDNAME'.

lwa_fieldcat-reftabname = 'TABLENAME'.

IT will give u f4 help on that field.

Reagads,

Omkar.

Former Member
0 Kudos

Hi,

Linking F4 Help to Fields


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;
Pass the fieldname to ‘FIELDNAME’
Set ‘REGISTER’ to make the field registered,
Set ‘GETBEFORE’ to provide field content transport before F4 in editable mode
Set ‘CHNGEAFTER’ to make the data changed after F4 in editable mode.

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

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[] .

A sample “onf4” method implementation

METHOD handle_on_f1 .
PERFORM f4_help USING e_fieldname es_row_no .
er_event_data->m_event_handled = 'X' .

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

Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b> 
ENDMETHOD .

Former Member
0 Kudos

Hello,

Check these links:

If useful reward.

Vasanth