3

I want to see the difference of Delivery Class 'A' and 'C'. C for data entered only by the customer, but how can I see it on the code?

I created two tables of type 'A' and 'C'. I add data with ABAP code. I thought I couldn't add data to the table I created with C, but they both work the same.

For A Type:

DATA wa_ogr LIKE ZSGT_DELIVCLS2.

wa_ogr-ogrenci_no = 1.
wa_ogr-ogrenci_adi = 'Seher'.
INSERT ZSGT_DELIVCLS2 FROM wa_ogr.

For C Type:

DATA wa_ogr LIKE ZSGT_DELIVERYCLS.

wa_ogr2-ogrenci_no = 1.
wa_ogr2-ogrenci_adi = 'Seher'.
INSERT ZSGT_DELIVERYCLS FROM wa_ogr2.

Datas get trouble-free when I check with debugging. enter image description here

Is there a live demo where I can see the working logic of C? Can you describe Delivery Class C better?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
shrgrl
  • 87
  • 3
  • 13
  • The Delivery Class of a database table defined in the ABAP Dictionary is not related to ABAP at all. `A` is for application/master data (changed often), `C` is for customizing data (defined once or so via `SM30` or `SPRO`). It's used for some checks by a few tools (like A tables should be defined as client-dependent), but no need to worry about that, just choose `A` or `C`. – Sandra Rossi Jul 23 '20 at 06:32
  • @SandraRossi I understand better now. Thank you for the information you provided. – shrgrl Jul 23 '20 at 07:52
  • NB: question also [asked in SCN](https://answers.sap.com/questions/13097612/how-to-using-delivery-class-c.html) with some answers. – Sandra Rossi Jul 23 '20 at 08:25
  • @SandraRossi Yes, it may be more informative to hear different comments from different people. So I ask different people. Thanks. – shrgrl Jul 23 '20 at 08:56
  • 2
    Sure. Future Stack Overflow visitors reading this question will be happy to read these other answers, it's why I added the link. – Sandra Rossi Jul 23 '20 at 09:37

1 Answers1

6

Tables with delivery class C are not "customer" tables, they are "customizing" tables. "Customizing" is SAPspeak for configuration settings. They are supposed to contain system-wide or client-wide settings which are supposed to be set in the development system and then get transported into the production system using a customizing transport. But if that's actually the case or not depends on what setting you choose when generating a maintenance dialog with transaction SE54. It's possible to have customizing tables which are supposed to be set in the production system directly without a transport request.

Tables with delivery class A are supposed to contain application data. Data which is created and updated by applications as part of their every day routine business processes. There should usually be no reason to transport that data (although you can do that by manually adding the table name and keys to a transport request). Those applications can be SAP standard applications, customer-developed applications or both.

There is also the delivery class L which is supposed to be used for short-living temporary data as well as the classes G, E, S and W which should only be used by SAP on tables they created.

But from the perspective of an ABAP program, there is no difference between these settings. Any ABAP keywords which read or write database tables work the same way regardless of delivery class.

But there are some SAP standard tools which treat these tables differently. One important one are client copies:

  • Data in delivery class C tables will always be copied.
  • Data in delivery class A tables is only copied when desired (it's a setting in the copy profile). You switch it off to create an empty client with all the settings of an existing client or to synchronize customizing settings between two existing clients without overwriting any of the application data. You switch it on if you want to create a copy of your application data, for example if you want a backup or want to perform a destructive test on real data.
  • Data in delivery class L tables doesn't get copied.

For more information on delivery classes, check the documentation.

Philipp
  • 67,764
  • 9
  • 118
  • 153
  • That's an excellent answer. Another similar rated configuration for tables is the Data Class. Depending on your database (e.g. Oracle), it can create tables in different spaces, but this is more a Basis/DBA thing. More info [here](https://help.sap.com/SAPHELP_NWPI711/HELPDATA/EN/cf/21eac5446011d189700000e8322d00/frameset.htm). – Eduardo Copat Jul 23 '20 at 21:19
  • Thanks a lot! This is better explained, as in the official documentation! – Denis Mar 23 '21 at 12:21