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 |
Are you familiar with all steps for setting up a workflow?
Value table VS check Table.
What is Field symbol?
What are dml commands in abap?
When will the current screen processing terminates?
what is BDCDATA structure?
How to get that a secondary index is attached to a select query?
what is search helps..How many types are there?
Difference between call by value and call by reference? : abap data dictionary
Explain how do you get output from idoc?
What the Object will be created when upload a Logo?
how to call the function module generated in smartform for printing the form ?