2019 Nov 18 10:34 AM
Hello can anyone help me,I want to add an F4 search help on an alv column ,in this case status.
I have seen some examples and I changed from REUSE_ALV_GRID_DISPLAY to REUSE_ALV_GRID_DISPLAY_LVC
gs_fieldcat_lvc-fieldname = 'STATUS'.
gs_fieldcat_lvc-tabname = 'LT_ZMM'.
gs_fieldcat_lvc-domname = 'ZMM_STATUS'.
gs_fieldcat_lvc-f4availabl = 'X'.
gs_fieldcat_lvc-ref_table = 'ZMM_STAT'.
append gs_fieldcat_lvc to gt_fieldcat_lvc.
call function 'REUSE_ALV_GRID_DISPLAY_LVC'
exporting
i_callback_program = sy-repid
i_structure_name = 'ZMM_REQ'
it_excluding = gs_fieldcat
it_fieldcat_lvc = gt_fieldcat_lvc
tables
t_outtab = lt_zmm
exceptions
program_error = 1
others = 2.
MESSAGE: NO INPUT HELP available
2019 Nov 18 12:36 PM
When you build your own field catalog in REUSE_ALV_GRID_DISPLAY_LVC, to indicate your own F4 help you have to fill F4_AVAILABL = 'X' and REF_TABLE is to be the data element (yes I know it seems incoherent) for which you assigned a search help (SE11).
If you want to execute a dedicated ABAP code when F4 is pressed, you must switch to the class CL_GUI_ALV_GRID.
By the way, you define at the same time as the field catalog, you pass I_STRUCTURE_NAME = 'ZMM_REQ' (this is a shortcut to default the field catalog from a DDIC structure or table). You have to choose between the two, either I_STRUCTURE_NAME or IT_FIELDCAT_LVC.
By the way, you should not fill gs_fieldcat_lvc-tabname at all. You fill it only when it's to display hierarchical-sequential ALV (with two tables).
2019 Nov 18 10:48 AM
2019 Nov 18 10:56 AM
2019 Nov 18 12:04 PM
*Hi Jonathan,
*Try This!!
gs_fieldcat_lvc-REF_FIELD = 'pass the field of ZMM_STAT'.
2019 Nov 18 12:16 PM
I passed it ,now the message(MESSAGE:NOINPUTHELP available) does not show.I mean nothing shows.does it matter that ref_field and field are the same?in this case re_field would be the same as field
2019 Nov 18 1:23 PM
The table column mentioned by REF_TABLE + REF_FIELD is to have a search help assigned to the column in the ABAP Dictionary.
(or REF_TABLE alone is to be a data element, but still there must be a search help assigned)
2019 Nov 18 12:07 PM
Hi Jonathan,
can you check this link - https://answers.sap.com/questions/6949738/f4-help-on-alv.html
2019 Nov 18 12:36 PM
When you build your own field catalog in REUSE_ALV_GRID_DISPLAY_LVC, to indicate your own F4 help you have to fill F4_AVAILABL = 'X' and REF_TABLE is to be the data element (yes I know it seems incoherent) for which you assigned a search help (SE11).
If you want to execute a dedicated ABAP code when F4 is pressed, you must switch to the class CL_GUI_ALV_GRID.
By the way, you define at the same time as the field catalog, you pass I_STRUCTURE_NAME = 'ZMM_REQ' (this is a shortcut to default the field catalog from a DDIC structure or table). You have to choose between the two, either I_STRUCTURE_NAME or IT_FIELDCAT_LVC.
By the way, you should not fill gs_fieldcat_lvc-tabname at all. You fill it only when it's to display hierarchical-sequential ALV (with two tables).
2019 Nov 18 12:54 PM
is there a way to pass the structure and add the f4 help using this function module?
2019 Nov 18 1:16 PM
2019 Nov 18 2:12 PM
sandra.rossi somehow when I create a elementary search help it does not show,is this smth on my side?can you please send me a link on how this is done.even after creating it and assiging it to the column it still does not show,while standart collective search helps show perfectly
2019 Nov 18 3:22 PM
See that the DDIC search helps are automatically proposed - I can't say what you did differently:
SELECT * FROM spfli INTO TABLE @DATA(spfli_s).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SPFLI'
TABLES
t_outtab = spfli_s
EXCEPTIONS
OTHERS = 2.
Sorry, I don't have a blog post how to create a search help from scratch. But it probably exists if you search it.
2019 Nov 18 7:40 PM
Please show all information (I don't see the data element).
2019 Nov 19 4:51 AM
the data Element is the one covered with partially black,its the same name.
2019 Nov 19 8:14 AM
2019 Nov 19 8:56 AM