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 Row Logic

Former Member
0 Likes
679

Hi,

When a row selected in ALV how should we recognize the Row Field?

Thanks

Hi,

When a row selected in ALV how should we recognize the Row Field?

Thanks

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
614

Hi,

Use method GET_SELECTED_ROWS assuming is it cl_gui_alv_grid. Check the importing parameter ET_ROW_NO to get indices of selected rows and subrows (i.e. subtotals).

For checking the field with its contents use GET_SELECTED_CELLS.

Regards

Marcin

Edited by: Marcin Pciak on Apr 30, 2009 12:20 AM

Read only

Former Member
0 Likes
614

Hi Sowmya..

for this in ALV interactive u need to pass perform name to I_CALLBACK_USER_COMMAND in ALV grid FM. for that perform u need to pass 'slis_selfield' structure. this structure contains below info.

types: begin of slis_selfield,

tabname type slis_tabname,

tabindex like sy-tabix,

sumindex like sy-tabix,

endsum(1) type c,

sel_tab_field type slis_sel_tab_field,

value type slis_entry,

before_action(1) type c,

after_action(1) type c,

refresh(1) type c,

ignore_multi(1) type c, " ignore selection by checkboxes (F2)

col_stable(1) type c,

row_stable(1) type c,

  • colwidth_optimize(1) type c,

exit(1) type c,

fieldname type slis_fieldname,

grouplevel type i,

collect_from type i,

collect_to type i,

end of slis_selfield.

here u'll get row index, field name, value in that row field.

hope this is useful.

Regards,

KP.

Read only

Former Member
0 Likes
614

Hi,

If it is Ordinary ALV program then try with the fields in SLIS_SELFIELD structure of SLIS type pool

If it is OOP ALV then work with GET_SELECTED_ROWS method which having exporting parameter row id.