Application Development 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: 

gui status-ALV

Former Member
0 Kudos
73

ON THE ALV SCREEN I NEED TO PUT SELECT ALL, DESELECT ALL FUNCTIONS. AM ABLE TO PUT THE ICONS USING guiSTATUS. BASICALLY AM SUPPOSE TO SELECT AND DESELCT ALL THE ROWS IN THE ALV REPORT UPON CLIKING THIS BUTTON. WAT CODE AM I SUPPOSE TO WRITE UNDER AT USER COMMAND?

2 REPLIES 2

Former Member
0 Kudos
41

Hi

If you insert an CHECKBOX field in your ALV, the system set those icons automatically:

DATA: LT_LAYOUT TYPE SLIS_LAYOUT_ALV.

DATA: BEGIN OF T_OUTTAB OCCURS 0,

.....................

MARK,

END OF T_OUTTAB.

LT_LAYOUT-BOX_FIELDNAME = 'MARK'.

Max

Former Member
0 Kudos
41

Hi,

Put the function code for those 2 icons and in the PAI of the screen write this code :

1. to select all rows

call this method of cl_gui_alv_grid

set_selected_rows

Pass all the indexes of the alv table to this method and it would select all the rows.

2 to deselect all rows

use the same method as above, but do not pass any values, pass empty table

it would deselect all the rows.

Hope this helps you. if u still have any doubts, revert back to me, i will reply with a detailed code.

Regards,

Prasant

*Reward if useful