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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum number of match code id's that can be defined for one match code object ?

727


Differentiate between abap memory and sap memory?

842


How to handle error in session method? : abap bdc

931


What is personnel sub are

1763


Lock objects and what are parameters of ENQUEUE FM?

1471


Explain the function module in bdc?

788


What are the Control levels in internal tables?

832


What are the abap/4 commands that link to a layout set?

1077


What is abap work bench?

932


There is 1 person but it’s displaying that this person cannot be booked. He is not available for the business event. Can you tell me where is it going wrong? What can be the reasons? : sap abap hr

822


How many main windows will be there in a page window?

749


what is abstract classes

1061


How to read 5th record from Hash Internal Table?

1046


What are the control break events in abap? : abap data dictionary

818


How to find the return code of an stmt in abap programs?

840