Tuning cluster table selection
Dear All
We are using BSEG cluster table in some of our reports. These programs are taking more time in RFBLG table and using sequential read.
I am not able to tune these selection as there is no possibility to create any index on cluster table.
Is there any method to tune the selection from cluster tables
Thanks in advance
Regards
Lakshmi
Hi,
you can try with these secondary index tabels,
1.BSAK Accounting: Secondary Index for Vendors
2.BSAS Accounting: Secondary Index for G/L Accounts
3.BSIK Accounting: Secondary Index for Vendors
4.BSID Accounting: Secondary Index for Customers
5.BSIM Secondary Index, Documents for Material
6.BSAD Accounting: Secondary index for customers
7.BSIS Accounting: Secondary Index for G/L Accounts
Prabhu Rajesh.
Similar Messages
-
Warnings Pool or cluster table selected to check/collect statistics
Dear all,
I am getting error in in db13 backup.
We are using Sap Ecc5 and
oracle 9i on Window 2003.
Production Server I am facing problem suddenly in db13 the UpdateStatsEnded with Return code: 0001 Success with warnings
BR0819I Number of pool and cluster tables found in DDNTT for owner SAPPRD: 169
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.EPIDXB
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.EPIDXC
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.GLSP
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.GLTP
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.KAPOL
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.KOCLU
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.M_IFLM
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.VBCLU
BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.VBFCL
And in db02
Missing in R/3 DDIC 11 index
MARA_MEINS
MARA_ZEINR
MCHA_VFDAT
VBRP_ARKTX
VBRP_CHARG
VBRP_FKIMG
VBRP_KZWI1
VBRP_MATKL
VBRP_MATNR
VBRP_SPART
VBRP_WERKS
Please guide steps how to build index and Pool or cluster table problem.
Thanks,
Kumar> BR0819I Number of pool and cluster tables found in DDNTT for owner SAPPRD: 169
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.EPIDXB
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.EPIDXC
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.GLSP
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.GLTP
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.KAPOL
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.KOCLU
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.M_IFLM
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.VBCLU
> BR0871W Pool or cluster table selected to check/collect statistics: SAPPRD.VBFCL
Upto Oracle 9i the rulebased optimizer was still used for Pool/Clustertables for reasons of plan stability (e.g. always take the index).
To ensure that this is the case, these tables/indexes mustn't have CBO statistics.
Therefore these tables are usually excluded from getting CBO statistics via an DBSTATC entry. You can modify this setting in transaction DB21.
> And in db02
>
>
Missing in R/3 DDIC 11 index
> MARA_MEINS
> MARA_ZEINR
> MCHA_VFDAT
> VBRP_ARKTX
> VBRP_CHARG
> VBRP_FKIMG
> VBRP_KZWI1
> VBRP_MATKL
> VBRP_MATNR
> VBRP_SPART
> VBRP_WERKS
Well, these indexes have been setup just in the database and not (how it is supposed to be) via the SE11. As the indexes have a naming-scheme, that is not supported by the ABAP Dictionary, the easiest way to get away from the warnings is to check which columns are covered by the indexes, drop the indexes on DB level and recreate them via SE11.
Best regards,
Lars -
SELECT is taking lot of time to fetch data from cluster table BSET
<Modified the subject line>
Hi experts,
I want to fetch data of some fields from bset table but it is taking a lot of time as the table is cluster table.
Can you please suggest me any other process to fetch data from cluster table. I am using native sql to fetch data.
Regards,
SURYA
Edited by: Suhas Saha on Jun 29, 2011 1:51 PMHi Subhas,
As per your suggestion I am now using normal SQL statement to select data from BSET but it is still taking much time.
My SQL statement is :
SELECT BELNR
GJAHR
BUZEI
MWSKZ
HWBAS
KSCHL
KNUMH FROM BSET INTO CORRESPONDING FIELDS OF TABLE IT_BSET
FOR ALL ENTRIES IN IT_BKPF
WHERE BELNR = IT_BKPF-BELNR
AND BUKRS = IT_BKPF-BUKRS.
<Added code tags>
Can you suggest me anymore?
Regards,
SURYA
Edited by: Suhas Saha on Jun 29, 2011 4:16 PM -
Hi,
I want to read data fields name1 name2 name3 name4 from cluster table BSEC.
I tried select statement it takes lot of time.
Let me know if theres a better way.
Any help will be rewarded with points.
Thanks,
bllueshHi,
Generally Select on cluster table will be very slow especially if u dont pass all the keys. Let me know what are all the fields u are passing to this select in WHERE clause. Also check the transperant table TCJ_CPD which has all name fields.
Thanks,
Vinod. -
How to select data from cluster table
hi experts,
I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
please advice.
maniHi Manikandan,
The following code may be helpful to understand how to select the data from cluster table.
Types: Begin of ty_kna1,
Kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_kna1,
begin of ty_bseg,
belnr type bseg-belnr,
kunnr type bseg-kunnr,
end of ty_bseg,
begin of ty_final,
belnr type bseg-belnr,
kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_final.
Data: it_kna1 type table of ty_kna1,
wa_kna1 type ty_kna1,
it_bseg type table of ty_bseg,
wa_bseg type ty_bseg,
it_final type table of ty_final,
wa_final type ty_final.
Select kunnr adrnr from kna1 into table it_kna1 where....
if sy-subrc = 0.
select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
endif.
sort it_kna1 by kunnr.
Loop at it_bseg into wa_bseg.
move wa_bseg-belnr to wa_final-belnr.
read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
if sy-subrc = 0.
move: wa_kna1-kunnr to wa_final-kunnr,
wa_kna1-belnr to wa_final-belnr.
endif.
append wa_final to it_final.
clear wa_final.
endloop.
Loop at it_final into wa_final.
write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
endloop.
Reward if useful.
Thankyou,
Regards. -
No 'order by' selection for cluster tables generates run-time
Hi together,
Basically I want to use a "select...order by" statement with table mhnd.
Since mhnd is a cluster table you can not use "...order by".
So, I use a select ... into table. I then sort this table and finally read it (index = 1)
Unfortunatly this approach generates huge run-time.
What can be done to minimize run-time?
Thanks for any helpHi Gerd,
Which cluster table you are using and what`s data you wanted? Maybe there are some FM to extract data from it.
regards,
Archer -
Performance Tuning for A016 (cluster table) Query
Dear SDNers,
Issue:
The report runs successfully sometimes and sometimes the report gets timed out.
My findings
Query which is taking a long time to execute is the query on A016(cluster Table) to fetch the condition details
SELECT kschl
evrtn
evrtp
knumh
FROM a016 INTO TABLE t_a016
FOR ALL ENTRIES IN t_ekpo
WHERE
kappl EQ c_m (Application)
AND kschl IN s_kschl
AND evrtn = t_ekpo-ebeln
AND evrtp = t_ekpo-ebelp.
where t_ekpo contains entries (4354)from ekko and ekpo based on the selection screen entries.
I see that a016 is a cluster table that is being used here and t_a016 contains (390*) records after the above fetch.
Dear readers,Please help me as to what has to be taken care of inorder to fine tune this select query?
what are the things that i need to make corrections in.
How can i make this fetch effective and faster?
Please help me with your inputs.
Regards,
SuryaD.
Edited by: SuryaD on Oct 26, 2009 6:29 PMHi,
1) Try to hit the table A016 with only unique entries of t_ekpo for EBELN and EBELP...
Use some temp table lt_ekpo = t_ekpo
i.e. sort lt_ekpo by ebeln ebelp
delete adjacent duplicates from lt_ekpo comparing ebeln ebelp.
Now write you select query as below...So that the table might be hit with less number of entries...
SELECT kschl
evrtn
evrtp
knumh
FROM a016 INTO TABLE t_a016
FOR ALL ENTRIES IN lt_ekpo
WHERE
kappl EQ c_m (Application)
AND kschl IN s_kschl
AND evrtn = lt_ekpo-ebeln
AND evrtp = lt_ekpo-ebelp.
Please note that there will be no change in the output data if you hit with duplicate entries/unique as FOR ALL ENTRIES will fetch only unique entries matching the where condition.
2) Order of where conditon fields should be same as the order in table for better performance...
3) If you find any index on the table, try to include the fields in where condition(if possible) for better performance
Hope this helps
Regards
Shiva -
How can I get data in flat file from Pool table and cluster table ?
Hi,
I am working in one Achiving project. My requirement is to get data into flat file from Cluster table and pool table.
Is there any tool avilable to download data into flat file from pool table and cluster table ?
if table name given in the selection screen then data will be downloaded into flat file.
waiting for quick response.
Best Regards,
BansidharData cannot be retrived directly form the cluster table
as the Cluster results are stored in Cluster Key say for example PCLkey
and form that Key we need to fetch the data
these clustes are not the part of PNP or PNPCE tables
for ur info kindly check -
How to check data in a cluster table?
Hello
I am new to BW and SDN.
I have to see data in a cluster table.
I went to SE11, selected data type as KOMV, it displayed table, but data content button is greyed out.
Can someone please tell me how to view the data?
Thanks
PriyaHi,
Thanks, I can see the data now.I am expecting that data should display in the 2LIS_VDKON extractor.There are two records for particular condition type.Item 10 and Item 20, but in RSA3, it is showing only one record for Item 20 and not showing for Item 10.
I have cleaned and filled the setup tables, but still no luck.
Can you please guide me, where else to look?
Thanks
Priya -
View cluster table child table calling problem!
Hi All,
I have created a cluster table with one table as header and one as item...
Header table : ZRAJ1
ITEM TABLE : ZRAJ2
ZRAJ1 :
ZPRODUCT
ZPROD_DESC
ZSTATUS
ZUSER
ZRAJ2:
ZPRODUCT
ZLABEL
This clearly shows that zraj2 is depending on ZRAJ1.
Created a cluster with these two tables.
Also, created events for ZRAJ1.
EVENT 05:
FORM create_entry.
yraj1-zuser = sy-uname.
ENDFORM.
EVENT 02:
FORM after_save.
IF yraj1-zstatus = 'L'.
CALL TRANSACTION 'ZRAJ_VIEW'.
ENDIF.
ENDFORM.
If the Zstatus is "L" in ZRAJ1, a new transaction will be called to maintain the child table zraj2.
Trasnaction 'ZRAJ_VIEW'.
REPORT 'ZRAJ_VIEW'.
INITIALIZATION.
*declaration:
DATA : itab LIKE vimsellist OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
*To call the MAintanence screen directly through the program:
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'S'
CORR_NUMBER = ' '
GENERATE_MAINT_TOOL_IF_MISSING = ' '
SHOW_SELECTION_POPUP = ' '
view_name = 'YRAJ2'
NO_WARNING_FOR_CLIENTINDEP = ' '
RFC_DESTINATION_FOR_UPGRADE = ' '
CLIENT_FOR_UPGRADE = ' '
VARIANT_FOR_SELECTION = ' '
COMPLEX_SELCONDS_USED = ' '
TABLES
dba_sellist = itab
EXCL_CUA_FUNCT =
EXCEPTIONS
CLIENT_REFERENCE = 1
FOREIGN_LOCK = 2
INVALID_ACTION = 3
NO_CLIENTINDEPENDENT_AUTH = 4
NO_DATABASE_FUNCTION = 5
NO_EDITOR_FUNCTION = 6
NO_SHOW_AUTH = 7
NO_TVDIR_ENTRY = 8
NO_UPD_AUTH = 9
ONLY_SHOW_ALLOWED = 10
SYSTEM_FAILURE = 11
UNKNOWN_FIELD_IN_DBA_SELLIST = 12
VIEW_NOT_FOUND = 13
OTHERS = 14
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
it is calling, ok no issues but it is not allowing me to create a new entry in the child table zraj2.
Error: Table is locked by the user Raj.Checked in SM12 yes there is an lock entry for the table zrst(cluster), zraj1, zraj2.
Question :
By default in the execution of cluster will there be a lock in all the child table as well.
if so how to create new entries....
For your information : Standalone it is working fine.That is if i execute ZRAJ1 in SM31 i am able to create new entries..
Can any one provide some input on this............
Tahnks,
raj.I don't know any direct transaction for your purpose, but you can use this program RSTXSCRP to download your form into the local file and than you can open it to view.
Regards,
Naimesh Patel -
To read data from cluster table urgent
i need to get personnel number(PERNR) from BSEG table which is a CLUSTER TABLE
what else i have to add in here to get personnel number(PERNR)
this code is giving no data only lots of ZEROS
FORM getexpcode1 TABLES in_tab21 STRUCTURE itcsy
out_tab21 STRUCTURE itcsy.
DATA : w_belnr LIKE bseg-belnr,
w_bukrs LIKE bseg-bukrs,
w_gjahr LIKE bseg-gjahr,
w_pernr like bseg-pernr,
w_invnos(255).
Read company code
READ TABLE in_tab21 INDEX 1.
IF sy-subrc = 0.
w_bukrs = in_tab21-value.
ENDIF.
Read document number
READ TABLE in_tab21 INDEX 2.
IF sy-subrc = 0.
w_belnr = in_tab21-value.
ENDIF.
Read Fiscal Year
READ TABLE in_tab21 INDEX 3.
IF sy-subrc = 0.
w_gjahr = in_tab21-value.
ENDIF.
SELECT pernr FROM bseg
INTO w_pernr
WHERE bukrs = w_bukrs
AND belnr = w_belnr
AND gjahr = w_gjahr.
ENDSELECT.
READ TABLE in_tab21 INDEX 1.
out_tab21-value = w_pernr.
MODIFY out_tab21 INDEX 1 TRANSPORTING value.
ENDFORM. "GETEXPCODE1hi,
try:
SELECT pernr FROM bseg
INTO w_pernr
WHERE bukrs = w_bukrs
AND belnr = w_belnr
AND gjahr = w_gjahr
AND PERNR <> SPACE.
ENDSELECT.
A.
Message was edited by:
Andreas Mann -
Regarding performance on cluster tables.vvv.urgent!
friends,
i know that cluster tables cannot be joined with transparent tables....
however i need performance improvement for the following code....
if possible is there a way to join bkpf or bseg to improve performance....can we create view foe bkpf and bseg if yes then how.....
please modify the below code for improvement in performance.
START-OF-SELECTION.
SELECT bukrs belnr gjahr budat FROM bkpf INTO TABLE i_bkpf
WHERE bukrs = p_bukrs AND "COMPANY CODE
gjahr = p_gjahr AND "FISCAL YEAR
budat IN s_budat. "POSTING DATE IN DOC
IF sy-subrc = 0.
SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
i_bseg FOR ALL ENTRIES IN i_bkpf
WHERE bukrs = i_bkpf-bukrs AND "COMPANY CODE
belnr = i_bkpf-belnr AND "A/CING DOC NO
gjahr = i_bkpf-gjahr AND "FISCAL YEAR
hkont = p_hkont. "General Ledger Account"
IF sy-subrc = 0.
SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
i_bseg1 FOR ALL ENTRIES IN i_bseg
WHERE bukrs = i_bseg-bukrs AND "COMPANY CODE
belnr = i_bseg-belnr AND "A/CING DOC NO
gjahr = i_bseg-gjahr. "FISCAL YEAR
ENDIF.
ENDIF.
IF NOT i_bseg1[] IS INITIAL.
LOOP AT i_bseg1.
IF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'S'.
v_sumgl = v_sumgl + i_bseg1-dmbtr.
ELSEIF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'H'.
v_sumgl = v_sumgl - i_bseg1-dmbtr.
ELSEIF i_bseg1-hkont NE p_hkont .
IF i_bseg1-shkzg = 'H'.
i_bseg1-dmbtr = - i_bseg1-dmbtr.
ENDIF.
i_alv-hkont = i_bseg1-hkont.
i_alv-dmbtr = i_bseg1-dmbtr.
APPEND i_alv.
v_sumoffset = v_sumoffset + i_bseg1-dmbtr.
ENDIF.
ENDLOOP.
regards
Essam.([email protected])Hi there ...
I have read the note - thats where I found the link to the trace note 286496.1 - on now to setup a trace
But I still need an explanation for the methods (1,2,4 etc)
regards
Mette -
Hi Experts,
Can You plz tell How to import/read data from cluster table? Plz give me the syntaxes also..
Thanx in advance.use read statement i don't think in cluster table there is any restruction for read and select u can use open sql but not join in cluster table .
Database table defined in the ABAP Dictionary, whose version on the database is not only assigned to one table defined in the ABAP Dictionary. Several cluster tables are assigned to a table cluster in the database. The intersection of the key fields of the cluster tables forms the primary key of the table cluster. The other columns of the cluster tables are stored in compressed form in a single column VARDATA of the table cluster. <b>You can access cluster tables only via Open SQL, and only without using joins.</b> -
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 AMHello 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 -
Problem retreving data from cluster table
Hi friends,
Iam facing a problem while retreving data from a cluster table..
select knumv
kposn
krech
kawrt
kbetr
waers
kpein
kmein
kwert
from konv
into table gt_konv
where knumv in s_agnm.
In s_agnm i have 8 entries ie: iam giving manually 8 entries in s_sgnm-low.
If i do the above way iam getting exactly the 82 entries which i have in KONV table.. This is perfect..
But when iam using for all entries iam getting only 58 records from the KONV table..
ie :
SELECT KNUMV
KPOSN
KRECH
KAWRT
KBETR
WAERS
WAERS
KPEIN
KMEIN
KWERT
FROM KONV
INTO TABLE ITAB1
FOR ALL ENTRIES IN ITAB
WHERE KNUMV = ITAB-F1
Here F1 is the field which is same as S_SGNM as above and it also contains same number of records as above
Now when iam running the 2nd select statment iam getting only 58 entries ... instead it should get 82 entries as above...
Can any one tell me how to correct..
Regards
Kumareven if i use all the key fields , its giving me the same results 58 reocrds, instead it should give me 82.
select knumv
kposn
stunr
zaehk
from konv
into table gt_tybh
where knumv in s_agnm.
if gt_tybh is not INITIAL.
sort gt_tybh by agreement_number kposn stunr zaehk.
select knumv
kposn
krech
kawrt
kbetr
waers
kpein
kmein
kwert
from konv
into table gt_konv
for all entries in gt_tybh
where knumv = gt_tybh-agreement_number and
kposn = gt_tybh-kposn and
stunr = gt_tybh-stunr and
zaehk = gt_tybh-zaehk.
In the above iam getting all the 82 records for the select-options s_sgnm..
later iam trying to get the other fields form the same konv table by using for all entries... here even if iam using all the key fields also its not getting me the total 82 records...
Initially for s_sgnm which contains 8 values , for those 8 values iam getting 82 records it table gt_tybh. But later when iam using for all entries iam not getting those 82 records in the 2nd select statment in the internal table gt_konv.
Why is this happening...
can any one correct it..
Regards
Kumar
Maybe you are looking for
-
Is there a network version of Adobe Acrobat Pro 9?
Is there a network version of Adobe Acrobat Pro 9? If not, are their volume licenses available? What additional adobe products need to be purchased in order to run Adobe Acrobat 9 on a network? Is there a licensing system that allows, for example, 4
-
Dual CPU fans in IQ816 Question
I have received the fatal error message indicating that my wife's IQ816 CPU fan is dead. When I opened up the unit I found that one of the 2 CPU fans was indeed not functioning (FYI there are a total of 3 fans in the IQ816s). The fans part number (o
-
When opening import manager, it is used to through an Error message?
Hi All, I have extracted xml file using generic extraction from SRM system, now when i want to import this xml file using my import manager.. while at opening import manager it is throwing error message. Error Message: Logon Error : Error: Can't open
-
URGENT - Web settings for 6270?
Hi All, I am trying to enter web settings manually because my provivder cannot send setup sms on my mobile. I did the following: Settings>>Configuration>>Personal Config. Settings>>options>> Add New Web Account Name: My Web Home Page: nokia.com Use p
-
About Leveraging database security with JPA...
I've googled the web but haven't find anything about considering the security as an aspect of the development with JPA and TopLink Essentials as you can integrate VPD with Toplink... http://www.oracle.com/technology/products/ias/toplink/doc/1013/main