Skip to Content
0
Former Member
Jan 21, 2011 at 10:56 AM

Problem with join / explicit field declaration does not work

29 Views

Hello together,

there is something I do not understand about the join. I have a join over two tables (see below). The field AENAM exists in both tables but I want to have it coming from ZDPP_VERBRAUCEFF.

BUT the system gives me the values from MARA although I define the source ZDPP_VERBRAUCEFF.

SELECT zdpp_verbrauceff~mandt

zdpp_verbrauceff~matnr

zdpp_verbrauceff~zzmdv01

zdpp_verbrauceff~begda

zdpp_verbrauceff~endda

zdpp_verbrauceff~vmeng

zdpp_verbrauceff~vmeng_m

zdpp_verbrauceff~aenam "Problem

zdpp_verbrauceff~aedat

zdpp_verbrauceff~aezet

zdpp_verbrauceff~prfdt

zdpp_verbrauceff~prfzt

FROM zdpp_verbrauceff

INNER JOIN mara

ON zdpp_verbrauceffmatnr = maramatnr

INTO TABLE lt_ver_db

WHERE zdpp_verbrauceff~zzmdv01 IN s_mdv01

AND zdpp_verbrauceff~begda <= s_datum-high

AND zdpp_verbrauceff~endda >= s_datum-low

AND mara~mtart IN s_mtart

AND mara~matnr IN s_matnr.

Can anybody tell me what I doing wrong?

Thanks in advance,

Sebastian