Hi all,
My requirement is to make Check Box Enabling and Disabling in a ALV OO Report Output.
Before getting the output, i need to do this.
Where ever I'm getting the Accounting Document Number, that check box needs to be in Enable Mode and the rest of them in Disabling Mode.
Kindly find the below attachment screen shot and code for reference.
1. ALV OO Report Output:
2. Code with Declarations of FIELDCAT and Methods:
2.(a).
Data:
lt_fieldcat type lvc_t_fcat,
ls_fieldcat type lvc_s_fcat,
o_cont type ref to cl_gui_custom_container,
o_grid type ref to cl_gui_alv_grid.
2.(b).
*Check Box for Selecting Single Accounting Document
ls_fieldcat-col_pos = '1'.
ls_fieldcat-row_pos = '1'.
ls_fieldcat-fieldname = 'CHECK_BOX'.
ls_fieldcat-outputlen = 5.
ls_fieldcat-coltext = 'Check'.
ls_fieldcat-checkbox = 'X'.
ls_fieldcat-edit = 'X'.
append ls_fieldcat to lt_fieldcat.
clear ls_fieldcat.
2.(c).
call method o_grid->set_table_for_first_display
exporting
i_default = 'X'
is_layout = layout
it_toolbar_excluding = gt_exclude
changing
it_outtab = lt_pay2
it_fieldcatalog = lt_fieldcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
Kindly let me know how to enable and disable the check box field before getting the output.
Where and what to fix.
With Regards,
Sudhir.