08-21-2007 1:48 PM
Hi,
Can any one give me a program of "Alv field with f4 help without using class".
Thanking you in advance.
08-21-2007 1:52 PM
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.
08-21-2007 1:51 PM
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;
􀂾 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.
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>
08-21-2007 1:52 PM
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.
08-21-2007 1:58 PM
HI,
create the fieldcat and give the ref_fieldname and ref_tabname.
rgds,
Kasinath Babu.
Message was edited by:
kasinath Babu