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

CLIENT SPECIFIED

Former Member
0 Likes
5,394

i saw two statements in SAP abap objects performance examples(access through SE38):

SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA

WHERE CARRID = 'LH'

AND CONNID = '0400'.

ENDSELECT.

Runtime: 2.689.736 microseconds

______________________________________________

SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA

WHERE MANDT IN ( SELECT MANDT FROM T000 )

AND CARRID = 'LH'

AND CONNID = '0400'.

ENDSELECT.

Runtime: 81.329 microseconds

And usually wo do not have to specify the field "MANDT", and does the field really work like the above way?

1 ACCEPTED SOLUTION
Read only

Former Member
3,113

A single SAP system can manage the application data for several separate areas of a business (for example, branches). Each of these commercially separate areas in the SAP system is called a client, and has a number. When a user logs onto the SAP Web AS ABAP, they specify a client. The first column in the structure of every database table containing application data is the client field (MANDT, from the German word for client). It is also the first field of the table key. Only universal system tables are client-independent, and do not contain a client name.

By default, Open SQL statements use automatic client handling. Statements that access client-dependent application tables only use the data from the current client. You cannot specify a condition for the client field in the WHERE clause of an Open SQL statement. If you do so, the system will either return an error during the syntax check or a runtime error will occur. You cannot overwrite the MANDT field of a database using Open SQL statements. If you specify a different client in a work area, the ABAP runtime environment automatically overwrites it with the current one before processing the Open SQL statement further.

Should you need to specify the client specifically in an Open SQL statement, use the addition

... CLIENT SPECIFIED ....

directly after the name of the database table. 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.

7 REPLIES 7
Read only

Former Member
3,114

A single SAP system can manage the application data for several separate areas of a business (for example, branches). Each of these commercially separate areas in the SAP system is called a client, and has a number. When a user logs onto the SAP Web AS ABAP, they specify a client. The first column in the structure of every database table containing application data is the client field (MANDT, from the German word for client). It is also the first field of the table key. Only universal system tables are client-independent, and do not contain a client name.

By default, Open SQL statements use automatic client handling. Statements that access client-dependent application tables only use the data from the current client. You cannot specify a condition for the client field in the WHERE clause of an Open SQL statement. If you do so, the system will either return an error during the syntax check or a runtime error will occur. You cannot overwrite the MANDT field of a database using Open SQL statements. If you specify a different client in a work area, the ABAP runtime environment automatically overwrites it with the current one before processing the Open SQL statement further.

Should you need to specify the client specifically in an Open SQL statement, use the addition

... CLIENT SPECIFIED ....

directly after the name of the database table. 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.

Read only

0 Likes
3,113

ANY LAST WISHES....?

Read only

0 Likes
3,113

Good Bye!

Take care bro

Read only

matt
Active Contributor
0 Likes
3,113

So sad. He was so young.

Read only

0 Likes
3,113

Hey you are not counting me.....

I am in Enhancements forum..i missed this...

Read only

0 Likes
3,113

Come and Join here..

Read only

Former Member
0 Likes
3,113

Julius may be able to improve your Performance and Tune your user ID Soon

Cheers