Application Development and Automation 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: 
Read only

Reading list report

Former Member
0 Likes
476

Hi All,

i have to read line from output list for further processing. each reacod has one check box at start of the record all the records which are checked in the list report have to be processed further.

can anyone help how i read all the data from the list report for durther processing.

I tried wirh READ LINE SY-INDEX VALUE INTO ITAB-CHECK.

but problem here is its taking only the check box not taking other fields of that particular record.

Please help if anyone has idea.

Lokesh.

Hi All,

i have to read line from output list for further processing. each reacod has one check box at start of the record all the records which are checked in the list report have to be processed further.

can anyone help how i read all the data from the list report for durther processing.

I tried wirh READ LINE SY-INDEX VALUE INTO ITAB-CHECK.

but problem here is its taking only the check box not taking other fields of that particular record.

Please help if anyone has idea.

Lokesh.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
423

Hi,

Check this code


report demo_list_read_line no standard page heading.

tables: sflight.

data: box(1) type c, lines type i, free type i.

start-of-selection.

  set pf-status 'CHECK'.

get sflight.

  write: box as checkbox, sflight-fldate.
  hide: sflight-fldate, sflight-carrid, sflight-connid,
        sflight-seatsmax, sflight-seatsocc.

end-of-selection.

  lines = sy-linno - 1.

top-of-page.

  write: 'List of flight dates'.
  uline.

top-of-page during line-selection.

  write:  'Date:', sflight-fldate.
  uline.

at user-command.

  case sy-ucomm.
    when 'READ'.
      box = space.
      set pf-status 'CHECK' excluding 'READ'.
      do lines times.
        read line sy-index field value box.
        if box = 'X'.
          free = sflight-seatsmax - sflight-seatsocc.
          if free > 0.
            new-page.
            write: 'Company:', sflight-carrid,
                   'Connection: ',sflight-connid,
                 / 'Number of free seats:', free.
          endif.
        endif.
      enddo.
  endcase.

aRs

Read only

Former Member
0 Likes
423

Hi Lokesh ,

Use the addition LINE VALUE INTO wa for the READ statement.

So the statement would look line this

READ LINE SY-INDEX LINE VALUE INTO ITAB.

A sample code is given below

-


Data : begin of it_1 occurs 0 ,

matnr type matnr ,

werks type werks_d,

End of it_1.

do 10 times.

it_1-matnr ='arun'.

it_1-werks = 'test'.

write it_1.

enddo.

clear it_1.

read line 3 line value into it_1.

-


Hope this helps.

Regards

Arun

  • Assign points if helpful