07-24-2007 7:11 AM
<b><i>Hi ABAPers,</i></b>
<i><b>I want to incorporate F4 help with the editable field of my ALV report.</b></i>
The editable field is type of IHPA-PARNR.
At present user is able to enter value at this field. but the requirement is to give F4 help there.
I am not using the OOPs alv.
<i><b>Please suggest me
Thanks in advance
Regards
Debjani</b></i>
07-24-2007 8:29 AM
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 = 'Your field name'.
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_f4 .
PERFORM f4_help USING e_fieldname es_row_no .
er_event_data->m_event_handled = 'X' .
ENDMETHOD .
The attribute er_event_data->m_event_handled is to prevent further processing of standard F4 help.
07-24-2007 8:29 AM
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 = 'Your field name'.
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_f4 .
PERFORM f4_help USING e_fieldname es_row_no .
er_event_data->m_event_handled = 'X' .
ENDMETHOD .
The attribute er_event_data->m_event_handled is to prevent further processing of standard F4 help.
07-24-2007 8:53 AM
Hi
Try like this
X_FIELDCAT-DATATYPE = 'DATS'.
X_FIELDCAT-INTTYPE = 'D'.
X_FIELDCAT-REF_TABLE = 'LIKP'.
X_FIELDCAT-REF_FIELD = 'LFDAT'. "of type dats.
can you check this Program..
BALVSD02
Reward alll helpfull answers
Regards
Pavan
07-24-2007 10:57 AM
Hi Marcin,
Thanks a lot for your help.
But my problem has not been solved yet.
Can you please cleary explain me how do i code the following part of your code in my classical ALV.
b]CALL METHOD gr_alvgrid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[] .
A sample onf4 method implementation
METHOD handle_on_f4 .
PERFORM f4_help USING e_fieldname es_row_no .
er_event_data->m_event_handled = 'X' .
ENDMETHOD .
The attribute er_event_data->m_event_handled is to prevent further processing of standard F4 help.</b>
<i><b>thanks and regards
Debjani</b></i>
08-03-2007 8:12 AM
hi,
My problem has been solved by Praveen 's solution.
Thanks all for replyoing
Debjani
07-24-2007 8:43 AM
Hi,
check these standard reports
BCALV_EDIT_08 Integrate Non-Standard F4 Help
BCALV_F4 Possible entries
BCALV_GRID_EDIT_DELTA Example Report for F4 Help of the ALV Grid
BCALV_GRID_F4_HELP_APPLICATION
BCALV_GRID_F4_HELPM01
BCALV_TEST_GRID_EDIT F4 Help
BCALV_TEST_GRID_F4_HELP Example Report for F4 Help of the ALV
BCALV_TEST_GRID_EVENTS
http://help.sap.com/saphelp_erp2005/helpdata/en/f2/6cee408a63732ae10000000a155106/frameset.htm
Reward if helpful.
05-23-2016 11:56 AM
HI,
I added on custom field in SRM (RFX Leve) and assigned DDIC field for search help, my custom field getting displayed with F4 help in editable mode but my req is i want to change that F4 help into read only mode so that user can select from F4 help only. Please help me how to solve this.