Application Development 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 command

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

thanks manish

Former Member
0 Kudos

so what is the difference between , loop and read,

LOOP AT WHERE ........

LOOPAT.

READ ITAB WHERE...

WHAT IS THE DIFFERENCE

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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