Skip to Content
author's profile photo Former Member
Former Member

for all entries

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 09:09 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 09:10 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 09:10 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2007 at 09:11 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 09:12 AM

    hi

    use

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

    and then

    write ur select statement

    praveen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 09:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2007 at 09:59 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.