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
Define subtype ? : abap hr
What is runtime analysis?
What are the different types of luws. What are they?
What is projection view?
Explain the difference between get and get late?
What do you do when the system crashes in the middle of a BDC batch session?
Some Realtime Objects on Bdc.
Program for Prime numbers and Matrix plz explain me the procedural method with steps
To find the date difference & excude saturday & sunday in between them
Different types of luws. What are they?
What are the differences between table and structure in data dictionary?
Explain read dataset in sap abap?
If I have put commit in badi implementation class after update, is it allowed? Also if some standard functionality already implemented an update and now i m doing update and if it fails, what will be the impact of commit?
What is the difference between a dialog program and a report?
Can a transparent table exist in data dictionary but not in the database physically? : abap data dictionary