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

hi,

i am using for all entries in select query. like

SELECT BOUTIQUEID FROM ZJBOUTIQUESMUREL INTO CORRESPONDING FIELDS OF TABLE IT_BOUTIQUESMUREL FOR ALL ENTRIES IN WA_SMUID WHERE SMUID = WA_SMUID-ID.

in WA_SMUID internal table contains two smu ids like 50000002 and 50000227 .

in ZJBOUTIQUESMUREL z-table also have same smu ids 50000002 and 50000227 .

here two boutique id should have come ..

but here only one boutique id is coming .. can anyone help me why it is coming like this ?

regards ,

kumar

9 REPLIES 9

Former Member
0 Kudos

Check whether u r passing workarea or internal table i.e., wa_smuid

We need to pass internal table only

Reward with points if solved your issue

Regards,

Krishna K.

Former Member
0 Kudos

are you sure that WA_SMUID is an internal table and not work area??

Former Member
0 Kudos

Hi Kumaresan ,

This is one disadvantage assocaited with for all entries that it deletes duplicate entries.

Plese read the complete help of for all entries and you will find the mention of this point.

So the solution to this is to select all the key feilds from the table from which you are selecting data , so in your case in the select statement to select data from table ZJBOUTIQUESMUREL along with the feilds you are currently selecting , select the key feilds which you have left out , because this will prevent duplicate records from occuring.

Hope this helps

Regards

Arun

former_member632991
Active Contributor
0 Kudos

Hi,

Use internal table name instead of workarea for that.

SELECT BOUTIQUEID FROM ZJBOUTIQUESMUREL INTO CORRESPONDING FIELDS OF TABLE IT_BOUTIQUESMUREL FOR ALL ENTRIES IN <b>WA_SMUID</b> WHERE SMUID = WA_SMUID-ID.

Regards,

Sonika

0 Kudos

wa_smuid is a internal table . It is not a work area

regards,

kumar

0 Kudos

Hi ,

The problem is not with the internal table , youor issue will be solved , if you select all the priimary keys from the table , as written in my previous post for all entries does not allow duplicate entries and hence deletes them.

Regards

Arun

Former Member
0 Kudos

hi

use

selct-options: wa_smuid-id for JBOUTIQUESMUREL-BOUTIQUEID.

and then

write ur select statement

praveen

Former Member
0 Kudos

Hi,

Since you are using for all entries, ensure that your all the rules are satisfies for this concept:

Check whether first internal table is not empty:

ie,

if WA_SMUID[] is not intial.

select for all entries....

endif.

Now just check whether wa_smuid is a work area or Internal table, as if it is a work area then it will only get you one record.

In your select query include all the key fields in the table ZJBOUTIQUESMUREL.

Check these things and probably you will find the solution.

Reward all the helpful answers.

Regards,

Varun.

former_member699750
Participant
0 Kudos

where you r writen ur select query?inside the loop of WA_SMUID? if so no need to use for all entries..

please confirm first,whether it is internal table or work area.