when you are using 2 internal table in program, you have
decided to use for all entries statement to retrieve data
but unfortunately there are no records in the first internal
table. What will be the result? (2nd internal table contains
records).
Answer Posted / nitin gautam
If the first itab[] is initial, then it will select all the rows of the table because we are comparing two tables with where condition.
There are two important tips:
1. Declare all primary keys of your database table in your select statement. It ensures that you have no duplicates in you hit list
2. Check that the table used in the "For all entries" statement is not empty. This avoids executing the select statement if no result is expected.
Please refer the following example code:
IF LT_OBJNR[] IS NOT INITIAL.
SELECT
LEDNR
OBJNR
GJAHR
WRTTP
VERSN
KSTAR
HRKFT
VRGNG
VBUND
PARGB
BEKNZ
TWAER
into table LT_WKG
FROM COSP
FOR ALL ENTRIES IN LT_OBJNR
WHERE OBJNR = LT_OBJNR-OBJNR.
ENDIF.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to convert normal function module to bapi?
What is the sap abap?
What are the types of search helps? : sap abap data dictionary
what is bapi,badi,bdc,ale idocs?
What is off cycle payroll run
What is buffering in abap?
Explain how is batch input process different from processing on line?
Can a domain, assigned to a data element be changed?
On which even we can validate the input fields in module progams?
Name the function module used to convert logical file names to physical file names in abap/4 programs?
Explain the session method? : abap bdc
What are the differences between session method and call transaction method? : abap bdc
What is the significance of delivery class?
Value table VS check Table.
Badi concepts