Hi Raghava,
Try the below code.
1.in Fieldcatalog set the field as editable like for eg.
WA_FIELDCAT-COL_POS = L_LIN. WA_FIELDCAT-FIELDNAME = 'DATAB'. WA_FIELDCAT-DATATYPE = 'DATS'. WA_FIELDCAT-REPTEXT = 'Valid From'(T06). WA_FIELDCAT-F4AVAILABL = 'X'. WA_FIELDCAT-EDIT = 'X'. APPEND WA_FIELDCAT TO I_FIELDCAT.
2. Define F4 on the fields you want:
DATA: * Line of F4 table L_S_F4 TYPE LVC_S_F4, * Table for F4 relevant fields L_T_F4 TYPE LVC_T_F4. * F4 on datab L_S_F4-FIELDNAME = 'DATAB'. L_S_F4-REGISTER = 'X'. L_S_F4-GETBEFORE = SPACE. L_S_F4-CHNGEAFTER = SPACE. APPEND L_S_F4 TO L_T_F4. CLEAR L_S_F4.
..................................................
similarly you can add other fields on which you want to provide F4
..................................................
. CALL METHOD P_G_ALV_GRID->REGISTER_F4_FOR_FIELDS EXPORTING IT_F4 = L_T_F4[].
3.Implement the metohds for Event handler:
METHOD HANDLE_ONF4.
for more information:
http://www.sap-partner.hu/ABAP_HELP_INFO/An%20Easy%20Reference%20for%20ALV%20Grid%20Control.pdf
http://my-sap-tutorials.blogspot.in/2012/08/drop-down-f4-help-hot-spot-editable.html
Regards,
Gurunath