2013 May 30 10:36 AM
Hi All,
I am using the class "cl_salv_table" on display an ALV grid. (Factory method)
How can I set the only one column of report to input/editing?
same as slis_layout_alv-edit parameter use in the REUSE_ALV_GRID_DISPLAY function.
Is the any method/class on factory method by which this requirement can be possible.
Please suggest.
Thanks,
Shrinivas
Moderator Message: Please search for available content before posting your question.
Message was edited by: Suhas Saha
2013 May 30 11:02 AM
2013 May 30 11:03 AM
Hi,
Please use ALV Grid to set column as editable and not SALV.
In the field catalog of the ALV Grid you have a field 'EDIT' to put to 'X' if you want your column to be editable.
Regards
Sam
2013 May 30 11:14 AM
2021 Dec 05 5:45 PM
2021 Dec 06 4:06 AM
Currently I'm using *alv for editable tables and *salv for view tables, that's not satisfactorily.
Furthermore the *alv API disagrees with the modern *salv OO concept.
Hope SAP will implement the edit issue in *salv !
2022 Mar 14 11:22 AM
This code worked for me.
I added code for Variant Layout.
*<<< added code
DATA gv_variant LIKE disvariant.
DATA gv_repname LIKE sy-repid.
INITIALIZATION.
gv_repname = sy-repid.
gv_variant-report = gv_repname.
*<<< added code
*...
CALL METHOD gr_alv->set_table_for_first_display
EXPORTING
is_variant = gv_variant " added code
i_save = 'A'
is_layout = gw_layout
it_toolbar_excluding = gt_exclude
CHANGING
it_outtab = gt_sflight
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
I added code for Search Help.
FORM f_fcat USING p_pos
* ...
*<<< added code
IF p_fname = 'CARRID'.
gw_fcat-edit = abap_true.
gw_fcat-ref_table = 'SCARR'.
gw_fcat-domname = 'CARRID'.
endif.
*>>> added code
APPEND gw_fcat TO gt_fcat.
CLEAR : gw_fcat.
ENDFORM.<br>