Application Development 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: 

client specified

Former Member
0 Kudos

Hi experts,

wht is the use client specified in a select statement. If use this stmt. will it effect the program in Production.

Thanks and Regards,

alson

2 REPLIES 2

Former Member
0 Kudos

Yes , it effects the program...

When u use it , in select staement u can use mandt field in where clause..

DELETE [FROM] (<name>) [CLIENT SPECIFIED] <lines>.

where the field <name> contains the name of a database table defined in the ABAP Dictionary.

You can use the CLIENT SPECIFIED addition to disable automatic client handling.

It enables us to process data form <b>other than the current client</b> also ..

Normally in database for spfli table the data will be stored for all the clients..

But when u want to select data from database for spfli generally onli the data under the current client will be retrieved... But table in database contains data for all the cllients.

<b>Try executing these codes u will come to know & compare the results..

800 is my current client...</b>

<b>*******************************************</b>

data t_spfli type standard table of spfli with header line.

select *

from spfli client specified

into table t_spfli

where mandt = '800'.

loop at t_spfli.

write : / t_spfli-carrid, t_spfli-connid.

endloop.

<b>*******************************************</b>

data t_spfli type standard table of spfli with header line.

select *

from spfli

into table t_spfli

where mandt = '800'.

loop at t_spfli.

write : / t_spfli-carrid, t_spfli-connid.

endloop.

H<b>ere u will get an error... </b>

<b>*******************************************</b>

data t_spfli type standard table of spfli with header line.

select *

from spfli client specified

into table t_spfli

where mandt ne '800'.

loop at t_spfli.

write : / t_spfli-carrid, t_spfli-connid.

endloop.

<b>reward if it helps u..</b>

sai ramesh

Former Member
0 Kudos

alson,

Suppose you have logged in 400 client.

Whenevr you write the select statements,you will get the data related to 400 client based on your conditions.

But if you specify CLIENT SPECIFIED statement ,irrespect of your login client you will get all clients data based on your conditions.

-


Pls. see the below ..

As already mentioned, you can switch off the automatic client handling in Open SQL statements using a special addition. In the SELECT statement, the addition comes after the options in the FROM clause:

SELECT... FROM <tables> CLIENT SPECIFIED. ..

If you use this addition, you can then address the client fields in the individual clauses of the SELECT statement.

Pls. reward if useful