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).
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sreenivasa rao yarru
If there is no records in secondtable then it will give all
recods in first dable
select from firsttable ....
for all entries in secondtable
So we need to check this condition first
For all entries wont give duplicate entries
Is This Answer Correct ? | 1 Yes | 0 No |
How do you execute the payroll
What are the different types of internal table?
What are the types of subroutines? : abap modularization
What are the function modules that are generated when you activate a lockobject? : sap abap data dictionary
What type of user exits have you written ?
how to migrate standard text in sap script to smart form?
What are the different functions used in sap script? What are the parameters used in each function?
What are the function modules used in a sap script driver program?
How can you change properties of screen elements dynamically in Module pool Programming ?
What does nw 7.4 sp 05/nw 7.5 sp 02 offers in abap?
what are performence analysis techniques?
how can i find which report(abap program) assign to which sap script? or how can we find sap script is assign to which progam?