ABAP CDS Views - ERP Q&A https://www.erpqna.com Trending SAP Career News and Guidelines Thu, 04 Jul 2024 11:24:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.2 https://www.erpqna.com/wp-content/uploads/2021/11/cropped-erpqna-32x32.png ABAP CDS Views - ERP Q&A https://www.erpqna.com 32 32 SAP RAP Unmanaged scenario example-Simplified https://www.erpqna.com/sap-rap-unmanaged-scenario-example-simplified/?utm_source=rss&utm_medium=rss&utm_campaign=sap-rap-unmanaged-scenario-example-simplified Thu, 04 Jul 2024 11:24:06 +0000 https://www.erpqna.com/?p=86138 SAP RAP (ABAP RESTful Application Programming Model) has two main flavors: managed and unmanaged. Let’s focus on the unmanaged version. Unmanaged SAP RAP refers to a development approach where developers have more control over the data persistence and business logic compared to the managed approach. Here are some key aspects Overall, unmanaged SAP RAP provides […]

The post SAP RAP Unmanaged scenario example-Simplified first appeared on ERP Q&A.

]]>
SAP RAP (ABAP RESTful Application Programming Model) has two main flavors: managed and unmanaged. Let’s focus on the unmanaged version.

Unmanaged SAP RAP refers to a development approach where developers have more control over the data persistence and business logic compared to the managed approach. Here are some key aspects

  1. Custom Logic: In unmanaged RAP, developers write their own custom logic for handling data retrieval, manipulation, and persistence. This gives more flexibility in how data is processed and stored.
  2. Direct Database Access: Developers can directly access the database tables and define their own data models using Core Data Services (CDS) views or ABAP classes.
  3. Explicit Service Definition: Unlike managed RAP, where service definitions are automatically generated based on annotations, unmanaged RAP requires developers to explicitly define service implementations and behaviors.
  4. Manual CRUD Operations: CRUD (Create, Read, Update, Delete) operations need to be implemented explicitly in unmanaged RAP, giving full control over how data is managed.
  5. Integration with Existing Systems: Unmanaged RAP is often used when integrating with existing systems or when there is a need for complex business logic that cannot be easily handled by the managed approach.
  6. Flexibility: Developers have more freedom to implement complex validation rules, authorization checks, and other custom requirements directly in the application logic.

Overall, unmanaged SAP RAP provides a more hands-on approach to application development compared to the managed approach, allowing developers to leverage their expertise in ABAP programming and database handling while building modern RESTful APIs.

Top of Form

In this example, we will show a simple application for Employee build with RAP Unmanaged flavors.

Development steps.

To be summarized below object will be created for Unmanaged scenario.

Table ZT01_EMPLOYEE

Base CDS View Z_I_EMPLOYEES_U

Consumption CDS view Z_C_EMPLOYEES_U

Behavior Definition

Bottom of Form

Behavior definition

Implement the Create method

Implement Update Method

Implement Delete Method

Implement Adjust_Numbers method.

Implement Save method.

Test

1. Open the Application.

2. Click on Create. Give Input value and Create.

3. New Record got created.

4. Select any Row , click on Edit.

5. Change the value and Save.

6. Record will be updated.

7. Select the Rows and click on Delete.

8. Records will be deleted.

9. In the Database table also you can see the records.

So, all the CRUD operation is successful using RAP Unmanaged flavors.

Rating: 0 / 5 (0 votes)

The post SAP RAP Unmanaged scenario example-Simplified first appeared on ERP Q&A.

]]>
Integration of SAP CI(BTP IS) with Datasphere https://www.erpqna.com/integration-of-sap-cibtp-is-with-datasphere/?utm_source=rss&utm_medium=rss&utm_campaign=integration-of-sap-cibtp-is-with-datasphere Fri, 02 Feb 2024 09:15:27 +0000 https://www.erpqna.com/?p=81327 Introduction What is DATASPHERE? SAP Datasphere, the next generation of SAP Data Warehouse Cloud, is a comprehensive data service that enables every data professional to deliver seamless and scalable access to mission-critical business data. Whenever there is a requirement to have data transferred from various external systems to the Datasphere though it has its own […]

The post Integration of SAP CI(BTP IS) with Datasphere first appeared on ERP Q&A.

]]>
Introduction

What is DATASPHERE?

SAP Datasphere, the next generation of SAP Data Warehouse Cloud, is a comprehensive data service that enables every data professional to deliver seamless and scalable access to mission-critical business data.

Whenever there is a requirement to have data transferred from various external systems to the Datasphere though it has its own connection paradigm if there is already a SAP Cloud Integration connected to all the external systems in the enterprise landscape then rather creating new connection to Datasphere from those its always better to have Cloud Integration connected with Datasphere. This way no need for duplicate connections and also the overall monitoring capabilities gets enhanced.

What is SAP CI(BTP-IS)?

Cloud Integration(BTP-IS) is a set of services and tools provided by SAP on its cloud-based Business Technology Platform (BTP) to enable integration between different systems, applications, and data sources. The key benefit of CI(BTP IS) is that it enables organizations to quickly and easily integrate their systems, data, and applications without the need for extensive coding or custom development. This helps to streamline business processes, reduce costs, and improve operational efficiency.

How Datasphere can be integrated?

SAP Datasphere can be integrated with wide range of sources, both on premise and cloud of SAP and Non-SAP sources and tools. Based on the native connection types which are already available in SAP Datasphere like Generic JDBC, Generic SFTP, Generic ODATA and various others can be used to be connected with external world. Some of the common use cases would be like below.

S4H > Datasphere – Connection with DP Agent (SAP S/4HANA On-Premise)
SAC -> Datasphere – Connection of Type: Cloud Data Integration
Datasphere -> SAC – Direct Data Live Connection
Datasphere -> IBP – IBP connection

How CI integrates with Datasphere?

The integration between CI and Datasphere can be done in multiple ways like below.

1. CI can load the data directly in Datasphere using JDBC protocol.

2. CI can consume the exposed OData V4 service from Datasphere.

3. CI can make use of the open connector on BTP IS if the open connector connection is activated in Datasphere.

Note: Among the possible integrations with Datasphere, OData and Open Connector methods are already explained but the easiest and most traditional method of JDBC was not clearly explained anywhere.

Integration of SAP CI(BTP IS) with Datasphere through JDBC

Prerequisites:

1. SAP BTP IS Tenant Access with required CI roles.

2. SAP Datasphere Access with required “Data Catalog User, DW Viewer, DW Modeler, Data Catalog Administrator” roles.

3. SFTP access to read the test file.

Step-1: Create a new space in Datasphere space management.

If you have the required access then you create the space or else you can connect with the Basis team.

New Space in Space Management

If basis team is creating the space make sure you are also the member of this space without which you cannot view the space also for the Database schema/user/password/hostname/port details with the permission to open the underlying Database explorer.

Step-2: Create a new Database user in the created space.

After the space is created then the schema and the database user details to be created with the required Read, Read(HDI) and Write permissions.

Space Schema: “Space_Schema”

Database Username: “Space_Schema#User_Name”

Open SQL Schema: “Space_Schema#User_Name”

Hostname: “<<Hostname>>.hanacloud.ondemand.com”

Password: “Password”

Port: 443

Database User Details

Step-3: Create the table in the SAP HANA Database Explorer.

Create the table as per your required columns, datatypes and length.

New Table creation in HANA DB

Step-4: Create the JDBC Data Source in Manage JDBC Material of Integration Suite.

For creating the JDBC Data Source use all the parameters from the Step-2 like User and password.

The Database type should be selected as “ SAP HANA Cloud “

And for JDBC URL follow the format as

<<Hostname>>.hanacloud.ondemand.com:443/?encrypt=true&validateCertificate=true

Deploy the JDBC Data source successfully.

JDBC Data Source

Step-5: Create the new IFLOW to send the data from CI to Datasphere.

Here for the demo purpose the source is selected as a SFTP file but as per the business requirement it can be anything.

CI IFLOW SFTP-CI-Datasphere

There can be multiple steps as per the requirement but the main target structure should be using the JDBC XML Format as below.

<root>

<insert_statement>

<dbTableName action="INSERT">

<table>DEMO</table>

<access>

<FIRSTNAME>FAROOQ</FIRSTNAME>

<LASTNAME>AHMED</LASTNAME>

<DESIGNATION>ARCHITECT</DESIGNATION>

</access>

</dbTableName>

</insert_statement>

</root>

The tablename which was created in the HANA Cloud database should be provided in the Message Mapping as below

Table Name in Message Mapping

The JDBC Data source which was created in step-4 should be provided in the JDBC Receiver channel as below

JDBC Channel with Datasource

Deploy the IFLOW successfully after configuring the SFTP channel with the required parameters.

Step-6: Validate the Data received from CI in Datasphere.

All the data processed from CI to Datasphere will be available in the HANA DB table as below

Data inserted in HANA DB table

To make the data visible in the Datasphere application the table should be given a Graphical View in the Data Builder.

Data Builder Graphical View

Once the local view of the table is deployed then the entire data present will be displayed in the Datasphere for further reporting/analytics.

Data in Datasphere Graphical View
Rating: 0 / 5 (0 votes)

The post Integration of SAP CI(BTP IS) with Datasphere first appeared on ERP Q&A.

]]>