‎2008 Feb 02 4:00 PM
Hi,
i have created a checkbox in ALV grid using Function 'REUSE_ALV_GRID_DISPLAY'.
What the requirement is , when the user selects say 2 rows out of 10 rows and press save.....those 2 row's checkboxes must be disabled, while all other row's checkboxed must remain enabled.
please guide me how to do this. Any sample code for this can help me a lot.
*Points Will surely be given.
Thanks,
Varun
‎2008 Feb 02 6:00 PM
hi,
In ALV grid usinf functions and classes we can find out which rows are selected in the grid.
Then using those rows 'tabix' you can set or reset the check box of the rows.
feel free to ask if your question is not solved.
Thanks
‎2008 Feb 02 6:00 PM
hi,
In ALV grid usinf functions and classes we can find out which rows are selected in the grid.
Then using those rows 'tabix' you can set or reset the check box of the rows.
feel free to ask if your question is not solved.
Thanks
‎2008 Feb 03 2:52 AM
‎2008 Feb 03 9:11 AM
Hi Sonal,
Thanks for your reply. But please tell me how can we hide the checkbox in selected rows?
Regards,
varun Sanghi
‎2008 Feb 04 4:34 AM
in the layout we have option to display or not to disp;ay any field.
‎2008 Feb 03 4:56 AM
hi varun,
got to se80 .in package type slin within this u can get sampla programs for all type of alv.....
‎2008 Feb 03 10:59 AM
Hi
Check this link
Only relevant if layout parameter
LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set.
Complex type for modifying information displayed on the selection dialog box:
mode: 'R' = Only entries passed in internal table
IS_SEL_HIDE-T_ENTRIES are output on
the dialog box. Selection information
obtained by the list tool by reading the
selection screen again (only if the report
is called with selection screen) are
replaced by the entries passed.
'S' = The selection information obtained by the
list tool by reading the selection screen
of the calling report again, are modified
by the entries of table
IS_SEL_HIDE-T_ENTRIES.
t_entries: Table with selection information
t_entries-mode: 'A' = Display selection information of the current
table row on the information dialog box.
'D' = Do not display selection information of the
the Select option or of parameter SELNAME
on the dialog box.
t_entries-selname: (required only if t_entries-mode = 'D')
name of Select option or parameter
The following table fields are only required if t_entries-mode = 'A'. They contain the selection information to be added.
t_entries-field: DDIC field name of the field for which selection
information is to be displayed
t_entries-table: DDIC table name of t_entries-field.
t_entries-stext: Field description on the information dialog box.
If t_entries-field and t_entries-table were
filled, this text is taken from the DDIC.
t_entries-valuf: Selection condition from-value (external format)
t_entries-valut: Selection condition to-value (external format)
t_entries-sign0: (I)nclusive (E)xclusive
t_entries-optio: All values of the option field of the Select
option are allowed.
The remaining fields are used internally and are irrelevant to the caller.
Check these too
REGARDS,
GAURAV J.
‎2008 Feb 04 4:53 AM
Hi,
Step 1.
Add this feild in ur Internal table.
field_style TYPE lvc_t_styl, "FOR DISABLE
*step-2 * Call this Subroutine before Fieldcatalog........
FORM set_specific_field_attributes .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
clear : ls_stylerow.
clear : wa_final-field_style.
refresh WA_FINAL-FIELD_STYLE[].
* Populate style variable (FIELD_STYLE) with style properties
* The following code sets it to be disabled(display only)
* if child deal Ticket Number Approved or rejected.
LOOP AT it_final INTO wa_final.
IF wa_final-apprd = 'X' or wa_final-rejct = 'X'.
ls_stylerow-fieldname = 'APPRD' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_stylerow TO wa_final-field_style.
MODIFY it_final FROM wa_final. "my Internal table, Replace ur internal table.
ls_stylerow-fieldname = 'REJCT' . " ur field name
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_stylerow TO wa_final-field_style.
MODIFY it_final FROM wa_final.
endif.
* like this u have to add for all colunms in ur report which u
* want to disable.
* Note the stylerow appending should be in Alphabetic order
ENDLOOP.
ENDFORM. " set_specific_field_attributes
Thanx
bgan.
‎2010 Dec 10 7:24 AM