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

select query

Former Member
0 Likes
750

Dear experts

I am using the below query but i am getting the error

pls suggest any other way to satify all the conditions

SELECT likpvbeln lipswerks lipslfimg lipsmatnr

INTO CORRESPONDING FIELDS OF TABLE i_c FROM likp

INNER JOIN lips ON likpvbeln = lipsvbeln

for all entries in i_rework

WHERE

werks = i_rework=werks

likpvbeln IN p_vbeln AND likplfart = 'LR'.

Thanks in advance

karthik

7 REPLIES 7
Read only

Former Member
0 Likes
725

hi,

change the bolded one:

SELECT likpvbeln lipswerks lipslfimg lipsmatnr

INTO CORRESPONDING FIELDS OF TABLE i_c FROM likp

INNER JOIN lips ON likpvbeln = lipsvbeln

for all entries in i_rework

WHERE

werks = i_rework<b>-</b>werks

likpvbeln IN p_vbeln AND likplfart = 'LR'.

regards,

madhu

Read only

Former Member
0 Likes
725

Hi,

Take a look :

SELECT likp~vbeln
 lips~werks
 lips~lfimg
 lips~matnr
INTO CORRESPONDING FIELDS OF TABLE i_c
FROM likp INNER JOIN lips
 ON likp~vbeln = lips~vbeln
for all entries in i_rework
WHERE 
werks = i_rework-werks
AND likp~vbeln IN p_vbeln
AND likp~lfart = 'LR'.

Erwan

Read only

0 Likes
725

Hi erwan

if i use your query i am getting the error "The column name has two meanings"

regards

karthik

Read only

0 Likes
725

hi karthik

have u changed the ON condition. '=' has to be replaced with '-'.

regards,

madhu

Read only

Former Member
0 Likes
725

Change this line:

werks = i_rework=werks

to

werks = i_rework-werks

Regards,

Ravi

Read only

Former Member
0 Likes
725

Hi Karthik,

Use this code:

SELECT likpvbeln lipswerks lipslfimg lipsmatnr

INTO CORRESPONDING FIELDS OF TABLE i_c FROM likp

INNER JOIN lips ON likpvbeln = lipsvbeln

for all entries in i_rework

WHERE

<b>likp~werks = i_rework-werks</b>

likpvbeln IN p_vbeln AND likplfart = 'LR'.

REgards,

Ravi

Read only

Former Member
0 Likes
725

hi

good

your select statement is wrong

SELECT likpvbeln lipswerks lipslfimg lipsmatnr

INTO CORRESPONDING FIELDS OF TABLE i_c FROM likp

INNER JOIN lips ON likpvbeln = lipsvbeln

for all entries in i_rework

WHERE

werks = i_rework=werks

likpvbeln IN p_vbeln AND likplfart = 'LR'.

Use like this.

Since these 2 tables a re logically joined by the airln field, it is advisable to use the inner join.

Select aairln alnnam bfligh bcntry into table int_airdet

From zairln as a inner join zflight as b on aairln = bairln.

thanks

mrutyun^