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 / lokesh
The driver Internal table 0r First internal Table Must have
records in it , if u use For All Entries . If the First
Internal table is initial (means no records in it) then the
For All entries will fetch all the records from the DB
table , which can be real perfromance Issue.
so before making a 'For all entries" for a table make a
check that its not empty.
eg. code :
select matnr werks from marc
into table t_marc
where matnr = p_matnr.
if t_marc is not initial.
select matnr mbrsh meins matkl from mara
into table t_mara
for all entries in t_marc
where matnr = t_marc-matnr.
else.
write : / 'No data was fetch by t_marc'.
endif.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / kumar
If you use for all entries statement and if the internal
table which u r using for all entries it will retrieve all
the records from the table which you are using in select
query
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / siddharth samal
IF THE 1ST TABLE IS INITIAL THEN THE PROGRAM WILL SHOW DUMP
ERROR COZ ITS MANDATORY THAT THE 1ST TABLE SHOULD HAVE
VALUE.
Is This Answer Correct ? | 4 Yes | 4 No |
Answer / babita
If we don't check for intial condition for table 1 and its
is blank, all the records of second table will be displayed.
Hence it is a good practice to always check for following
before using 'FOR ALL ENTRIES'
if not itab1[] is intial.
Is This Answer Correct ? | 0 Yes | 0 No |
can anyone give me notes on bdc direct input method
What is narrow casting and wide casting?
2)what is the differnce between user exits and Badi
How to give programe name as input in BDC report of abap ?
Explain some essential objects in abap dictionary?
What is WEB Dynpro Comp. / intf?
What is the diffrence between index and primary key?
can we migrate custom defined smart form into adobe form, if yes what are connecting settings we have to make in adboe form?
How to know if the value entered contains records or not?
What are the domains and data element?
How to convert normal function module to bapi?
2-What is the difference between At New and On change Of inside a loop??I want inside a loop difference not basic difference??