2007 Apr 11 3:02 PM
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,
2007 Apr 11 3:09 PM
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.
2007 Apr 11 3:19 PM
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,
2007 Apr 11 9:44 PM
2011 Mar 31 8:45 AM
Hi,
Can you tell me how you solved it? I'm facing the same problem.
Thanks and regards,
Stefan
2007 Apr 11 3:19 PM
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