‎2007 Aug 24 6:58 AM
HI
can i use directly where condition with out using ON in query.
SELECT AVBELN AAUDAT BKWMENG BARKTX BWERKS BPOSNR
INTO CORRESPONDING FIELDS OF TABLE INT_VBAK
FROM VBAK AS A INNER JOIN VBAP AS B
WHERE B~VSTEL IN S_VSTEL.
thanks.
‎2007 Aug 24 7:00 AM
Hi,
<b>NO</b>, you cannot, you need to define ON which fields you want to do the JOIN, else ON WHAT CONDTION do you expect the tables to be joined.
This is to make sure that the tables you are joining are related in some way, otherwise there is no meaning in JOINING tables which are noway related to each other.
Regards,
Sesh
‎2007 Aug 24 7:00 AM
Hi,
<b>NO</b>, you cannot, you need to define ON which fields you want to do the JOIN, else ON WHAT CONDTION do you expect the tables to be joined.
This is to make sure that the tables you are joining are related in some way, otherwise there is no meaning in JOINING tables which are noway related to each other.
Regards,
Sesh
‎2007 Aug 24 7:00 AM
SELECT AVBELN AAUDAT BKWMENG BARKTX BWERKS BPOSNR
INTO CORRESPONDING FIELDS OF TABLE INT_VBAK
FROM VBAK AS A INNER JOIN VBAP AS B
<b>on AVBELN = BVBELN</b>
WHERE B~VSTEL IN S_VSTEL.
‎2007 Aug 24 7:02 AM
Hi,
No you have to specify the On condition, it will be the key to join both the tables.
use the vbeln ( document number ) to join both the table.
SELECT AVBELN AAUDAT BKWMENG BARKTX BWERKS BPOSNR
INTO CORRESPONDING FIELDS OF TABLE INT_VBAK
FROM VBAK AS A INNER JOIN VBAP AS B
ON AVBELN = BVBELN.
WHERE B~VSTEL IN S_VSTEL.
Satya.
‎2007 Aug 24 7:04 AM
never..
there should be atleast one common field so that u can join two table.
And u have to write that in ON statement.
reward if helpful
‎2007 Aug 24 7:04 AM
at least write 1 where statement on which the two table will be joined.the tables both will contain the same field.....after words u can use ur where IN statement
Regards