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: 

Cluster Tables and Open SQL

Former Member
0 Kudos

Hi,

I am planning to replace several transparent tables with cluster tables.

And this also implies that I have to read from cluster tables.

One of the reason, I did not do this is until now is, that at the moment I am heavily

relying on the possibility to specify the DB name dynamically during runtime.

If I start implementing this scenario in one case, it should be possible to implement this

for all cases.

My question is now, is it possible to use cluster table similar to transparent table?

The following sketches the idea

The typical cluster table looks like

RELID INDX_RELID

SELKEY

SRTF2 INDX_SRTF2

CLUSTR

CLUSTD

What one could do is, select from the cluster table using the primariy key fields

RELID INDX_RELID

SELKEY

into an internal table, treating the DB table as an transparent table and after that,

do an import from the internal table to the real internal table.

To generate the value for SELKEY - Fill the structure and move the content of the

structure to a CHAR50.

The question is: Would this work?

I looked across the documentation, but I have found only little.

Trying it out is not useful either, since this technique needs to work independ of OS, DB

and NW Release.

And if it works, I cant be sure, that with a different system setup it still works.

Thanks fro your help.

With kind regards

Uwe Gebhardt

Edited by: Uwe Gebhardt on Apr 28, 2011 9:38 AM

3 REPLIES 3

yuri_ziryukin
Employee
Employee
0 Kudos

Hello Uwe,

I would not advise you to switch from transparent to cluster tables. Cluster tables give you much less flexibility in terms of different access strategies, usage of indexes, etc.

And I think you can forget about reprogramming SAP DBI functionality of parsing cluster table contents in your program and moving it into a real internal table. There is simply too much you should take care of. And what if SAP decides to make a slight change in the next release. Then the upgrade will ruine your program.

So my advise - stick to the transparent tables.

Regards,

Yuri

Former Member
0 Kudos

Hi,

had a short E-Mail discussion with the performance group.

From my side, the topic is closed since the statement in the E-Mail was, that the sketched idea is not

supported by the ABAP language.

With kind regards

Uwe Gebhardt

0 Kudos

As expected, Uwe