‎2007 May 15 11:50 AM
Hi All,
1. please explain the functionality of <b>Read</b>?
2. what is the difference between Read and Move?
Thanks
Satish
‎2007 May 15 11:53 AM
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
‎2007 May 15 11:55 AM
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
‎2007 May 15 11:56 AM
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.
‎2007 May 15 12:00 PM
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.
‎2007 May 18 12:02 PM
Hi Harita,
1. In Report why we will use Read Statement.
2. In Report before using Read Statement why we will go for sorting?
‎2007 May 15 12:25 PM
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