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

HOW CAN I MARK A CHECKBUTTON USING ABAP CODE?

Former Member
0 Likes
837

HOW CAN ALL THE CHECKBOXES IN MY ALV BE MARKED WHEN I CLICK ON A BUTTON?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
659

hi rico.... u can set the value of your all check boxes to 'X', when u push the button...

reward points if useful..

4 REPLIES 4
Read only

Former Member
0 Likes
660

hi rico.... u can set the value of your all check boxes to 'X', when u push the button...

reward points if useful..

Read only

abdulazeez12
Active Contributor
0 Likes
659

I think you are referring to clicking on pushbutton..and when u click, all the checkboxes need to be checked..

try this..

create a routine User_command and write your code there..

if <Function code of PB>.

loop the table.

all checkboxes = 'X'.

endloop.

then display it again using grid_display..

endif.

pass the above routine to I_CALLBACK_USER_COMMAND in main grid_display Funcion module..

Hoep this helps..

Read only

Former Member
0 Likes
659

Hi Rico,

Select / De-select all is the option your are looking for...

Loop at your internal table and move 'X' to the checkbox field & modify your internal table endloop.

If the hint is useful… Say thanks by reward….

Regards,

Prabhu Rajesh

Read only

Former Member
0 Likes
659

HI,

check this code.

TABLES:SSCRFIELDS.

PARAMETERS:c1 AS checkBOX,c2 AS checkBOX,

c3 AS checkBOX,c4 AS checkBOX.

SELECTION-SCREEN PUSHBUTTON /10(5) BUTTON1 USER-COMMAND ABCD1.

SELECTION-SCREEN PUSHBUTTON 20(7) BUTTON2 USER-COMMAND ABCD2.

INITIALIZATION.

BUTTON1 = 'Check'.

BUTTON2 = 'Uncheck'.

AT SELECTION-SCREEN.

case SSCRFIELDS-UCOMM.

when 'ABCD1'.

c1 = 'X'.

c2 = 'X'.

c3 = 'X'.

c4 = 'X'.

when 'ABCD2'.

c1 = ' '.

c2 = ' '.

c3 = ' '.

c4 = ' '.

ENDcase.

rgds,

bharat.