Application Development and Automation 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: 
Read only

standard table

Former Member
0 Likes
734

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

5 REPLIES 5
Read only

Former Member
0 Likes
711

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.

Read only

0 Likes
711

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

Read only

0 Likes
711

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.

Read only

vinod_vemuru2
Active Contributor
0 Likes
711

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.

Read only

Former Member
0 Likes
711

Take the posnr filed in your internal table.

It will work.

Regards,

Madan.