Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple line selection in basic list

Former Member
0 Kudos
483

Hi,

I have a report output with a Check Box being the first column.

How can we process multiple lines by selecting multiple check boxes, i.e if the user checks few check boxes and clicks on the user menu button something should be processed further.

Now can someone suggest how to update the internal table once the user checks more than one check boxes in the list output.

looking forward to ur valuable replies.

MS

Message was edited by: Mahesh Sahu

Message was edited by: Mahesh Sahu

6 REPLIES 6

Former Member
0 Kudos
68

Hi Mahesh,

Seems like you are a new user at SDN and I welcome you here.

Can you please mark this topic as a question? when you were making this post, there was a checkbox which gave the option. But you have unchecked it. Please edit your post to mark it as a question.

Regards,

Anand Mandalika.

0 Kudos
68

Hi,

You will have to read the content on the list using the READ LINE statement. Here's a short sample program that I have just written. See if you are able to understand the logic.

REPORT  zlist_test no standard page heading.

data: list_line(72),
      begin of itab occurs 0,
        box type c,
        num type i,
      end of itab.

start-of-selection.

do 10 times.
  move sy-index to itab-num.
  append itab.
enddo.

loop at itab.
  write : / itab-box as checkbox,
            itab-num.
endloop.

at user-command.

if sy-ucomm NE space.
  write 'The following lines were checked'.
  do.
    read line sy-index line value into list_line.
    if sy-subrc ne 0.
      exit.
    endif.
    if list_line(1) eq 'X'.
      read table itab index sy-index.
* Here you can also modify the internal table with the value of the checkbox.
      write : / itab-num.
    endif.
  enddo.
endif.

Regards,

Anand Mandalika.

0 Kudos
68

Oops! I forgot to tell you. when the list is displayed, then enter anything in the command field and hit enter. That will trigger the AT USER_COMMAND. I did not bother to create a gUI status , sicne htis is just a test program.

0 Kudos
68

Dear I029616,

Referring to ur code, could solve the problem of multiple line selection in a list.

Thx for the valuable effort and reply.

Mahesh

0 Kudos
68

Hi Mahesh,

Good to know that your problem is solved.

Can you please reward points to the answers that have helped you? And also close the thread by marking it as answered. You can do that by awarding 10 points to the answer that has solved your problem.

regards,

anand mandalika.

jayanthi_jayaraman
Active Contributor
0 Kudos
68

Hi,

Check this link.