Waht is "READ TABLE" command?? Whats the use of it??
Whats the syntax of the same?
Answers were Sorted based on User's Feedback
Answer / parthasarathi
Read Table command is used for to read data from an intenal table. it reads one record at a time.if u want all record from internal table means, you to put read statement in a loop.
Syntax: read table [internal table name] into [workarea] where [condition].
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / pramada oram
Below given are 2 types of syntaxes for READ statement
which are used in common.
1)Read table itab into wa with key fname1 = fname2.
fname1 is the field defined in internal table 'itab'
and work area 'wa'.
fname2 is the field defined in the table corresponding to
which the read statement is used.
(or)
2)Read table itab into wa with index index_no.
* Here itab and wa should have the same structure.
Is This Answer Correct ? | 9 Yes | 4 No |
Answer / pramada oram
In the above given answer there is a correction for the
syntax using index.
2)Read table itab into wa index index_no.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / sayak roy
for better performance please use the below syntax.
SORT it_tab2 BY fname1 fname2.
LOOP AT it_itab1 into wa_itab1.
READ TABLE it_tab2 into wa_itab2
WHERE fname1 = wa_itab1-fname1
fname2 = wa_itab1-fname2
BINARY SEARCH.
IF SY_SUBRC = 0.
Do the processing.
ENDIF.
ENDLOOP.
Even if you read the table with INDEX you can sort the table
depending on what result you are expecting from that read,
means, the order and the priority of the value of the
particular fields expected from that READ statement.
Is This Answer Correct ? | 3 Yes | 2 No |
While Transporting Smartform form Dev to Test to Production, it is possible that Name of the Function Module change, Why? In which case it changes and in which case it remains same?
What is the difference between Customizing Data, Master Data and Transactional data?
how to create a button in selection screen? how to add a gui status in a selection screen?
can u create more than one selection screen?
8 Answers Bristle Cone, Cap Gemini, HP, Satyam, Wipro,
What is the difference between open sql & native sql ?
I am looking for Professionals with 4+ yrs in ABAP HR Module (atleast 2yrs).
Can i create a Table without a Data Element ? How ?
I have two internal tables itab1 and itab2 and I had move the content of the itab1 to itab2 and then itab1 had to deleted
what is difference between update and modify
By default SAP provides locking mechanism if db is being used by a user ,then what is the use of writing enque method in your code?
Define subtype ? : abap hr
which state ment is used to move identically named fields between structures?