cancel
Showing results for 
Search instead for 
Did you mean: 

How to Use Read line in abap Report

Former Member
0 Kudos

Could you please any one help me how to use Read line in abap Interactive Reports..

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

do this way

READ LINE SY-INDEX FIELD VALUE T_USER-SELECTION.

Former Member
0 Kudos

Hi,

Use the statements READ LINE and READ CURRENT LINE to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.

All of the lists generated by a single program are stored internally in the system. You can therefore access any list in a program that was created for the same screen and that has not yet been deleted by returning to a lower list level. To read lines, use the statements READ LINE and READ CURRENT LINE.

To read a line from a list after an interactive list event, use the READ LINE statement:

READ LINE <lin> [INDEX <idx>]

[FIELD VALUE <f1> [INTO <g 1>] ... <f n> [INTO <g n>]]

[OF CURRENT PAGE|OF PAGE <p>].

The statement without any options stores the contents of line <lin> from the list on which the event was triggered (index SY-LILLI) in the SY-LISEL system field and fills all HIDE information stored for this line back into the corresponding fields. As far as SY-LISEL and the HIDE area are concerned, READ LINE has the same effect as an interactive line selection.

If the selected line <lin> exists, the system sets SY-SUBRC to 0, otherwise to 4.

The options have the following effects:

INDEX <idx>

FIELD VALUE <f 1 > [INTO <g 1 >] ... <f n> [INTO <g n>]

OF CURRENT PAGE

OF PAGE <p>

Look at the demo program <b>demo_list_read_line</b>

Regards

Sudheer

Former Member
0 Kudos

hi Satyendra,

Welcome to SDN!

please see the sample code below:


data wa type c length 20.

at line-selection.
        read line sy-index field value  <field name1>  <field name2>into wa.
        write:/ wa.

Hope this helps,

Sajan Joseph.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check this link for sample code.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba42335c111d1829f0000e829fbfe/content.htm

Regards,

Ferry Lianto