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 |
what is the use of CTU_PARAMS when we working with BDC?
4 Answers Cap Gemini, Yash Technologies,
What is the difference between normal report program and module pool program?
3 Answers Atos Origin, Kaavian,
What is img? : sap abap hr
What will happen when we use single buffered selected?
If u use US Database server? How can access the client?
how can i change rows inot columns in the finaldisplay list
1 Answers Bristle Cone, IBM, TCS,
How do u set up background jobs in SAP? What r the steps? What are the event driven batch jobs?
Can we create a database table through a report?
Can we call one program(not include) from another program?
2 Answers Altrion Technologies,
What is field catalog?
What is a table cluster? : abap data dictionary
How to create the ur own barcodes?