cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

extracting data from reference database table is taking long time

former_member228520
Participant
0 Likes
1,355

while extracting data from table /scdl/db_refdoc is taking long times.

some this this is going for dump also.

in selection parameters of reference document - I have provided only one ERP inbound delivery document number.

any specific reasons ?

Sastry

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member230160
Active Participant
0 Likes

Hi Sastry,

if you only specifc the field REFDOCNO of table /SCDL/DB_REFDOC then no index will be used at all. So a full table scan is done (which will then also explain your runtime).

This is a normal behavior of any database.

To improve the performance either use the key fields (which is I assume not what you want) or use an existing index.

There is for example the index REF of this database table.

There you will see that the index has the following fields:

DOCCATDocument Category
REFDOCCATReference Document Category
REFDOCNOReference Document Number
REFITEMNOReference Item Number
REFBSKEYKey Name of Business System

So besides REFDOCNO you should specify DOCCAT (if you e.g. want to select PDI= inbound deliveries or PDO= outbound deliveries,...) and REFDOCCAT (so that the system knows that you mean the ERP inbound delivery number, as there are also many other reference document numbers).

For example /SCDL/IF_DL_DOC_C=>SC_DOCCAT_ERP is the constant for the ERP document number.

In general please use the existing views rather then the DB table. Here: /SCDL/V_REFDOC

Some generic information about performance:

ABAP Performance tips - Contributor Corner [Read-only] - SCN Wiki

Best regards

Markus