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

Using Select Statements

Former Member
0 Likes
478

Hi,

I got error message when execution of my program..it says..

error 23 when accessing table vttk.

and the program got terminated at statrt of selection point itself.

here is the select statement I have used..can someone help me out in fixing this.

do u need to declare seperate internal table for zmmda.

Start-of-selection.

select t001bukrs t001butxt

vttkdtabf vttktknum

vttkroute likpvbeln

likpinco1 likplfdat

vttktext3 vttktext1

vttk~add04

zmmda~docnum

into corresponding fields of table int_vttk

from ( ( ( ( ( vttk

inner join ttds

on ttdstplst eq vttktplst )

inner join t001

on t001bukrs eq ttdsbukrs )

inner join vtfa

on vtfavbelv eq vttktknum )

inner join likp

on likpvbeln eq vtfavbeln )

left outer join zconshpmnt

on zmmdatdocnum eq vttktknum )

where vttk~dtabf in s_dtabf

and vttk~shtyp in s_shtyp

and vttk~tdlnr in s_tdlnr

and vttk~route in s_route

and ttds~bukrs in s_bukrs

and vtfa~vbtyp_v eq '8'

and vtfa~vbtyp_n eq 'J'.

Stal.

2 REPLIES 2
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
436

First of all, you have zmmda in one place and zmmdat in another. Second, I don't even see either table joined in the SELECT statement. Instead, you have a join in some table ZCONSHPMNT, which doesn't have corresponding ON.

I'm not sure how it even got past the syntax check.

Read only

Sm1tje
Active Contributor
0 Likes
436

I have no SAP system to check, but problem could be this:

left outer join zconshpmnt

on zmmdatdocnum eq vttktknum )

zmmdat -> shouldn't this be zconshpmnt?