Category: ABAP

Useful ABAP code snippets that can be used in real life projects.

“DBTAB_NAME” must be a flat structure. Internal tables, strings, references, and structures cannot be used as components.

Analysis Why SAP treats the table as a structure? Why is this error displayed when “DBTAB_NAME” exists in Data Dictionaty as Database Table? In our case we are dealing with the database table called „ZLR_DDIC_MODEL“: Here is the syntax error: Explanation Lets take a look to the help. (Pressing F1 when cursor is on TABLES statement) In...

How to Create Function Module in ABAP

What is Function Module? Function Modules are a set of codes that can be reused by other programs. Instead of copying exactly the same statements within programs, it is much more useful and maintainable to create a function module. Function Modules are created with importing, exporting, changing parameters, and exceptions. Function Modules can be executed independently and...

How to Create Function Group

What is Function Group? Function Group is a collection of Function Modules with similar characteristics. E.g. Function Modules with arithmetical logic can be stored into Function Group containing “Arithmetic” in its name. Each Function Module we create needs to be added into one Function Group. For that reason, Function Group is created earlier than Function Module....

How to Create a Database Table?

In this article, we are going to create a table to store records about cars step-by-step from scratch. Here is the information about cars that we are going to use in the table: Car ID Model: a model of a car such as Sedan, Hybrid, Hatchback, etc. Store: to which store the car belongs to Price Currency The...

What is Size Category?

Let’s start with frequently asked questions from newbies about this topic. Q: What is Size Category? The size category is basically our “estimation” on how many records database table which we are creating is going to contain. Of course, nobody knows the exact number. That’s why we want to shoot our best ;). Q: Why...

What is Data Class?

Data Class defines the space for database table where it should be stored physically on the hard drive of a database server. The setting for the Data Class is within the definition of Database Table in Techincal Settings. When you define the data class for the table that you create, the table is assigned to the...

What is Delivery Class?

Delivery Class defines how database table is going to be transported during installation, upgrade, and copies within landscapes, clients and customer systems. Types and use of Delivery Class: A Application table for master data and transaction data. Data is maintain by application. These tables are delivered to customer as empty tables. C Customer table used...

Data Elements vs. Domains

Lets start with explaining what are these two terms needed for. When we are defining database tables within SAP, each and every field needs to contain specific type. Lets say that we create a database table called Store. Along with other fields the store also needs to contain information when it is opened and closed. In...

Programming error ASSERTION_FAILED CL_SLIN_CHECKER_SINGLE========CP BC-ABA-LA The Assert Condition was violated.

Problem: When running Extended Syntax Checker, you get the following runtime error:  

How to download records from database table into CSV file?

When you need to download records from database table into CSV file, you need to tweak a bit around to get the final file, because SAP does not provide straightforward function on how to do it. So, how to download records from database table into CSV file? Here is how you do it.