How data is stored in cluster table?

Showing Answers 1 - 15 of 15 Answers

maxiee

  • Jun 24th, 2005
 

In cluster table each field is acts as a record and it can store multiple records.

Sandeep

  • Sep 1st, 2005
 

With the help of varkey and vardata.

abhishek

  • Mar 31st, 2006
 

A cluster table conatins data from mulitple DDIC tables.

It stores data as a name value pair ( varkey, vardata)

  Was this answer useful?  Yes

Navin

  • Apr 9th, 2007
 

I think the answer

In cluster table each field is acts as a record and it can store multiple records.

is incorrect

If you're talking about tables like PCL1 and such, that's basically like this:

First you create a table like in this link: http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c2c358411d1829f0000e829fbfe/frameset.htm. Alternatively you might use one already created on your system.

On a nutshell all your data is written to the CLUSTD field.

If the data you're trying to write is bigger than that field, several records will be created in order using the field SRTF2.

Example: Imagine your data is 4k long, but CLUSTD is of 3k lenght, then the first 3K will be saved on the record where SRTF2=0 and the reminder 1K will be saved on the record where SRTF2=1.

Now, besides SRTF2, what sets the records appart? You have two other fields that enables you that. One is RELID (char with length of 2) and a the field right next to that (let's call it RELI2 for the time being).

RELI2 will have the name and size you want as long as it is of type char. On the cluster PCL1 it's the field SRTFD. It must come after RELID and before SRTF2 - THIS IS IMPORTANT.

After that how are those fields filled?

Let's assume you're using PCL1. When you write:

EXPORT data TO DATABASE pcl1(zz) ID 'this is my id 000000'.
1 - data goes to CLUSTD;
2 - 'ZZ' goes to RELID;
3 - 'this my id 000000' goes to SRTFD (what we called RELI2 at first);
4 - SRTF2 will be 0 from N-1 records (Considering that N records where needed in order to receive data completely).

If you write two times an EXPORT with the same ID, the 2nd one will overwrite the 1st EXPORT. Be sure to manage your IDs accordingly.

I hope it helped.

Best regards,
Paulo

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions