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 command

Former Member
0 Likes
803

hello abap gurus,

can i know, what is the difference between select and read commands.

in what cases is read good to use.

plz dont give me links, just tell which is good for what.

thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
774

Hello Saritha,

Select command - get the data from data base table

read command will be using for reading the data from internal table only one record at a time.

Thanks

Seshu

6 REPLIES 6
Read only

Former Member
0 Likes
774

select command is used to get fields from database. on the other hand, read command is working on internal table where we already have records.

ex. read table itab index 1.

Hope this will help you

Regards

MM

Read only

Former Member
0 Likes
774

thanks manish

Read only

Former Member
0 Likes
774

so what is the difference between , loop and read,

LOOP AT WHERE ........

LOOPAT.

READ ITAB WHERE...

WHAT IS THE DIFFERENCE

Read only

0 Likes
774

LOOP AT WHERE ........

ENDLOOP.

Here you are looping at internal table, you will have the infomration in the loop and endloop record by record. (again it should match the where condition)

READ ITAB WHERE...

Here you are reading internal table with where condition, you will get a record which matches that condition.

Reward if this answer is helpful

Read only

0 Likes
774

Loop works with bunch of records but read works with one record.

When we do loop at itab

endloop. We will go with each records for exceution but read will explicity work with records you want to work with

like read table itab with key matnr = itab-matnr.

Hope this help.

Regards

MM

Read only

Former Member
0 Likes
775

Hello Saritha,

Select command - get the data from data base table

read command will be using for reading the data from internal table only one record at a time.

Thanks

Seshu