Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

:S Table Buffering Problems

Former Member
0 Likes
2,464

Hi I am brand new to SAP/ABAP and I am struggling to get rid of a warning I get for a piece of code. Any help would be much appreciated.

Cost Center Cutback object has warnings performance check: (1). <b>Generically Buffered Key Area for Table CSKS not Completely.</b>

Here is the code the warning is pointing to

SELECT kokrs kostl INTO TABLE gs_cskskey FROM csks

WHERE bukrs EQ gs_key_costcut-bukrs

AND kokrs IN gr_kokrs

AND kostl IN gr_kostl

AND bukrs IN gr_bukrs.

Is the problem here that the table buffer is not getting properly filled for some reason???

14 REPLIES 14
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,023

Where are you seeing this warning?

Regards,

Rich Heilman

Read only

0 Likes
2,023

Im running a performance check program through the sci transaction.

Basically ive been asked to clean up code made by another company.

Read only

0 Likes
2,023

What transaction code is this again?

Regards,

Rich Heilman

Read only

0 Likes
2,023

sci

Read only

0 Likes
2,023

I don't have that transaction code in my system.

Regards,

Rich Heilman

Read only

0 Likes
2,023

I think that is the tcode for code inspector. Memory inspector and code inspector are part of latest abap version.

Can you please check the buffering settings for that table. What Sridhar said might be true. I am seeing that comment in some code here in my system. I didnt know that comment is used for this purpose.

Sridhar, thanks.

Message was edited by: Naren Somen

Read only

sridhar_k1
Active Contributor
0 Likes
2,023

First two key fields MANDT and KOKRS of the table are buffered, if u use ranges for field KOKRS in the where condition you get the buffer warning message.

use KOKRS = <variable> instead of ranges or add comment "#EC CI_GENBUFF next to KOKRS in gr_kokrs to suppress the warning.

Regards

Sridhar

Read only

Former Member
0 Likes
2,023

James,

Your table is Generic buffering table. If you read a record from a generically buffered table, all records whose the left-justified part of the key corresponds to that of this record (generic key fields) are loaded into the buffer.

This left-justified part of the key is determined in this field by entering a number n of key fields. The first n key fields of the table are thus the generic key fields.

The number entered must be between 1 and key field number -1. For example, for a table with 6 key fields, only values between 1 and 5 are allowed.

The value to be entered should be selected so that the generic areas, that is, the set of records corresponding to a record in the generic key fields are not too small.

This you can see at SE11==> Table name ==> Technical settings. There you can find one field called no of key fields there.

One ways is

Go to Change mode and change this you can avoid this warning.

Second way is

Try to pick all the key fields in seelction. ie KOKRS,KOSTL, DATBI. I believe this way you can avoid this warning.

Rgds,

TM.

Please mark points if helpful.

Read only

0 Likes
2,023

"Second way is

Try to pick all the key fields in seelction. ie KOKRS,KOSTL, DATBI. I believe this way you can avoid this warning."

-- this seems like a viable solution. Further to this, why would one choose to select all the fields and not just the required fields? What would be the performance difference if KOKRS and KOSTL are the only fields selected in terms of buffered data?

Read only

Former Member
0 Likes
2,023

It may be complaining about the fact that BUKRS is mentioned twice in the select. Since the first one tests for equality, the second one is redundant. Try removing that one and see what happens.

Rob

Message was edited by: Rob Burbank

Read only

0 Likes
2,023

Actually in all cases, it might not be redundant. You might try:


IF gs_key_costcut-bukrs IN gr_bukrs.
 SELECT kokrs kostl INTO TABLE gs_cskskey FROM csks
   WHERE kokrs IN gr_kokrs
     AND kostl IN gr_kostl
     AND bukrs EQ gs_key_costcut-bukrs.
ELSE.
* Something else.
ENDIF.

Rob

Read only

0 Likes
2,023

Thanks very much for all the help will go and try it out.

Read only

Former Member
0 Likes
2,023

Hi,

It is a <b>Information Message</b> which is in the Code Inspector. You can ignore.

Regards

vijay

Read only

0 Likes
2,023

Hi,

you can avoid that Message using the Addition <b>BYPASSING BUFFER</b>

SELECT kokrs kostl <b>BYPASSING BUFFER</b> INTO TABLE  gs_cskskey FROM csks
WHERE bukrs EQ p_bukrs
AND kokrs IN s_kokrs
AND kostl IN s_kostl
and datbi = sy-datum
AND bukrs IN s_bukrs.

try now , it won't come.

Regards

vijay