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

Data Retrieval

Former Member
0 Likes
704

Could ne 1 explain me the concepts of

1. Select Single

2. Select upto 1 rows

3. By Passing Buffer

4. Client Specified

with respect to the retrieval of the records from the database...

Regards

Nandu..

Message was edited by:

Vivekananda Varma Dandu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
657

hi,

Select single,fetches single record.

selecr upto 1 rows, will fetches first record.

by passing buffer : ignores the buffer and retrieves the data directly from the database.

client specified : if want to write a program that reads data from a client other than the client your currently logged on to.

nidhi

5 REPLIES 5
Read only

Former Member
0 Likes
657

Hi

- Select Single: it should be used only if it's possible to use all key fields in WHERE condition, because it's used the primary index;

- Select upto 1 row: it should be used if it's necessary to get only one record but it can't use all key fields in WHERE condition.

- Client Specified: it's to be used if it need to get some records stored in an another client of the same server; if the client is not specified, the system gets the data from the current client.

- By Passing Buffer: it means it want get the data from database and not from memory (buffer).

Max

Read only

Former Member
0 Likes
657

Hi,

Select Single will fetch one record.

Select upto 1row will only fetch the first recor

adding “BYPASSING BUFFER” as a comment within a SELECT statement to assure that the request will not be handled by the buffer but by the database.

Client Specified is used when we need to get some records stored in an another client of the same server;

Regards.

Read only

Former Member
0 Likes
658

hi,

Select single,fetches single record.

selecr upto 1 rows, will fetches first record.

by passing buffer : ignores the buffer and retrieves the data directly from the database.

client specified : if want to write a program that reads data from a client other than the client your currently logged on to.

nidhi

Read only

Former Member
0 Likes
657

Hai vivek............!

<b>Select Single:</b>

To read a single entry from the database, we use the select single statement.

Ex: SELECT SINGLE * ... WHERE ...

Here the first record that satisfies the where condition will be retrieved from the database.

Select sinle will not work like a loop.

but select up 1 row is a normal select statement where we are restricting the number of rows to be selected.

the SELECT statement opens a loop, which which must be closed using ENDSELECT.

A database cursor is opened implicitly to process a SELECT-loop, and is closed again when the loop is ended.

but with select single no database cursor is opened implicitly .

Both select single and select upto 1 row have the similar performance.

but comparitively select is performance effective.

<b>Bypassing buffer:</b>

when we create a table in ABAP Dictionary we need to specify the type of buffering allowed for that table in the technical attributes tab.

There are three buffering types:

Resident buffering (100%) The first time the table is accessed, its entire contents are loaded in the table buffer.

Generic buffering In this case, you need to specify a generic key (some of the key fields) in the technical settings of the table in the ABAP Dictionary. The table contents are then divided into generic areas. When you access data with one of the generic keys, the whole generic area is loaded into the table buffer. Client-specific tables are often buffered generically by client.

Partial buffering (single entry) Only single entries are read from the database and stored in the table buffer.

When you read from buffered tables, the following happens:

1. An ABAP program requests data from a buffered table.

2. The ABAP processor interprets the Open SQL statement. If the table is defined as a buffered table in the ABAP Dictionary, the ABAP processor checks in the local buffer on the application server to see if the table (or part of it) has already been buffered.

3. If the table has not yet been buffered, the request is passed on to the database. If the data exists in the buffer, it is sent to the program.

4. The database server passes the data to the application server, which places it in the table buffer.

5. The data is passed to the program.

But if u use the bypassing buffer adition in the select statemrnt the program will not check in the buffer but it will get the data directly from the database .

This addition guarantees that the data you read is the most up to date.

<b>Client Specified:</b>

By default, Open SQL statements use automatic client handling. Statements that access client-dependent application tables only use the data from the current client.

This addition disables the automatic client handling and you can use the field MANDT both in the WHERE clause and in a table work area.

using this adition we can access the data of other clients (if we are authorizer)

Regards

suresh

Read only

Former Member
0 Likes
657

Im grateful to everyone who helped in understanding these concepts

null