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

COMBINING COMMON COLUMNS IN SELECT QUERY

Former Member
0 Likes
544

hi all,

While make inner join between two tables how to link more than one

common colums , which operator i want to use, shall anybody give me one ex.

Thanks in advance.

R.Vijai

hi all,

While make inner join between two tables how to link more than one

common colums , which operator i want to use, shall anybody give me one ex.

Thanks in advance.

R.Vijai

3 REPLIES 3
Read only

Former Member
0 Likes
507

Select single VbrkBukrs VbrkKunrg Vbrk~Vbeln

VbrkFkdat VbrkBstnk_Vf Vbrk~Zterm

Tvzbt~Vtext

VbakVbeln VbakBstdk

LikpVbeln Likplfdat Likp~Lfuhr

into w_vbrk

from vbrk

inner join Tvzbt on TvzbtZterm = VbrkZterm and

Tvzbt~Spras = sy-langu

Inner join Vbfa as SalesLnk

on SalesLnk~vbeln = pu_vbeln and

SalesLnk~vbtyp_v = c_order

inner join Vbak on VbakVbeln = SalesLnkVbelv

Inner join Vbfa as DeliveryLnk

on DeliveryLnk~vbeln = pu_vbeln and

DeliveryLnk~vbtyp_v = c_Delivery

inner join Likp on LikpVbeln = DeliveryLnkVbelv

where vbrk~vbeln = pu_Vbeln.

santhosh

Read only

Former Member
0 Likes
507

Hi Vijaya ,

Just keep on adding 'AND' , beofre all the other conditions.

Regards

Arun

Read only

Former Member
0 Likes
507

hi

good

try like this

SELECT c~matnr "Material no.

  • c~werks "Plant

  • c~lvorm "Flag Mat.-Del. at Plant level

  • c~bwtty "Valuation category

  • c~kzkri "Indicator: Gritical part

  • c~dispr "Material: MRP profile

    • ADD Mike Krepcik TD 3363 02/01/05 D10K913640

  • c~dismm "MRP type

    • END TD 3363 02/01/05 D10K913640

  • c~plifz "Planned delivery time in days

  • c~perkz "Period indicator

  • c~minbe "Reorder point

  • c~mabst "Maximum stock level

  • c~umlmc "Stock in Tran. (plant to plant)

  • a~mtart "Material type

  • a~meins "Base unit of measure

  • k~spras "Language key

  • k~maktx "Material description

  • w~bwkey "Valuation area

  • w~bwtar "Valuation type

  • w~lbkum "Total value stock

  • w~salk3 "Value of total valuated stock

  • w~verpr "Moving ave. price/periodic unit

  • w~peinh "Price unit ADD D10K913194

  • FROM marc AS c LEFT OUTER JOIN mara AS a

  • ON cmatnr = amatnr

  • LEFT OUTER JOIN makt AS k

  • ON cmatnr = kmatnr

  • LEFT OUTER JOIN mbew AS w

  • ON cmatnr = wmatnr AND

  • cwerks = wbwkey

  • INTO TABLE i_splus

  • WHERE c~matnr IN s_matnr "Material no.

  • AND c~werks IN s_werks. "Plant

thanks

mrutyun^