Sub topic 3
Client-dependent versus cross-client settings
This chapter assumes you know what an SAP client is, can run transactions in SAP GUI, and understand database tables and keys. It covers how a table's design decides whether a configuration change affects one client or the whole system.
The working model
Every table in the SAP database either carries the client as part of its key or it doesn't.
- A client-dependent table has
MANDT(the client field) as the first key field. Each client holds its own rows. - A cross-client table has no
MANDTfield. Its rows are shared by every client in the system.
Most Customizing tables are client-dependent. Company codes, plants and payment terms all live in client-dependent tables, so you can configure client 100 differently from client 200 on the same system.
Cross-client data includes repository objects such as programs and table definitions. Some Customizing is also cross-client, for example certain system-wide tables and tools maintained in the IMG. A change to cross-client data affects every client at once, whoever made it.
What Open SQL does for you
In ABAP, Open SQL applies client handling automatically. A SELECT on a client-dependent table returns only rows for the current logon client. You don't write a MANDT condition.
REPORT zdemo_company_codes.
SELECT bukrs, butxt, ort01, waers
FROM t001
ORDER BY bukrs
INTO TABLE @DATA(company_codes).
LOOP AT company_codes INTO DATA(cc).
WRITE: / cc-bukrs, cc-butxt, cc-ort01, cc-waers.
ENDLOOP.Run this report in two clients and you may see two different lists, even though the program exists only once. The program is cross-client. The data it reads is client-dependent.
Predicting the effect of a change
Before you change a table, work out its scope. Check the table's field list in transaction SE11. If the first field is MANDT, the table is client-dependent.
| Table type | Who sees the change | Typical example |
|---|---|---|
| Client-dependent | Only the client where you made it | Company codes in `T001` |
| Cross-client | All clients in the system | Repository objects, some system-wide settings |
Common errors
- Assuming a change reached every client. You configure a setting in client 100 and then find client 200 behaves as before. The table was client-dependent.
- Changing cross-client data in a shared system. In a development system with several clients, one consultant's cross-client change affects colleagues in other clients immediately.
- Forgetting the protection setting. The client settings in SCC4 can forbid cross-client changes. A "not allowed" message when you save is usually this setting, not a fault.
The next chapter builds on this by showing how the IMG is organized, so you can tell which activities touch which kind of table.
Exercise
You change a payment term in client 100 of the development system. A colleague logged on to client 200 of the same system doesn't see the change. Why, and what would be different if the table were cross-client?
Show answer
The payment term table is client-dependent. Its rows carry MANDT, so client 100 and client 200 each hold their own copy, and your change only affects client 100. If the table were cross-client, it would have no MANDT field, there would be one shared set of rows, and your colleague would see the change immediately.