01-22-2018 9:48 AM
Hi All,
I am using REUSE_ALV_GRID_DISPLAY for Delivery block(VBAK-LIFSK) field is an Editable field. Now I am trying to get the F4 help on the ALV Grid for that Column cell. I checked the below link but the link is for lvc_t_fcat.
https://archive.sap.com/discussions/thread/3215580
I am using slis_t_fieldcat_alv. I did not find the f4availabl slis_t_fieldcat_alv. How to achieve the F4 help using slis_t_fieldcat_alv with REUSE_ALV_GRID_DISPLAY. Please suggest.
Thanks,
HT
01-22-2018 5:52 PM
VBAK-LIFSK is a field with a foreign key, so if you fill correctly your field catalog, you should get F4 as demonstrated here:
Done with this quick and dirty code:
REPORT.
DATA lt_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'VBAK'
CHANGING
ct_fieldcat = lt_fieldcat
EXCEPTIONS
OTHERS = 3.
DATA lt_vbak TYPE TABLE OF vbak.
SELECT * FROM vbak INTO TABLE lt_vbak UP TO 10 ROWS.
DATA ls_layout TYPE slis_layout_alv.
ls_layout-edit = abap_true.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
TABLES
t_outtab = lt_vbak
EXCEPTIONS
OTHERS = 2.
01-22-2018 5:52 PM
VBAK-LIFSK is a field with a foreign key, so if you fill correctly your field catalog, you should get F4 as demonstrated here:
Done with this quick and dirty code:
REPORT.
DATA lt_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'VBAK'
CHANGING
ct_fieldcat = lt_fieldcat
EXCEPTIONS
OTHERS = 3.
DATA lt_vbak TYPE TABLE OF vbak.
SELECT * FROM vbak INTO TABLE lt_vbak UP TO 10 ROWS.
DATA ls_layout TYPE slis_layout_alv.
ls_layout-edit = abap_true.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
TABLES
t_outtab = lt_vbak
EXCEPTIONS
OTHERS = 2.
02-06-2018 9:29 AM
hi
use ref_table , ref_field of fieldcatalog in alv.
ls_fieldcatalog-ref_table = 'vbak'.
ls_fieldcatalog-ref_field = 'vbeln'.
pass like above , you can get F4 help in alv output
08-01-2023 7:48 AM
But this is bringing the Column Titles as well for the fields
what to do if i want a different text as column heading??
02-06-2018 10:15 AM
Just search and read online documentation on how-to Generate the Field Catalog Manually. (Here use of ref_table, ref_field is the easiest solution, as already written in the discussion you linked.)
Hint: For OO based solution with more options, you shoud first get reference to the object behind the full screen ALV FM with FM GET_GLOBALS_FROM_SLVC_FULLSCR.