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 handle error in session method? : abap bdc
Can i know some of the Realtime tickets that anyone has been faced ?
What does the ‘suppress dialog’ do?
What does the insert statement in extract datasets do? : abap modularization
Why are insert and append statement used in sap abap?
What is the difference between the exits created in M.M and S&D?
What are the function modules used in f4 help?
A subroutine can contain nested form and endform blocks. State true or false. : abap modularization
What are the page windows? How many main windows will be there in a page window?
How to write a bdc – how do you go about it?
Is there any BAPI to retrieve list of customers and their sales areas i.e., Cust No, Distr Channel and Division for all the customers.
How to set an Enhancement point for a custom report?
any 1 having notes on SAP-ABAP certification, or even if any 1 could provide the url for getting notes on SAP-ABAP certification, would be appreciated.
Which infotype records can not be deleted ? : abap hr
What is read line in abap?