08-24-2009 11:38 AM
I need to have a field in edit mode when i click on APPEND button or INSERT ROW button from ALV toolbar.
By default i have set this field as non editable using field catalog. Since its kept as non editable, when i click on append button, this field continues to be non editable.
Can i change the mode of this field only when the standard ALV buttons are clicked?
08-24-2009 11:48 AM
Hi,
you modify the fieldcat internal table with edit option and call the following function module.
DATA : v_ref TYPE REF TO cl_gui_alv_grid
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = v_ref.
CALL METHOD v_ref->check_changed_data.
The standard ALV output will get changed.
If you want to have any change of pf-status of standard ALV
goto SE41 and give program name as SAPLLLBL and give the pf-status as STANDARD_FULLSCREEN and press status button to
copy to your own customized pf-status ( for example GUI1000) and the you apply the pf-status for your ALV output.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'STATUS'
is_layout = l_grid_set
it_fieldcat = t_fcat1
TABLES
t_outtab = t_invoice_rpt.
FORM status USING t_rt_extab TYPE slis_t_extab.
SET PF-STATUS 'GUI1000'.
ENDFORM.
Thanks and regards,
Venkat
Edited by: VENKAT RAMAN on Aug 24, 2009 4:18 PM
08-24-2009 11:50 AM
Hi,
In your field catalog give edit attribute of the columns as x.
like if wa_f is the work area and itab_f is the internal table for your field catalog then.
wa_f-edit = 'X'.
append itab_f.
Also u can check standard programs.
bcalv_edit_01,02,03.
Or
Please refer BCALV_EDIT_01,
BCALV_EDIT_02 FOR Edit ALV
Regards,
Shamma
08-24-2009 12:10 PM
hii naresh,
you can search on the forum.this question has already been adressed before.
regards,
Shweta