‎2008 May 06 9:29 AM
hi all,
i have created a internal table by using the following systax.
types : begin of ty_itab,
matnr type matnr,
kwmeng type kwmeng,
audat type audat,
end of ty_itab.
data : itab type standard table of ty_itab with header line.
i want to fetch all records of the selected document numbers from VBAP table, but it is not taking duplicate entries.
if matnr, kwmenge and audat values are same than thoes records are not coming to internal table..
according to me by default standard table should allow duplicate entries which is not happing in my case.....
kindly, give some solution
thanks
‎2008 May 06 9:31 AM
VBAP is a position data table, so you need to have posnr in your itab as well, thats the full solution for all the problems you got right now.
besides a small tip, dont do header lines, it´s obsolete and hard to read.
‎2008 May 06 9:44 AM
Hi florein,
thanks for the solution....
but can u explain me ,why the duplicate entries are not coming to internal table....
standard table should take duplicate entries right..
for me i required only matnr kwmeng and audat..... when i have created internal table of these fields, duplicate entries of these also should append in the internal table.... but why it is not taking...
thanks
‎2008 May 06 10:41 AM
If for standard tables you specify no key, the table key is automatically determined as a non-unique standard key. A key specified without explicit uniqueness is implicitly enhanced with the addition NON-UNIQUE KEY. You cannot specify addition UNIQUE KEY.
‎2008 May 06 9:34 AM
Hi,
Please post ur select query. Also Avoid using Header lines. This is absolete now.
Check this select.
SELECT field list INTO TABLE itab
FROM vbap
WHERE vbeln IN so_vbeln.
Thanks,
Vinod.
‎2008 May 06 9:36 AM
Take the posnr filed in your internal table.
It will work.
Regards,
Madan.