Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Home arrow Sample Code arrow ABAP Reports arrow Using a Join in a select
Using a Join in a select PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Tuesday, 13 February 2007

An example of a select using a join. TIP: Use transaction to build and test your joins if they get too complicated....

 

START-OF-SELECTION.

* ASSUMPTION: All quantities are in sales units. Since quantities

* are summed to the material group level, it is assumed that all

* materials within a material group have the same sales unit of

* measure.

  select a~kunag a~vbeln a~fkdat a~bukrs a~vbtyp

         b~matkl b~matnr b~arktx b~fkimg b~kzwi2 b~wavwr

         c~name1

         d~kunn2

     into corresponding fields of table replines

        from vbrk as a

          inner join vbrp as b

             on a~vbeln = b~vbeln

          inner join kna1 as c

             on a~kunag = c~kunnr

          left outer join knvp as d

             on a~kunag = d~kunnr and

                a~vkorg = d~vkorg and

                a~vtweg = d~vtweg and

                d~spart = '71' and

                d~parvw = 'CO' and

                d~parza = '000'

          where a~vkorg = '7100' and

                a~vbtyp in r_vtyp and

                a~fkdat in s_date and

                a~kunag in s_cust and

                b~matkl in s_mgrp and

                b~autyp in r_atyp.

END-OF-SELECTION.


Related Items:

Last Updated ( Tuesday, 13 February 2007 )
 
< Prev   Next >

Google Search

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor