04-30-2009 11:17 AM
04-30-2009 11:23 AM
Hi,
check this code..
SELECT a~pernr a~begda a~endda a~branc b~nachn b~vorna
FROM pa0023 as a
INNER JOIN pa0002 as b
ON a_pernr = b~pernr
INTO TABLE ifinal
WHERE a~pernr IN ( select pernr from pa0023
where aedtm = p_aedtm and
uname ne 'KA51151' )
.
04-30-2009 11:27 AM
thanks Avinash,
Actually I need multiple select stetement to combine with join..
Like:
(Select abc, cde from tabe1,tab2 on ) INNER JOIN (Select abc, cde from tabe1,tab2 on ) INNER JOIN Select abc, cde from tabe1,tab2 on )
like that . Can u plaese tell me how to write this requirement with the right syntax
04-30-2009 11:34 AM
Hi Ajay,
could you please be clear on the requirement as this is not possible in ABAP because you can only give inner join with tables and not the records of the tables....
mention properly as to what you want and we can give you the query....
Regards,
Siddarth
04-30-2009 11:41 AM
Thanks Sidhharth for your Respose
Actually I need data from VBAP, VBAK, VBUP, VBUK and VBKD with all functional validation satisfied for a sales order item data. The requirement is to report all item data with other information from table VBAK, VBUP, VBUK and VBKD in a corresponding record with ALL data in VBAP.
Your help is appriciated.
see the below query for reference
select alias_vbap~vbeln from vbap as
alias_vbap inner join vbak as alias_vbak
on alias_vbapvbeln eq alias_vbakvbeln
"and alias_vbak~bukrs_vf eq '2400'
inner join vbuk as alias_vbuk
on alias_vbukvbeln = alias_vbapvbeln
inner join vbup as alias_vbup
on alias_vbupvbeln = alias_vbapvbeln
and alias_vbupposnr = alias_vbapposnr
left OUTER join veda as alias_veda
on alias_vedavbeln = alias_vbapvbeln
and alias_vedavposn = alias_vbapposnr
left outer join vbkd as alias_vbkd
on alias_vbkdvbeln = alias_vbapvbeln
and alias_vbkdposnr = alias_vbapposnr
04-30-2009 11:33 AM
http://help.sap.com/saphelp_nw04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
SELECT * FROM ( ( MSEG AS A INNER JOIN MKPF AS B ON BMBLNR = AMBLNR )
INTO TABLE ITAB WHERE A~WERKS IN PLANTS
AND A~MATNR IN ( SELECT MATNR FROM MARA AS F WHERE MATKL IN MATGRP )
09-08-2009 11:32 AM