10-13-2006 6:54 AM
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
10-13-2006 7:03 AM
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.
10-13-2006 7:06 AM
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.
10-13-2006 7:22 AM
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
10-13-2006 7:45 AM
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