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

Buffer technique

Former Member
0 Likes
1,051

Sir,

Like to know how Buffer is useful to reduce memory load and how it is useful in realtime plz explain with example.

3 REPLIES 3
Read only

Former Member
0 Likes
637

We have 3 types of buffering

There are the following types of buffering:

single-record buffering

generic area buffering

full buffering

single-record buffering

For large tables where there are frequent single-record accesses (using SELECT SINGLE ...). The size of the records being accessed should be between 100-200 KB.

For comparatively small tables for which the access range is large, it is normally advisable to opt for full buffering. Only one

database access is required to load such a table for full buffering, while single-record buffering calls for a very large number of table accesses.

generic buffering

A table should be buffered generically if usually only certain areas of the table are required. The individual generic areas are treated like independent tables that are fully buffered. Refer also to the text on complete buffering.

he generic key area should be selected so that the generic areas are not too small to prevent too may generic areas being produced. If there are only a few records for each generic area, it is more efficient to use full buffering.

Generic buffering only makes sense if the table is accessed by a specified generic key. If, when an access takes place, a field of the generic key is not supplied with a value, the buffer is ignored and the records are read directly from the database.

Language-specific tables are an example of good use of generic buffering (with the language key field as generic key area).

full buffering

For tables up to 30 KB in size. If a table is accessed frequently, but all accesses are read accesses, this value can be exceeded.

For larger tables where large numbers of records are frequently

accessed. However, if the application program is able to formulate an extremely selective WHERE condition using a database index, it may be advisable to dispense with full buffering.

For tables with frequent accesses to data not contained in the

table. Since all records are contained in the buffer, a quick

decision can be made as to whether or not the table contains a

record for a specific key.

Reward points if useful

Read only

Former Member
0 Likes
637

Definition

The name table (nametab) contains the table and field definitions that are activated in the SAP System. An entry is made in the Repository buffer when a mass activator or a user (using the ABAP Dictionary, Transaction SE11) requests to activate a table. The corresponding name table is then generated from the information that is managed in the Repository.

The Repository buffer is mainly known as the nametab buffer (NTAB), but it is also known as the ABAP Dictionary buffer

The description of a table in the Repository is distributed among several tables (for field definition, data element definition and domain definition). This information is summarized in the name table. The name table is saved in the following database tables:

• DDNTT (table definitions)

• DDNTF (field descriptions)

The Repository buffer consists of four buffers in shared memory, one for each of the following:

Table definitions TTAB buffer Table DDNTT

Field descriptions FTAB buffer Table DDNTF

Initial record layouts IREC buffer Contains the record layout initialized depending on the field type

There are two kinds of table buffers:

• Partial table buffers

• Generic table buffers

Check this link for more details.

http://www.abapprogramming.blogspot.com/2007/11/buffering-in-sap-abap.html

Regards.

Read only

Former Member
0 Likes
637

Hi,

You must define whether and how a table is buffered in the technical settings for the table . There are three possibilities here:

1.Buffering not permitted:

Table buffering is not permitted,

for example because application programs always need the most recent data from the table or the table is changed too frequently.

2.Buffering permitted but not activated:

Buffering is permitted from the business and technical points of view. Applications which access the table execute correctly with and without table buffering.

Whether or not table buffering will result in a gain in performance

depends on the table size and access profile of the table (frequency of the different types of table access).

Table buffering is deactivated because it is not possible to know

what these values will be in the customer system. If table buffering would be advantageous for the table size and access profile of the table, you can activate it in the customer system at any time.

3.Buffering activated: The table should be buffered. In this case

you must specify a buffering type.

types of buffering:

1.Single-Record buffering

Single-record buffering should be used particularly for large tableswhere only a few records are accessed with SELECT SINGLE. The size of the records being accessed should be between 100 and 200 KB.

2.Full buffering

Full buffering is recommended in the following cases:

Tables up to 30 KB in size.For smaller tables that are

accessed frequently. This is because only one database access is necessary to load such a table with full buffering.

3.Generic buffering

With generic buffering, all the records in the buffer whose generic key fields match this record are loaded when one record of the table is accessed. The generic key is a part of the primary key of the table that is left-justified.

hope it would be helpul.

regards,

p.sreelakshmi.