HOW to USE joins in ABAP CDS views


Scenario:
Here we are joining the 2 tables (KNA1 and KNB1) with the key KUNNR.
1) Click on New DDL Source





2) Enter the Name and Description and give the Package or save under local object



















3) If it is a package select the transport request and click on next button














4) Select the second template and click on Finish button

















5) Below screen will appear












6) Enter the ‘sql_view_name

@AbapCatalog.sqlViewName: 'sql_view_name' @AbapCatalog.sqlViewName:’ZCDSVIEW_JOIN1’







7) Below is the code to join the 2 tables














8) Run the view to check the results














9) See the results
















10) Check the view details from SE11 transaction














Created the view with joining condition.


No comments:

Post a Comment