2

SAP didn't include an underlying database table field to the interface view I want to reuse for my custom consumption view.

I can easily add it extending the standard CDS, but I'm afraid a future release will include this field and create a conflict if they use the same name than me. Traditionally the prefix ZZ was used for append structure fields in the data dictionary.

Should I follow the same approach for a CDS extension? I was not able to find a document about this.

RaTiO
  • 979
  • 2
  • 17
  • 33
  • 1
    A bit off-topic so not in the main question: I could alternatively join to the underlying table in my consumption view and get the field that I'm missing directly without extending the standard CDS. It feels a bit wrong since I would be joining the same table exposed via the interface view but it also makes things easier... Another option would be to create my own custom Interface CDS on top of the database table and ignore the standard CDS totally. – RaTiO Nov 02 '21 at 12:55
  • Maybe a [namespace prefix](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenname_space_prefix_glosry.htm) would work ... – Jonas Wilms Nov 03 '21 at 10:00
  • @JonasWilms Well, if you want to go through the trouble to [request one from SAP](https://blogs.sap.com/2015/07/08/namespace-registration-and-activation-in-sap-service-marketplace/)... Usually that's only worth it for people who sell the same ABAP product to a large number of customers. – Philipp Nov 03 '21 at 14:58
  • After a bit more investigation from my side, maybe the proper answer is to use the "customer namespace" prefix used when extending S/4 tables and data sources. For what I've seen the default value is `ZZ1_`. So even if the system is not yet an S/4, it should be safe to use this namespace prefix in CDS extensions. In some SAP tutorials I also saw `YY1_` – RaTiO Nov 05 '21 at 12:32

1 Answers1

0

In the SAP press book Core Data Services for ABAP (written by Renzo Colle, Ralf Dentzer, Jan Hrastnik) from 2018 they recommend using the customer namespace or ZZ as a prefix to custom fields. This avoids possible naming collisions.