on 12-09-2004 10:03 AM
Hi guys,
I'm in a middle of a task, where some table is asked to be written on the screen (simple WRITE statement) and one of the fields is written in a way:
...
LOOP AT it.
WRITE: it-f1 AS CHECKBOX.
ENDLOOP.
...
The screen in simple, PF-STATUS is not complex also.
Everything is shown as expected. But I've been asked to manipulate content of the it-f1 depending on the user-action on the screen - i.e. if the user checked/unchecked f1 at line 23, this should be corrected into an it[23] also. In my PF-STATUS I have a 'SAVE' button, and after pressing it I should have my internal table filled correctly depending on the user interaction. The table is expected to be long (approx. 200-300 records or so).
How to achieve this? I played with AT LINE-SELECTION and much more which I found in the docu, but with no success until now.
Any help would be highly appreciated.
If any specifics are needed, I'm ready to supply them here.
Many thanks in advence.
Ivaylo
Hello ,
The following code sample should do the trick.
==========================================================
REPORT ZTEST no standard page heading.
data : begin of itab occurs 0,
check type c,
value type i,
end of itab.
data: w_line_no type i,
w_itab(72) type c.
start-of-selection.
do 10 times.
itab-value = sy-index.
append itab.
enddo.
loop at itab.
write : / itab-check as checkbox,
itab-value.
endloop.
at user-command.
if sy-ucomm eq 'SAVE'.
clear itab.
loop at itab.
w_line_no = sy-tabix.
read line w_line_no line value into w_itab.
itab-check = w_itab(1) .
modify itab transporting check.
endloop.
endif.
==========================================================
Get back if you have any more doubts on this.
Regards,
Anand Mandalika.
P.S. : Don't forget to award the points if you like the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the following peace of code to find whether check box is selected or not for that if so...
Code:
do n times. (Here N is no of records on list)
read line sy-index field value wc_check.
if wc_check eq 'X'.
write select query to fetch records
endif.
enddo.
If i am not understand issue please reply again!!!
Best regards
Suresh Babu Karanam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.