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 single and join

Former Member
0 Likes
1,589

Hi

some problem at INTO. Pls can any one suggest something.

the format of ( vbakvbeln eq lipsvgbel ) is not correct. It is problem with ( ) and space.

select single lipsvbeln vbakkunnr

from lips

inner join vbak

on ( vbakvbeln eq lipsvgbel )

into (lips-vbeln,vbak-kunnr)

where lips~vbeln eq likp-vbeln.

Regards

Raj.

4 REPLIES 4
Read only

Former Member
0 Likes
992

Hi,

Use Join statement as follows:

SELECT AEQUNR BDATAB BILOAN CSWERK

INTO TABLE ITEQ

FROM ( EQUI AS A INNER JOIN EQUZ AS B

ON AEQUNR = BEQUNR ) INNER JOIN ILOA AS C

ON BILOAN = CILOAN

WHERE A~EQART = 'ESTPL'

AND B~IWERK = 'M011'

AND B~INGRP = 'SLM'

AND BDATAB GE SDATE-LOW AND BDATAB LE SDATE-HIGH

AND C~SWERK IN S_WERK.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
992

Hi Raj,

You are trying to use the character '~' which should be used only if you are using alias name for the table. Otherwise you should be using '-' between the table names and the field names.

Try the below code in your case and it shall work,

select single avbeln bkunnr

into (lips-vbeln, vbak-kunnr)

from lips as a

inner join vbak as b

on ( bvbeln eq avgbel )

where avbeln eq bvbeln.

<b>Please do not forget to reward points if this helps,</b>

Kiran

Read only

Former Member
0 Likes
992

Hello,

Check this :-

TABLES: lips,vbak.

DATA: p_vbeln TYPE vbeln.
DATA: wa_vbeln TYPE vbeln,
      wa_kunnr TYPE kunnr.

SELECT SINGLE a~vbeln
              b~kunnr
       INTO (wa_vbeln,wa_kunnr)
       FROM lips AS a INNER JOIN vbak AS b
       ON a~vbeln = b~vbeln
       WHERE a~vbeln = p_vbeln.

Regards,

Deepu.K

Read only

0 Likes
992

Hi

select single lips~vbeln

from lips

inner join vbak

on ( vbakvbeln eq lipsvgbel )

into likp-vbeln

where lips~vbeln eq likp-vbeln

The above seletct statement already exist, i dont want to create work area for VBAK-VBELN as it is used many areas in the program. i just wanted to get KUNNR from VBAK for that i am coding

select single lips~vbeln <b>VBAK ~VBELN </b>

from lips

inner join vbak

on ( vbakvbeln eq lipsvgbel )

into (likp-vbeln,<b>VBAK-KUNNR</b>)

where lips~vbeln eq likp-vbeln .

But is throwing erro.

Thanks.

Raj