Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member706122
Participant
Premise-

There are many SAP blogs out there that explains inner working of CDS views or core data services in SAP’s S/4 boxes. But there are still struggle among experienced professionals who is switching from ECC system to S/4.

This blog is dedicated towards experienced professionals working on ECC systems for many years and yet to jump to S/4.In the next few min, we will look at a very basic concept of a CDS view and try to evaluate inner working of the CDS using classic SAP tools.

 

Pre-Requisites –

You have read / understood / Prototype items on Previous blogs.

SAP CDS for New And Experienced professionals | SAP Blogs

Consuming CDS for – New And Experienced professionals- 2 | SAP Blogs

CDS Annotations for – New And Experienced professionals- 3 | SAP Blogs

 

Recap-

Now at this point you were able to create a ZTABLE in sap which holds employee data and also created a CDS view on top of the Table. We have gone through some basic examples to consume newly create CDS view in ABAP executables.

Those basic building blocks will help you understand the current blog much better.

 

Lets Start –

The basic exercises are good but the real life examples are much different. So lets explore those together.

 

Lets talk about Standard SAP CDS views-

  1. How do you find a Standard CDS view for a particular table in SAP?

  2. What is a CDS extension?

  3. How to extend a standard CDS view.


 

  • How do you find a Standard CDS view for a particular table in SAP?

    • First and foremost topic to remember is use Standard CDS views as much as possible.

    • SAP product teams have released different CDS views and can be used out of the box.

    • To Find any standard view go to SE16- Look at table - DDLDEPENDENCY in the field - OBJECTNAME enter the table name in wild chars to look for all the CDS views related to the table.

    • Lets do a small exercise - I would like to find CDS views related to table - ACDOCA.

    • Now if you execute the filter you will see all the CDS views look towards the columns on far right that explains Activation status of the CDS and also if this is a view - "VIEW" or structured object "STOB". If your requirement is to find out a view to extend remember to always extend the items with "STOB".

    • Note - Please look at the SAP note - 2023690 - CDS views are inactive there are situations during system upgrade, patching when CDS views are inactive and a consultant might need to activate them. The note explain the procedure in detail.

    • Activate DDL Sources - Go to SE38 - Enter program - RUTDDLSACT execute enter the relevant information in the selection screen and execute. (Please use extra caution and should not be done without a proper reason).

    • Tip: Look at table - DDDDLSRC for DDL Source header details.

    • Tip: Mass activation of CDS is possible from program - RADMASG0_C3



  • What is a CDS extension - Standard CDS views can be used in pre-defined ways of working but in reality this is often customization required and out of box solution can not be used. CDS extension allows customers to extend CDS view with customer requirements.

  • How to Extend Standard CDS View-

    • Scenario - We have a standard view. FMMIMACDOCAELE (Consists of two entity - SQL view- FMMIMACDOCAELE and Data Definition - F_MMIM_ACDOCA_ELE).

    • Our target is to add a field at the end of this view from ACDOCA table and field name is BLDAT.

    • Create a new new CDS View (Data Definition) in Eclipse.

    • Lets name this ZCDS_FMMIMACDOCAELE_EXT  (Extension of FMMIMACDOCAELE)

    • Once you choose transport and click next - in the templates section select Extend View.

    • Lets add the field name BLDAT

    • If you try to activate the extension you will get an error.

    • The error log will look like below."The view definition and extend do not fit together."

    • The reason you get this is error is because you are trying to extend the view (SQL view) but actually you need to extend the structured object in this case.

    • F_MMIM_ACDOCA_ELE  (Remember you always extend the DDL the SQL view gets extended automatically).

    • SQL View before extension-

    • Now lets follow the steps mentioned above and add a new field BLDAT to F_MMIM_ACDOCA_ELE.




    • Finally see the data structure -




 

Conclusion:

SAP Standard views can be extended to add more data definition and enrichment is possible, the process is easy as long as you can identify the right view to extend.

 

So now you know extension of Standard CDS keep learning.

Move on to the next blog. CDS Architecture – New And Experienced professionals- 5 | SAP Blogs
Labels in this area