In addition to the persistent database fields, the view also contains several associations that are propagated to potential consumers of this view at the end of the field selection list. The view is also annotated with the #BASIC annotation, which assigns the view to the basic interface view layer of the VDM. The Z_ indicates that a custom developed view in the customer namespace, and the I_ indicates that this view is an interface layer view. To follow the naming conventions for interface layer views according to the SAP S/4HANA VDM development guidelines, we named the views using the following pattern: Z_I_. The code listing below shows the basic interface view for purchase documents, which creates simple projection on the purchase document table (table zpurchdocument ) to expose all table fields and provide camel case aliases for fields that are relevant to end users. Note: You can use the shortcut (Ctrl) + (Space) inside the field selection section of the CDS view source code editor to trigger the Eclipse content assist popup window to easily select fields of the underlying database table or CDS view, as shown below. Click the Finish button in the wizard, and the source code editor will open so you can add fields or associations to the view.Select one of the provided templates to create a skeleton CDS view, for instance, Define View, which will create a simple projection view skeleton with one single data source and without any associations or joins.In our case, we’ll call the purchase documents view Z_I_PurchaseDocument and the purchase document items view Z_I_PurchaseDocumentItem. In the CDS creation wizard that appears, enter a Name and Description.Open the context menu by right-clicking on the package and select New > Other ABAP Repository > Core Data Services > Data Definition.In the ABAP project, select the package node into which you want to create the table via the Project Explorer.Open the ABAP perspective in the ABAP development tools in Eclipse.To create a CDS view using the ABAP development tools in Eclipse, follow these steps: This layer isn’t supposed to do any complex calculations or join large sets of data instead, this interface layer simply projects the fields provided by the underlying database tables to foster the granular reuse of these views. The basic interface layer is the foundation layer of CDS views and is directly deployed on top of the database tables. This blog post will show you how to do this we’ll adhere to the standard development guidelines of the SAP S/4HANA VDM based on CDS views. Once you’ve defined a data model and the underlying database tables of an application, you can put a semantic and reusable basic interface CDS layer on top.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |