Skip to Content
0
Former Member
Mar 23, 2009 at 06:11 AM

getting runtime error while using hash table

14 Views

Hi,

I have defined an internal table as hash with unique key.But while executng the prog. its giving a dump saying "There is already a line with the same key." My code is

data: begin of wa_rkrp,

vbeln like vbrk-vbeln,

fkdat like vbrk-fkdat,

fkart like vbrk-fkart,

kunag like vbrk-kunag,

knumv like vbrk-knumv,

inco1 like vbrk-inco1,

spart like vbrk-spart,

netwr like vbrk-netwr,

mwsbk like vbrk-mwsbk,

uepos like vbrp-uepos,

werks like vbrp-werks,

lgort like vbrp-lgort,

end of wa_rkrp.

data lt_rkrp like hashed table of wa_rkrp

with unique key vbeln

with header line.

select vbrk~vbeln

vbrk~fkdat

vbrk~fkart

vbrk~kunag

vbrk~knumv

vbrk~inco1

vbrk~spart

vbrk~netwr

vbrk~mwsbk

vbrp~uepos

vbrp~werks

vbrp~lgort

into table lt_rkrp

from vbrk inner join vbrp

on vbrpvbeln = vbrkvbeln

where vbrk~fkdat in s_fkdat

and vbrk~bukrs eq p_bukrs.

Any problem in my select query? or with my table deifnition.

Can anyone pls suggest how to rectify this.