Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal Tab

Former Member
0 Likes
515

Hi,

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).

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
444

Hi!

Because the first is empty, FOR ALL ENTRIES will check for ALL ENTRIES in the select.

This means a very high runtime and a pathetic performance.

Before using for all entries, check is the table initial or not.

For example: IF NOT gt_table[] IS INITIAL.

Regards

Tamá

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
444

Hi,

The bahavior of SELECT with FOR ALL ENTRIES when ITAB Is initial is it just ignores the ITAB and fetches data according to the REST OF THE WHERE CLAUSE.

This is what happends when you use your first internal table.

When you use your second internal table which has some data then only those fields whihc match the WHERE CLAUSE are retrived.

Regards,

Sesh

Read only

Former Member
0 Likes
445

Hi!

Because the first is empty, FOR ALL ENTRIES will check for ALL ENTRIES in the select.

This means a very high runtime and a pathetic performance.

Before using for all entries, check is the table initial or not.

For example: IF NOT gt_table[] IS INITIAL.

Regards

Tamá