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

Join Command

Former Member
0 Likes
591

Hi Gurus,

What is Purpose of Joint Command Using Internal Table. how many type in join. briefly Explain.

regards,

JH

5 REPLIES 5
Read only

Former Member
0 Likes
557

Assuming that Joint was a typo..

I've never seen or heard of a JOIN command used on an internal table.

However it is used frequently in a SELECT statement for reading DB Tables.

Like this


SELECT * INTO CORRESPONDING FIELDS OF TABLE it_mska
  FROM mara AS a
  JOIN marc AS b ON a~matnr = b~matnr.

Read only

0 Likes
557

Hi,

Join Explain .

regards,

JH

Read only

0 Likes
557

Hi,

v use join to club the data into one internal table from multiple tables..

but using join is not a performance intensive...so we use it if we are to join 2 or max 3 tables...

simply its a cartesian product which joins the two tables...based on a key.

for example, we fetch the data from iflot and iflo tables and put into out_tab say then,

SELECT i~tplnr

f~pltxt

i~invnr

i~objnr

i~erdat

i~fltyp

i~iwerk

INTO TABLE out_tab

FROM ( ( ( iflot AS i INNER JOIN iflo AS f ON ftplnr = itplnr )

WHERE itplnr IN s_tplnr AND ifltyp IN s_fltyp AND i~objnr IN s_objnr.

plz revert if any clarifications required.

regards.

Read only

Former Member
0 Likes
557

Table joins are 2 types:

1. Inner join

2.Left Outer Join

Joins r used to take the data from tables....max is 3.

but these r not used because of performance

Ex:

2 tables having data

Emp table: Dept.Table:

ID NAME ID DEPT

1 A 1 D1

2 B 1 D2

3 C 3 D1

4 D 4 D1

4 D3

SELECT A~ID

A~NAME

B~DEPT

FROM EMP as A INNERJOIN DEPT as B

on AID = BID

INTO table ITAB.

output:

INNERJOIN:((ONLY MATCHING ENTRIES)

1-A-D1

1-A-D2

3-C-D1

4-D-D1

4-D-D3

OUTERJOIN:(ALL ENTRIES)

1-A-D1

1-A-D2

2-B-

3-C-D1

4-D-D1

4-D-D3

reward if helpful

regards

GIRI

Read only

Former Member
0 Likes
557

Hi,

Why not try to use help.sap.com or your F1 online help to read about the SELECT statement and JOIN statement. Or search the forums as these questions have been asked over and over and over before.