How to Expose the S4HANA ABAP CDS View to SAP BO

Expose the S4HANA CDS View to SAP BO using Function Module

Using the following points to expose the S4HANA CDS view to SAP BO

1. Creation of CDS View .
2. Creation of Function Module for the CDS view.
3Consuming of Function Module in SAP BO.

Following Step by Step Process for the above points.

Point 1. Creation of CDS View.

Step-1.1 : For Creating the CDS view right click on package→New→Other ABAP Repository


Step-1.2 : Select the Data Definition in Core Data services.

Step-1.3 : Fill the details Project , Package ,Name & Description and Click on Next.

Step-1.4 : Click on Next.

Step-1.5 : Select the type of template is required and click on Finish.

Step-1.6 : See the Below mention Details & Script Screenshot which is expose the MARA Table With limited Columns . After Giving the Script Save the file.
  • ZCDS_SQL is the ABAP View name when activated view is created in ABAP
  • MARA is the table name (We can use the table or view Name)
  • ZCDS_DDL is the Entity name (File name is also same)
  • @Odata.publish:ture is used to expose the data trough odata default Odata name is ZCDS_DDL_CDS('Entity'+_CDS)

Step-1.7 : For activation the DDL file . Right click on DDL file and select Active option .

Step-1.8 : After click on active we can see the Activation pop-up.

Step-1.9 : File is successfully activated.

Step-1.10 : For Checking the ABAP view . Go to the GUI and Open the T-Code SE11 . Select the view and give the view name and click on Display.

Step-1.11 : For Checking the data click on Contents .

Step-1.12 : Select Execute.

Step-1.13 : Below Screenshot we can see the data which are given in the CDS view.

Point 2. Creation of Function Module for the CDS view.

Step-2.1 : For Creating Function Module Open T-Code SE37 . And Provide the Function Module Name and Click on Create.

Step-2.2 : Provide the Input Parameter name and Data Type.

Step-2.3 : Provide the Temp table name like as view.

Step-2.4 : Basic Function Module Source Code .

Step-2.5 : Click on Save & Active the Function Module.

Step-2.6 : Function Module is Activated.

Step-2.7 : For Checking the Function Module Press F8.

Step-2.8 : Click on Execute.

Step-2.9 : 124 Records output.

Step-2.10 : Output Details .

3. Consuming of Function Module in SAP BO

Step-3.1 : Select the Relational Connection .

Step-3.2 : Provide the Resource Name and Description and click on Next.

Step-3.3 : Select the SAP→SAP ERP 6→SAP Java Connector(SAP Jco) and Click on Next .

Step-3.4 : Provide the Connection Details .

Step-3.5 : Test Connection Successful and the close. Click on Finish.

Step-3.6 : Provide the Resource Name and Description .Click on Next.

Step-3.7 : Provide Data Foundation Type.Click on Next.
Step-3.8 : Select Source and Click on Finish.

Step-3.9 : Expand ABAP Function and Expand Function range based on the Function Group name.

Step-3.10 : Select the Show Table Values .
Step-3.10 : Output of View.


Popular posts from this blog

How to Expose the S4HANA ABAP CDS View to MS-Power BI

How to Expose the S4HANA ABAP CDS View to Fiori App