09-23-2008 8:18 PM
hi,
I display a report with say the sales order numbers with a checkbox before that as follows:
WRITE:/ l_cbox AS CHECKBOX,
(11) l_vbeln
In the output , I get many sales orders and user can click many checkboxes and select the needed sales orders. After that he selects on my custom icon on the toolbar and an operation takes place. In that functionality i need to check which checkboxes the user selected and i want to store those sales order numbers in an internal table for further processing. How to write that code ?
thks
09-23-2008 8:27 PM
You need to use the "READ LINE.." Syntax in your user command.
Check help on the READ LINE and see this code:
DATA: date TYPE d,
flag(1) TYPE c,
wa(10) TYPE c.
START-OF-SELECTION.
date = sy-datum.
DO 10 TIMES.
date = date + sy-index.
WRITE: / flag AS CHECKBOX, (10) date.
ENDDO.
AT LINE-SELECTION.
DO.
READ LINE sy-index FIELD VALUE flag
date INTO wa.
IF sy-subrc <> 0.
EXIT.
ELSEIF flag = 'X'.
WRITE / wa.
ENDIF.
ENDDO.
Regards,
Naimesh Patel