04-23-2007 10:07 AM
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
04-23-2007 10: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.
04-23-2007 10:10 AM
are you sure that WA_SMUID is an internal table and not work area??
04-23-2007 10: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
04-23-2007 10: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
04-23-2007 11:22 AM
wa_smuid is a internal table . It is not a work area
regards,
kumar
04-23-2007 11:26 AM
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
04-23-2007 10:12 AM
hi
use
selct-options: wa_smuid-id for JBOUTIQUESMUREL-BOUTIQUEID.
and then
write ur select statement
praveen
04-23-2007 10: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.
04-23-2007 10: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.