Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Grid Problem

Former Member
0 Likes
1,000

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

1 ACCEPTED SOLUTION
Read only

Sonal_J
Participant
0 Likes
953

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

8 REPLIES 8
Read only

Sonal_J
Participant
0 Likes
954

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

Read only

Former Member
0 Likes
953

Hi Sonal,

Thanks for your reply. But please tell me how can we hide the checkbox in selected rows?

Regards,

varun Sanghi

Read only

0 Likes
953

in the layout we have option to display or not to disp;ay any field.

Read only

Former Member
0 Likes
953

hi varun,

got to se80 .in package type slin within this u can get sampla programs for all type of alv.....

Read only

Former Member
0 Likes
953

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.

Read only

Former Member
0 Likes
953

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.

Read only

Former Member
0 Likes
953

k