Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

F4 Help ALV Grid using

Bharath84
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

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.
4 REPLIES 4

Sandra_Rossi
Active Contributor

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.

former_member241258
Active Participant

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

0 Kudos

But this is bringing the Column Titles as well for the fields
what to do if i want a different text as column heading??

raymond_giuseppi
Active Contributor
0 Kudos

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.