We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] ABAP Report - Checkboxes

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from mic-bv on Feb 5 at 4:32 AM
Why do you program it so complicated at the when 'ZALL' - and even twice?

The do ... enddo should do the same like the loop...endloop. (while the loop is much more elegant).

However, we should know how you display the table - are you using ALV Grid or which technique for displaying? Guess the problem is rather in that area.

---------------Original Message---------------
From: Abbas_Ali
Sent: Wednesday, February 05, 2014 4:21 AM
Subject: ABAP Report - Checkboxes

Greetings,

I have a classic report where the user can select / deselect all records. Here is my code:
CASE sy-ucomm.
WHEN 'ZALL'.
DESCRIBE TABLE int_data LINES lv_counter.
DO lv_counter TIMES.
READ LINE sy-index FIELD VALUE int_data-chbox.
IF sy-subrc <> 0.
exit.
ELSE.
IF int_data-chbox = ''.
chbox = 'X'.
ENDIF.
MODIFY LINE sy-index FIELD VALUE int_data-chbox FROM chbox.
ENDIF.
ENDDO.

LOOP AT int_data.
int_data-chbox = 'X'.
MODIFY int_data.
ENDLOOP.

The problem is, when the user clicks on 'Select All' button, some buttons only get selected, and the others are not selected?

Another issue is that when the user selects some records manually, how can I capture the selected records and update the itab?

Thanks in Advance.
Adam

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2014 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
mic-bv  

achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language