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 independent select querie

Former Member
0 Kudos

Can i fetch data from two clients in a report? Can u provide the code for that or if it is not possible please give me the correct procedure to fetch the data in step by step.

thanx in advance

Shiba

4 REPLIES 4

Former Member

Hi,

Yes we can select data irrespective of client :

SELECT * FROM SPFLI CLIENT SPECIFIED

WHERE MANDT BETWEEN '001' AND '003'.

...

ENDSELECT.

Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG.

Former Member
0 Kudos

Yes we can selct data from table irrespective of client:

1) If you do not know client number just simple use :

SELECT * FROM MARA.... there is no need of specifiying any client and you will get mulitple client data selected.

2)If you know specific clients to be included for selection Use :

SELECT * FROM SPFLI CLIENT SPECIFIED

WHERE MANDT BETWEEN '001' AND '003'.

...

ENDSELECT.

0 Kudos

Hi,

I am not agreed with Rajesh for the first point.

Whenever you write SELECT * FROM ...you current client get into consideration always & records for current client gets fetched.

IF you want records from more than one client you need to specify using SELECT * FROM SPFLI CLIENT SPECIFIED..

Regards,

Dharitree

RenjithKumar
Advisor
Advisor

Hi Rajesh ,

Your explanation for first query is not acceptable.

Eg :

Your company have 2 clients 101 ,102

You are working in Client 101.

If you write following query in client 101.

<b>select * from mara</b>

This query will bring only data from the client 101.

This will not bring data from client 102.

You must specify client number , it is needed .

Thanks & Regards

Renjith Kumar