Application Development 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: 

for all entries

Former Member
0 Kudos

hello all

what are the pre-requisites to the for all entries

4 REPLIES 4

former_member156446
Active Contributor
0 Kudos

check if initial condition on the internal table.. on which u write the for all entires..


if not itab is initial.

select ...

      for all entries in itab.
endif.

Former Member
0 Kudos

Hi ,

a) The condition internal table MUST NOT be empty ....or else it will go for pulling all the data records from the intended tables...

b) Key fields MUST be compared

c) Use DELETE ADJACENT DUPLICATAES to the condition Internal table before using it

Reward points if satisfied ..

Former Member
0 Kudos

Hi,

While using FOR ALL ENTRIES , check that the internal table you are using for "ALL ENTRIES" is not initial.

SORT the interal table by the key fields you are using in the select query and DELETE ADJACENT DUPLICATES

0 Kudos

Hi ,

the table which is joining should not be empty

use all the key fields for joining

if the key fields having duplicate entries

copy the values into another internal table which is having the same structure and then using

delete adjasent duplicates by comparing the key fields

it_masterhd[] = it_master[].

IF it_masterhd[] IS NOT INITIAL.

SORT it_masterhd ASCENDING BY gmid.

DELETE ADJACENT DUPLICATES FROM it_masterhd COMPARING gmid.

SELECT gmid gm_descrip FROM z_gmid INTO TABLE it_gmid

FOR ALL ENTRIES IN it_masterhd WHERE gmid = it_masterhd-gmid.

SORT it_gmid ASCENDING BY gmid.

ENDIF.