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 are the function modules used in a sap script driver program?

572


Control Break statements- At new...endat.

902


How do you read files from the presentation server ? : abap bdc

584


What happens if a function module runs in an update task? : abap modularization

593


Explain badi in abap.

584






Define database layer? : abap data dictionary

676


How does the interface between the dynpro and the abap/4 modules take place?

555


Explain about sap fico testing and the tools used? : abap bdc

612


Setting up a BDC program where you find information from?

662


Rp_provide_from_last contains how many parameters ? : abap hr

880


What are differences between at selection-screen and at selection-screen output?

774


What are the two ways for restricting the value range for a domain? : sap abap data dictionary

724


What is bdc programming in sap?

616


What are the different methods of bdc? : abap bdc

603


difference between Valuation type and valuation category?

2001