Sub topic 7
What an IMG activity changes: tables and views
This chapter covers what happens in the database when you save a change in an IMG activity. It assumes you can navigate SAP GUI and transaction codes, know what an SAP client is, and understand database tables and keys. You should also know the difference between Customizing and Workbench objects from earlier chapters.
An IMG activity is a table editor with context
Most IMG activities do not run special configuration logic. They open a maintenance dialog for one or more database tables. When you save, the dialog writes rows to those tables. The system then reads those rows at runtime to decide how business processes behave.
For example, the activity "Edit Company Code" under Enterprise Structure maintains rows in table T001. A posting transaction later reads T001 to find the currency and chart of accounts for a company code. The "configuration" is the table content.
This has a practical consequence. To understand what a change did, find out which tables the activity writes to and which keys it set. The activity text will not tell you that.
Customizing tables
A Customizing table is a transparent table whose contents are configuration data. Its delivery class tells the system how to treat its data. Two classes matter most here.
| Delivery class | Meaning | Typical use |
|---|---|---|
| C | Customer table. Only the customer maintains the data. | Company codes, plants, document types |
| G | Customer table, SAP may deliver rows. Customer rows live in a protected namespace. | Settings with SAP default entries |
| E | Control table. SAP and the customer both maintain entries. | Control data with mixed ownership |
| A | Application table for master and transaction data. | Business documents, not configuration |
The delivery class matters for transports. During client copy and for change recording, the system uses it to decide whether table contents count as Customizing. Class A tables hold business data and are not recorded in Customizing requests.
You can check the delivery class of a table in SE11 on the Delivery and Maintenance tab.
Client-dependent and cross-client tables
The first key field of a client-dependent table is MANDT, the client. Each client holds its own rows. A change in client 100 is invisible in client 200 of the same system.
A table without MANDT as its first key field is cross-client. Its rows are shared by every client in the system. A change made from any client affects all clients.
Open SQL hides this difference when you read data. The two example programs below read T001 and T000 without a MANDT condition. The first returns only rows for the current logon client.
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.T001 is client-dependent. Logging on to a different client of the same system gives a different list, because the rows belong to different clients.
Table T000 is the exception that shows the rule. It lists the clients themselves and carries the settings you maintain in SCC4. You read it with an explicit MANDT condition:
REPORT zdemo_client_settings.
SELECT SINGLE mandt, mtext, cccategory, cccoractiv, ccnocliind
FROM t000
WHERE mandt = @sy-mandt
INTO @DATA(client_settings).
IF sy-subrc = 0.
WRITE: / client_settings-mandt, client_settings-mtext,
/ 'Role:', client_settings-cccategory,
/ 'Change recording:', client_settings-cccoractiv,
/ 'Cross-client changes:', client_settings-ccnocliind.
ENDIF.The fields CCCORACTIV and CCNOCLIIND are the flags that decide whether Customizing changes are recorded and whether cross-client objects may be changed. The SCC4 chapter covers them in detail.
Why the distinction matters for configuration work
Before changing a table through an IMG activity, decide which kind it is. A client-dependent change affects one client. A cross-client change affects every client in the system, including ones used by other teams for testing or training.
In practice, the system warns you. When an activity touches cross-client data, the dialog may show a message that the table is cross-client, and the change is only allowed if SCC4 permits it.
Maintenance views and view clusters
Many IMG activities do not edit a table directly. They use a maintenance view or a view cluster, both defined in SE11 and SE54.
- A maintenance view joins one or more tables and exposes selected fields for editing. A change through the view writes to the underlying tables.
- A view cluster groups several related views into one hierarchical dialog, with navigation between the levels. Activities with a tree on the left and detail screens on the right usually use a cluster.
- A table maintenance dialog is the generated program and screens for a table or view. You can reach it directly in SM30 by entering the view or table name, if the dialog exists.
SM30 and the IMG activity usually open the same generated dialog. The IMG route adds documentation, project assignment and authorization checks around it.
A view can span several tables
A view that joins a text table and a key table shows one row in the dialog, but a save may write one row in each table. Both rows go into the same request. This is why a Customizing request can contain table entries you never opened by name.
How an IMG save becomes a request entry
When you save in a maintenance dialog and the client settings allow recording, the system asks for a Customizing request. It then writes entries to that request. The entry type depends on how the dialog maintains the data.
Request: DEVK900123 (Customizing request)
Owner: CONSULTANT1
Task: DEVK900124
R3TR VDAT V_T001 (view contents, maintained via SM30 or the IMG)
R3TR TABU T001 (table entries, selected by key)The two object types differ in what they carry.
| Object type | Name | What it transports |
|---|---|---|
| VDAT | View contents | Rows maintained through a view, selected by the view's key |
| TABU | Table contents | Rows of a table, selected by key |
| CDAT | View cluster contents | Rows maintained through a view cluster |
Both carry data, not definitions. The table or view must already exist in the target system. If it does not, the import fails. This is why a Workbench request that creates the table has to arrive before the Customizing request that fills it.
Key selections limit the transport
A request entry does not always carry the full table. It holds key ranges, the specific rows you changed. Importing the request overwrites or inserts those rows in the target. It does not delete other rows.
You can open the request in SE09 or SE10, select the entry, and display its keys. Doing this before release is a cheap review step. You see exactly which company codes or document types the request will touch.
Reading the effect of a change
Use this sequence when you need to know what an activity changed.
- Note the IMG activity and open it with the documentation (the page icon).
- In the maintenance dialog, use the menu path for the technical name of the view. You can also use System, Status, and the screen's technical information.
- Open the view in SE11 and read which tables it uses.
- Check each table's delivery class and whether the first key field is
MANDT. - Open the request in SE09 and compare the entries to your list.
If the request holds an entry you did not expect, an underlying table of the view or a second activity probably wrote it.
Edge cases
- Some tables are client-dependent but not recorded. If the data is class A, or if the table is not marked for Customizing, the system saves it without asking for a request. The change stays in that client only, and you must repeat it by hand elsewhere.
- Views with a "No recording" or "Standard recording" setting differ. In SE11, under Data Browser/Table View Maint., a view can be set to record changes automatically or to leave recording to the user. A table set to no recording cannot be transported by a normal Customizing request.
- Some activities write to cross-client tables and client-dependent tables in the same dialog. The system asks for a Workbench request for the cross-client part and a Customizing request for the rest, so you may be prompted twice.
- Texts have their own table. A change to a description in a logon language writes a row to the text table (for example
T001Tstyle tables), and only transports if the text table is part of the view.
Common errors
- Assuming a saved change is transportable. If client recording is off, the change exists only in that client.
- Changing a cross-client table without telling other teams.
- Importing a Customizing request before the Workbench request that creates the view or table.
- Expecting an import to delete rows. A request transports the rows you touched, not the rows you removed, unless the deletion was recorded.
Exercise
An IMG activity opens a view that joins T001 and its text table. You save one new company code and see only one row in the dialog. How many rows can the request contain, and what must already exist in the target system for the import to succeed?
Show answer
The request can contain rows for both tables, because the save writes one key row and one text row. The view and both tables must already exist in the target system, since a Customizing request carries data and not definitions. If a Workbench request creates them, it must be imported first.
Exercise
You run a report with SELECT ... FROM t001 in client 100 and get five company codes. A colleague logs on to client 200 of the same system and gets two. Is T001 client-dependent or cross-client, and what does the result tell you about a change made in client 100?
Show answer
T001 is client-dependent. Open SQL returns only rows for the logon client, so the two clients hold different rows. A change made in client 100 does not appear in client 200.