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

inner join

Former Member
0 Likes
705

Hi,

i want to have two fields from bseg table and two fields from t001 table into a single table. since bseg is a cluster table so inner join is not possible. Any other method to acheive the purpose?

6 REPLIES 6
Read only

Former Member
0 Likes
666

Hi,

use "for all entries" ...

Njoy SAP

Read only

Former Member
0 Likes
666

Hi Viswanath,

1)Use FOR ALL ENTRIES option instead of INNER JOINs.

2)SELECT 2 fields from BSEG into an internal table.

3)If the internal table is not initial, then SELECT 2 fields from T001 using FOR ALL ENTRIES option.

Thanks,

Vinay

Read only

Former Member
0 Likes
666

Hello!

Check your previous topic.

Regards

Tamá

Read only

Former Member
0 Likes
666

Get the data from BSEG table into an internal table ibseg..and use the SELECT statement from T001 using FOR ALL ENTRIES in ibseg to achieve the goal.

It can be worth even to do the other way round i.e. get information from T001 and using for all get data from BSEG.

Read only

Former Member
0 Likes
666

Hello,

FOR ALL ENTRIES would be the better option for you.

Regs,

Venkat Ramanan N

Read only

Former Member
0 Likes
666

T001 is a small table. So the best thing to do would be to read it all into a single table before selecting from BSEG:


SELECT * FROM T001 INTO TABLE itab.

Then instead of selecting it each time, you can read it using a binary search. This will be much faster.

Rob

Message was edited by: Rob Burbank