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

Read & Move

Former Member
0 Likes
955

Hi All,

1. please explain the functionality of <b>Read</b>?

2. what is the difference between Read and Move?

Thanks

Satish

6 REPLIES 6
Read only

Former Member
0 Likes
835

Hi

READ is used to read the contents in an internal Table

READ table ITAB index 2

MOVE is used to move the data from one field to another field or within a internal table

Move itab-f1 to ITAB1-f2.

move date1 to date2.

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
835

These are syntax u can use FOR READ

Reading an Internal Tables
     - READ TABLE itab FROM wa [additions].
     - READ TABLE itab WITH TABLE KEY k1 = v1 ...kn = vn
                                                  [additions].
     - READ TABLE itab WITH KEY k1 = v1 ...kn = vn
                                  [BINARY SEARCH] [additions].
     - READ TABLE itab INDEX i [additions].
     - Obsolete Variants

     Reading a Line of a List
     - READ LINE line.
     - READ LINE line OF CURRENT PAGE.
     - READ LINE line OF PAGE pag.
     - READ CURRENT LINE.

     Reading a Program
     - READ REPORT prog INTO itab.

     Reading Text Elements
     - READ TEXTPOOL prog ...INTO itab ...LANGUAGE lg.

     Reading  File
     - READ DATASET dsn INTO f.

     Reading a Database Table
     - READ TABLE dbtab.

MOVE statement just moves one variable value to other variable

Read only

alex_m
Active Contributor
0 Likes
835

READ is used to read the records in the internal Table.

MOVE is used to move the value from one field/Staructur/Int table to another.

Read only

Former Member
0 Likes
835

Hi

Read command will read the contents of a table. You can read an internal table by specifying key fields. Or if you want to read a particular row in an internal table you can mention that row index.

Ex. of Read statement.

loop at itab.

Read table itab1 with key lifnr = itab-lifnr.

-


-


endloop.

Read table itab index 1. -Reading the first row of the internal table.

Move statement is used to move the contents of a field to another field.

Ex.

Data: m1 type i,

m2 type i.

m1 = 90.

Move m1 to m2.

Now the contents of m1 i.e are copied to m2.

Regards

Haritha.

Read only

0 Likes
835

Hi Harita,

1. In Report why we will use Read Statement.

2. In Report before using Read Statement why we will go for sorting?

Read only

Former Member
0 Likes
835

hi,

syntax.

read table itab_x with key <fieldname > = itab.

the above statement just read the first row from internal table with the given condition.

move itab_x-<fieldname> to itab-<fieldname>.

the above statement is used when we need to move fields from one internal table to another internal table.

Reward with points if helpful.

Message was edited by:

Vinutha YV