2006 Nov 19 12:52 PM
Hi Experts,
1. Can anyone explain what cluster are ?
2. How to access them using ABAP coding?
Kindly mail any materials (if available) to these mail addresses....
Thanks for the same,
Best Regards,
Aravind
2006 Nov 21 10:58 AM
hi,
More at this link.
http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
rgds
Anver
pls mark if helpful
Hi Experts,
1. Can anyone explain what cluster are ?
2. How to access them using ABAP coding?
Kindly mail any materials (if available) to these mail addresses....
Thanks for the same,
Best Regards,
Aravind
2006 Nov 19 1:15 PM
Hi,
1) cluster tables are used to store data related to table changes or
system specific data.
example of cluster table :komv,cdhdr,cdpos.
when any changes are made in transaction relevant tables get updated
this change information is stored in cdhdr,cdpos.
inner join is not possible with cluster tables.
2) select query can be written on cluster tables as any other transparent
tables to fetch data with abap coding.
cluster table performance may be issue as sixe of tale will be huge.
use full key to access cluster table
for material check help.sap.com
Regards
amole
2006 Nov 21 10:56 AM
dataclusters r nothing but database tables which store raw data.
firstly u need to create a cluster table :
a cluster table has a fixed format as follows ,
If the table contains client-specific information, the first field must have the name MANDT (DD-Typ CLNT) .
The field RELID (Dictionary type CHAR, length 2) contains the area ID.
These are followed by table-specific key fields which must all be of type CHAR. They contain the freely definable key of the data clusters.
The field SRTF2 (Dictionary type INT4) is the last field in the key. Its values are assigned automatically through export/import operations.
This is followed by any number of fields which are not affected by the EXPORT statement. You must assign values to these fields explicitly before an export.
The data part ends with the fields CLUSTR (Dictionary type INT2) and CLUSTD (Dictionary type LRAW). Both fields are assigned values automatically through export/import operations.
now all u need to do is store ur program variables in this table as follows .
gs_variant_key-report = sy-repid.
gs_variant_key-myvariant = 'ZTRYING'.
EXPORT e_a = gv_a
e_b = gv_b
e_c = gv_c
et_tab = gt_tab
TO DATABASE zswapclustertab(s1) ID gs_variant_key .
where 's1' is rel-id and gs_variant_key is my own additional key .
similarly to retrieve these values use the foll code .
import e_a = gv_a
e_b = gv_b
e_c = gv_c
et_tab = gt_tab
from DATABASE zswapclustertab(s1) ID gs_variant_key .
i think this should help u .
if helpful then plz reward points .
2006 Nov 21 10:58 AM
hi,
More at this link.
http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
rgds
Anver
pls mark if helpful
2006 Nov 21 11:01 AM
Hi aravindakshan,
1. Can anyone explain what cluster are ?
Clusters are nothing but tables.
They store the data in RAW/ENCODED format,
and hence, we cannot understand by directly seeing the records.
(They are used bcos LOTS of data needs to be entered in 1 record,
so the special field RAW/ENCODED is used to store all this data, in the table)
2. How to access them using ABAP coding
For accessing them, we should know in what format
the data was put inside the cluster table.
Then we have to use the IMPORT command to get the data.
regards,
amit m.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |