01-21-2008 4:44 AM
hi all,
what is the syntax to read the data from datadase table of another client?
01-21-2008 5:14 AM
........CLIENT SPECIFIED addition in SELECT statment
Effect
Automatic client handling is suspended. This enables
you, for client-dependent tables, to search for data in all clients. The client field is treated as a standard table field for which you can specify suitable conditions in the WHERE clause .
If you are only reading from a single table, the CLIENT SPECIFIED addition must come directly after the name of the table; in the case of JOINs, the addition must come after the ON condition.
Example
Output of a list of all materials in client 3:
DATA: WA_mara TYPE mara.
*SELECT * FROM mara CLIENT SPECIFIED INTO WA_mara*
WHERE MANDT = '003'.
WRITE: / WA_mara-matnr, WA_mara-mtart.
ENDSELECT.
01-21-2008 5:14 AM
........CLIENT SPECIFIED addition in SELECT statment
Effect
Automatic client handling is suspended. This enables
you, for client-dependent tables, to search for data in all clients. The client field is treated as a standard table field for which you can specify suitable conditions in the WHERE clause .
If you are only reading from a single table, the CLIENT SPECIFIED addition must come directly after the name of the table; in the case of JOINs, the addition must come after the ON condition.
Example
Output of a list of all materials in client 3:
DATA: WA_mara TYPE mara.
*SELECT * FROM mara CLIENT SPECIFIED INTO WA_mara*
WHERE MANDT = '003'.
WRITE: / WA_mara-matnr, WA_mara-mtart.
ENDSELECT.
01-21-2008 5:53 AM
Verma,
If you want particular client..
SELECT *
INTO wa
FROM dbasetable CLIENT SPECIFIED
WHERE mandt = '000'.
If you want all clients
SELECT *
INTO wa
FROM dbasetable CLIENT SPECIFIED.
Don't reward if useful....