This is a test message to test the length of the message box.
Login
ABAP Cloud Tables
Created by Software-Heroes

ABAP Cloud - Tables

1302

What about accessing tables in ABAP Cloud? In this article, we will look at the strategy for finding alternatives.



In this article we will look at the use of tables in our development. What was previously considered standard is no longer the case and we have to look for alternatives.

 

Introduction

As an ABAP developer, you probably know almost all the tables in your module by heart and can assign each field to its meaning and purpose. Even if you don't speak German, you have gotten used to the unpronounceable names and have learned them. If we look at financial accounting, there is the BKPF table for the header and the BSEG for the positions. An important element is the BUKRS (company code), which appears in the key and is located in table T001.

 

Core Data Services

With ABAP Cloud we can start learning again, as we are switching from the familiar tables to the new Core Data Services. Besides the learning disadvantage, it also brings some advantages. The Core Data Services now have new and descriptive long names so that we can better assign them to their purpose and module. This turns table T001 into the Core Data Service I_CompanyCode.

The Virtual Data Model now makes it possible to create a layer that can be easily reused, while at the same time retaining the option of flexibly expanding, adapting or even replacing the tables underneath.

 

Search

Finding the right Core Data Service can be quite easy, or it can be very difficult. Currently, there is not a suitable Core Data Service for every old table.

 

Successor

The easiest way is to look at the actual table. For example, if we look at the company codes (T001), you will find the corresponding information in the C1 contract in the "Properties" view in the "API State" tab.

 

The "Release State" tells us that the object is not released, but that there is a successor (I_CompanyCode). About "Use in Cloud Development" You will also see that we can use the CDS view in ABAP Cloud development.

 

Cloudification Repository

The information is not always as easy to derive as from the properties of the object. If your S/4 HANA release is too low, then the Core Data Services may not have been released yet or the information is missing in the system. To help you find the right view, there is also the Cloudification Repository. This is a repository where you can find the latest releases.

 

In the repository you will also find the Cloudification Repository Viewer from SAP, where you can search for successors. Alternatively, you can also use our variant.

 

ABAP Test Cockpit

The Cloudification Repository can be used to activate the "Usage of Released APIs" check in your ABAP Test Cockpit and to store the URL. You can find further information on this in this article.

 

Field mapping

The last challenge is to map the familiar BUKRS to the new field, because in addition to the long names for the tables, there are now also new and descriptive long names in the Core Data Services. So how do you get the relevant information?

 

BSEG

As an example, let's look at the CDS view "I_OperationalAcctgDocItem", which is the successor to the BSEG. There are three levels up to the actual table. So is our BUKRS from the database really behind the field called CompanyCode? In this example it is very likely, but a field is not always easy to assign.

 

CDS Field Mapping

We would therefore like to introduce you to the new application "CDS Field Mapping". This is an extract from the system which takes the released Core Data Services from the Cloudification Repository, checks the hierarchy and maps the current Core Data Service field to the database field. The evaluation checks each level and only shows fields that can actually be assigned. You can search for entities and/or fields in the tool.

 

Fields that cannot be clearly assigned are left empty and you will only find the field from the Core Data Service. The mapping is stored as a JSON file in the GitHub repository, where you will also find further information about the extractor. We would like to present the project again in an additional article.

 

Hint: This is currently a beta version and the extractor may still have minor bugs, especially when it comes to CDS functions in the hierarchy. This means that more fields remain empty than could actually be mapped.

 

Use

In ABAP Cloud, the use of Core Data Services for SAP standard tables is mandatory, as the classic tables are no longer released for reading. For the reasons stated above, Core Data Services are used. Changing content of standard tables only works via provided RAP objects or, in the case of TIER-2, via released BAPIs. At the same time, authorization checks are also delivered with CDS views, so that you as a developer no longer have to remember to implement a check and the user only sees what he has authorization for.

You should also use Core Data Services for customer-specific tables, especially if you want to share the views with other software components via a C1 contract. You can make changes directly to the table as usual or via a RAP object on the table.

 

Conclusion 

Until we have learned all the Core Data Services and fields again, the various tools such as the ABAP Development Tools, the Cloudification Repository or the CDS Field Mapping will help us find the right objects.


Included topics:
ABAP CloudABAPTables
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ABAP Cloud - HTTP Client

Category - ABAP

What does the current HTTP client in ABAP Cloud look like? Let's take a look at the new model.

11/01/2024

ABAP Cloud - Key User Apps

Category - ABAP

Key User Extensibility is a part of ABAP Cloud when it comes to extending the core, but how can you use the tools effectively and how do they complement each other?

10/11/2024

ABAP Cloud - JSON Conversion

Category - ABAP

Is there a new API for converting JSON and do you need it for ABAP Cloud? Here we will take a look at the structure and conversion of JSON.

09/27/2024

ABAP Cloud - Number ranges

Category - ABAP

How can you use number ranges in ABAP Cloud and does this actually still make sense? In this article we will look at some of the background informations.

09/13/2024

ABAP Cloud - Data Types

Category - ABAP

What does it actually look like when using data elements in ABAP Cloud? In this article we look at alternatives in the definition.

09/06/2024