Application Development 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: 

ABAP 7.52 Inner Join with an internal table

pramod_teewaree
Explorer

As from ABAP 7.52 on SAP HANA, it is now possible to do a direct SELECT from an internal table.

SELECT a  FROM  @lt_it
  INTO TABLE @DATA(lt_it2)  
  WHERE b EQ 'E'.

This can also be used to replace SELECTS with for all entries.

SELECT a~field1, a~field2
  FROM dbtable AS a INNER JOIN @lt_it AS b    
  ON a~field3 EQ b~field1 AND
     a~field4 EQ b~field2.

However, I have been noticing a few issues.

When there are different key combinations in the internal table, some values tend to be left out from the DBTABLE.

When I use a single value for example field1 is the same throughout the internal table, I have no problem.

Note that I have not done a SORT of the Internal Table before the SELECT.

What are the main principles before doing such a select? Does the internal table need to be sorted before being used in the inner join?

2 REPLIES 2

Sandra_Rossi
Active Contributor

I guess the internal table should behave like any database table, so you should contact SAP support.

NB: not 7.4, it's since 7.52, and only with databases which support it (like HANA).

0 Kudos

you can do for all entries for this or you can take the data in the range table and 2nd select query you can out in .

thanks and regards

Md Mubashir

sap abap consult