Application Development and Automation 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: 
Read only

F4 Problem in ALV Grid

Former Member
0 Likes
756

Hi,

i have an issue that f4 selection value is always going to the first row.

i have developed ALV Grid using objects and one column has F4 Help which i created using search help and attched to data element.when i press f4 then i am getting pop up screen and when i pick up value from the list the selected value is gets transfering to the first row of my grid even i select f4 from 10 th row.

is there anything do i need to consider in my code..?

Thanks,

Hi,

i have an issue that f4 selection value is always going to the first row.

i have developed ALV Grid using objects and one column has F4 Help which i created using search help and attched to data element.when i press f4 then i am getting pop up screen and when i pick up value from the list the selected value is gets transfering to the first row of my grid even i select f4 from 10 th row.

is there anything do i need to consider in my code..?

Thanks,

5 REPLIES 5
Read only

Former Member
0 Likes
665

Hi,

Try using the below code ..

FORM display_alv_report.

<b>gd_layout-edit = 'X'.</b>

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = 'REPORT NAME'

i_callback_pf_status_set = 'SET_PF_STATUS'

  • i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM

i_callback_user_command = 'USER_COMMAND'

  • i_grid_title = outtext

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

  • it_special_groups = gd_tabgroup

it_events = gt_events

is_print = gd_prntparams

i_save = 'X'

is_variant = variant

TABLES

t_outtab = itab_temp

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " DISPLAY_ALV_REPORT

Thanks,

Vind.

Read only

0 Likes
665

Hi,

Thanks for your response.

but i am not using function modules and also i have f4 on editable column.

when i press f4, entries were populating fine. if select value and press ok then the value is displaying in first cell of this column.

is there any events do i need to handle for this..?

Thanks,

Read only

0 Likes
665

i solved my issue.........

Read only

0 Likes
665

Hi,

Can you tell me how you solved it? I'm facing the same problem.

Thanks and regards,

Stefan

Read only

former_member194669
Active Contributor
0 Likes
665

Hi,

You need to use the following method



CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid.

Please check for get_focus method also before calling set_focus.

aRs