05-10-2006 3:57 PM
Hello Every1,
Can any1 give me the code for select and deselect all the check-boxes in the output list.
It's not an ALV report.
Thanks,
Siva.
05-10-2006 4:02 PM
Not sure about the structure of your program, but here is a little example .
report zrich_0002 no standard page heading.
data: check(1) type c.
start-of-selection.
* Write the initial list
do 20 times.
write:/ check as checkbox, sy-index.
enddo.
at user-command.
* Set the checkbox on or off
case sy-ucomm.
when 'SELA'.
check = 'X'.
when 'DELA'.
check = space.
endcase.
* Rewrite the list
sy-lsind = sy-lsind - 1.
do 20 times.
write:/ check as checkbox, sy-index.
enddo.
Regards,
Rich Heilman
05-10-2006 4:02 PM
Not sure about the structure of your program, but here is a little example .
report zrich_0002 no standard page heading.
data: check(1) type c.
start-of-selection.
* Write the initial list
do 20 times.
write:/ check as checkbox, sy-index.
enddo.
at user-command.
* Set the checkbox on or off
case sy-ucomm.
when 'SELA'.
check = 'X'.
when 'DELA'.
check = space.
endcase.
* Rewrite the list
sy-lsind = sy-lsind - 1.
do 20 times.
write:/ check as checkbox, sy-index.
enddo.
Regards,
Rich Heilman
05-10-2006 4:04 PM
Hi,
REPORT ZTEST_CHECK no STANDARD page heading
.
end-of-selection.
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
a(1),
end of itab.
select vbeln
posnr from vbap
up to 20 rows
into table itab .
loop at itab.
write:/ itab-a as checkbox,
itab-vbeln,
itab-posnr.
endloop.
Regards
vijay
05-10-2006 4:06 PM
REPORT ZTEST_CHECK .
end-of-selection.
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
a(1),
end of itab.
select vbeln
posnr from vbap
up to 20 rows
into table itab .
loop at itab.
write:/ itab-a as checkbox,
itab-vbeln,
itab-posnr.
endloop.
Regards
vijay
05-10-2006 4:12 PM
Hi siva,
Please check the below code.
***********************************************************************
* Declaration Of Internal tables *
***********************************************************************
DATA : BEGIN OF I_YHPTSRCE OCCURS 0.
INCLUDE STRUCTURE YHPTSRCE.
DATA: SEL(1) TYPE C,
END OF I_YHPTSRCE.
************************************************************************
* User Command
************************************************************************
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SALL'.
IF NOT P_CATT IS INITIAL.
I_YHPTCNAMES-SEL = 'X'.
MODIFY I_YHPTCNAMES TRANSPORTING SEL WHERE SEL = ' '.
ELSEIF NOT P_TCASE IS INITIAL.
I_YHPTCASE-SEL = 'X'.
MODIFY I_YHPTCASE TRANSPORTING SEL WHERE SEL = ' '.
ELSE.
I_YHPTSRCE-SEL = 'X'.
MODIFY I_YHPTSRCE TRANSPORTING SEL WHERE SEL = ' '.
ENDIF.
SY-LSIND = 0.
PERFORM DISPLAY_DATA.
WHEN 'DALL'.
IF NOT P_CATT IS INITIAL.
CLEAR I_YHPTCNAMES-SEL.
MODIFY I_YHPTCNAMES TRANSPORTING SEL WHERE SEL = 'X'.
ELSEIF NOT P_TCASE IS INITIAL.
CLEAR I_YHPTCASE-SEL.
MODIFY I_YHPTCASE TRANSPORTING SEL WHERE SEL = 'X'.
ELSE.
CLEAR I_YHPTSRCE-SEL.
MODIFY I_YHPTSRCE TRANSPORTING SEL WHERE SEL = 'X'.
ENDIF.
SY-LSIND = 0.
PERFORM DISPLAY_DATA.
Thanks&Regards,
Siri.