SAP ABAP - How To Select Data From CDS View In ECC - HANA
IN HANA Migration Project i.e. when Clients or customers are migrating from ECC to HANA, we often face a problem on a few tables that are not directly accessible anymore. Here we show a simple solution to select data from CDS view in ECC system. One can only see the CDS view in display mode in ECC system. CDS view can be edited only via Eclipse tool.
DDIC Table (Tcode : SE11)
Program (SE38): The below program as shown below is selecting data from DDIC table GLTO
In SAP HANA, the same DDIC table GTL0 has been transformed to SQL view, where it is selecting data from V_GLTO_INT2 view, this view has been generated while activating V_GLT0 CDS view in ADT Eclipse (you can find the code of this CDS view at last).
Double click on the DDL Source GLT0_DDL , it will take you to the source code of the CDS View
One cannot edit the CDS view in ECC, this can only be edited using ADT in Eclipse, as it has been created in ADT.
Now the program will be as shown below.
Before HANA
DDIC Table (Tcode : SE11)
Program (SE38): The below program as shown below is selecting data from DDIC table GLTO
Ater HANA
In SAP HANA, the same DDIC table GTL0 has been transformed to SQL view, where it is selecting data from V_GLTO_INT2 view, this view has been generated while activating V_GLT0 CDS view in ADT Eclipse (you can find the code of this CDS view at last).
Double click on the DDL Source GLT0_DDL , it will take you to the source code of the CDS View
One cannot edit the CDS view in ECC, this can only be edited using ADT in Eclipse, as it has been created in ADT.
Now the program will be as shown below.