cancel
Showing results for 
Search instead for 
Did you mean: 

slow data feching from a004 / kapol pooled table .

niroj_singha
Explorer
0 Kudos

Hi all,

i am trying to fetch data 'knumh' from a004 table .  but access to this table is very slow .

do you know some method to fetch records fast .

my syntex :

IF ITAB[] IS NOT INITIAL .

SELECT KSCHL VKORG VTWEG MATNR DATBI DATAB KNUMH
   FROM A004
   INTO TABLE ITAB_3
   FOR ALL ENTRIES IN ITAB
   WHERE KSCHL IN ('ZMRP' , 'ZLBJ' , 'ZMLB')
   AND VKORG EQ ITAB-VKORG
   AND VTWEG IN ('10' , '16' , '21' , '22')
   AND MATNR EQ ITAB-MATNR .

ENDIF .

Thank you in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Jelena
Active Contributor
0 Kudos

All kinds of performance issues have already been discussed many times in the ABAP forum. It's the same old thing - add more key fields (e.g. KAPPL is missing here), add more selection criteria, if possible (e.g. won't you need to check the date range too?). Get a qualified ABAPer to work on the code. Maybe consider archiving if there are too many old entries.

Or, of course, there could also be a completely different solution if only you shared the actual business purpose, as Lakshmipathi suggested above, instead of copying the same question...

Lakshmipathi
Active Contributor
0 Kudos

Explain what exactly you were trying to do so that suitable suggestion can be given.  Hope, you have already searched SCN before posting any repeated query; as otherwise, it will be removed

G. Lakshmipathi

niroj_singha
Explorer
0 Kudos

i am trying to fetch condition record no. from a004 .

IF ITAB[] IS NOT INITIAL .

SELECT KSCHL VKORG VTWEG MATNR DATBI DATAB KNUMH
   FROM A004
   INTO TABLE ITAB_3
   FOR ALL ENTRIES IN ITAB
   WHERE KSCHL IN ('ZMRP' , 'ZLBJ' , 'ZMLB')
   AND VKORG EQ ITAB-VKORG
   AND VTWEG IN ('10' , '16' , '21' , '22')
   AND MATNR EQ ITAB-MATNR .

ENDIF .


i use this code but . its take too much time ..


if i pass matnr from selection screen its working .but when i use to fech all metarial's data its not working .

yes , i found same question by others but not answered .

thank you .