Skip to Content
avatar image
Former Member

Alv field with f4 help without using class

Hi,

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

Thanking you in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 21, 2007 at 12: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 12: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;

    &#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>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 12:58 PM

    HI,

    create the fieldcat and give the ref_fieldname and ref_tabname.

    rgds,

    Kasinath Babu.

    Message was edited by:

    kasinath Babu

    Add comment
    10|10000 characters needed characters exceeded