Former Member

# inner join for 4 tables

Hi forum,

Pls correct the following code..

SELECT a~zbukr

a~hbkid

a~hktid

a~checf

a~waers

a~rwbtr

a~bancd

a~vblnr

a~pernr

a~voidr

a~rzawe

a~laufd

a~empfg

a~gjahr

a~zaldt

a~znme1

a~rec_belnr

b~bankl

c~bankn

d~duedt

INTO CORRESPONDING FIELDS OF TABLE it

FROM payr AS a

INNER JOIN t012 AS b

ON ahbkid = bhbkid

inner join t012k as c

on bhbkid = chbkid

• and on ahbkid = chbkid

inner join t51r5 as d

on cbukrs = dbukrs

• and on awaers = dwaers

WHERE a~zaldt IN s_zaldt

AND a~vblnr IN s_vblnr

AND a~znme1 IN s_znme1

AND a~rec_belnr IN s_rec

AND a~waers IN s_waers.

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Dec 27, 2007 at 04:45 AM

Hi mahati,

This is kiran kumar.G.plz check the below select statement that will solve ur problem check it once ok..

SELECT a~zbukr

a~hbkid

a~hktid

a~checf

a~waers

a~rwbtr

a~bancd

a~vblnr

a~pernr

a~voidr

a~rzawe

a~laufd

a~empfg

a~gjahr

a~zaldt

a~znme1

a~rec_belnr

b~bankl

c~bankn

d~duedt

FROM payr AS a

INNER JOIN t012 AS b

ON ahbkid = bhbkid

inner join t012k as c

on ahbkid = chbkid

inner join t51r5 as d

on cbukrs = dbukrs

into table it

WHERE a~zaldt IN s_zaldt

AND a~vblnr IN s_vblnr

AND a~znme1 IN s_znme1

AND a~rec_belnr IN s_rec

AND a~waers IN s_waers.

Kiran Kumar.G

Have a Nice Day.