Login Form

Best viewed in IE 7.0

ADVERTISEMENTS
ADVERTISEMENT

Reading multiple selected lines in a list

Scenario: List with check boxes. You want to read all lines in the list where the check boxes are checked into an internal table.


* Define checkbox
data: markfield(1) type c value space.

* Write list

loop at itab.
write: / markfield as checkbox, itab1-myfield.
endloop.


When you are ready to read the list igain:


* Holds the number of the current line
lineno type i.


lineno = 0.

*Read the report line by line
do.
lineno = lineno + 1.

* Read markfield
read line lineno field value markfield.

* Check that you haven't reached the end of the report
if sy-subrc ne 0.
exit.
endif.

* If markfield = X then read the report line again and append it to another internal

* table
if markfield = 'X'.
* read the line igain to retrieve all fields of the line
read current line
field value itab1-myfield
into itab2-myfield.
append itab2.
endif.


enddo.


Example by Henrik Frank
var fe = FindFrame("toc", top); if ((fe != null) && (chmtop.c2wtopf.jstree != null)) { if (chmtop.c2wtopf.FITEMS[chmtop.c2wtopf.pagenum] != chmtop.c2wtopf.pageid) chmtop.c2wtopf.jstree.OpenTreeNode("" + chmtop.c2wtopf.pageid); }
ADVERTISEMENT
Free software downloads