Academic journal article Informatica Economica

Dynamic Selection Screen Generation for SAP Solutions

Academic journal article Informatica Economica

Dynamic Selection Screen Generation for SAP Solutions

Article excerpt


The study of algorithms forms a cornerstone of computer science research and education. However, many developers may not be aware of common algorithmic techniques, which the programming language they are using may provide. That is why companies like Google, Apple or Facebook use dynamic programming algorithms questions in their interviews and select only the best.

In many areas of activity, dynamic programming is a method for solving a certain problem by breaking it into sets of subproblems [1]. Every time the same subproblem occurs, instead of searching again for a solution, one simply looks at the previously computed solution. By using this method, precious time can be saved at the expense of a modest storage increase.

The core idea of dynamic programming is to avoid repeated work by remembering partial results and this concept finds its application in a lot of real life situations. Dynamic programming algorithms are often used for optimization purposes. These analyze if a problem has two key attributes: optimal substructure and overlapping of problems. Dynamic programming is mainly used when solutions of same subproblems are needed again and again. Afterwards, one of the following two approaches are used: a topdown approach (memorization) or a bottomup approach (tabulation).

Since dynamic programming can be applied in so many different ways, the underlying concepts are quite general. The best way to really understand something is by making use of it, so in the next section we will check out an interesting problem which can efficiently be solved with dynamic programming, using the ABAP programming language.

2Dynamic programming in ABAP

2.1 General Assumptions

As we know, ABAP programs may contain both static and dynamic parts, that cannot be clearly delimited. According to Cecchini [2], dynamic and static apply to the data and/or operations performed on the data within a program. It would not benefit anyone, if we would try to create categories in this regard. However, we would like to define these characteristics.

The static parts of a program refer to the characteristics of the data, which is fixed at compile time and will not change during runtime. On the other hand, dynamic properties are for various reasons not known, nor fixed at compile time [2]. Dynamic programming enables you to use certain features during runtime that cannot be determined at compile time. Instead, these features are defined by the values of parameters that are passed to the program at runtime.

To help us understand better the concept of dynamic programming in ABAP, we would like to present an easy example of Open SQL syntax: SELECT COUNT(·) FROM (tablename) INTO count. The variable tablename can be read at runtime, as the user interacts with the program by entering a value for the tablename. As a result, the program will be able to display a correct result for the variable, which got its value at runtime.

In a similar manner, ABAP generic data types like ANY, or DATA are used to create data references via the command CREATE DATA, which allows to dynamically specify the type of the variable at runtime [3]. Field symbols, another dynamic programming feature of ABAP, which is not found in other programming languages, help the developers access and modify data from internal tables or structures at runtime, without copying them, acting as placeholders.

We can conclude, that dynamic programming involves the use of incompletely typed or untyped data objects. This enables generic subroutines and methods to be created that run independently of the types of input data. This would not be possible in ABAP without the RTTS (Runtime Type Services), which makes it possible to handle the properties of types in programs: RTTI (Runtime Type Information) is used in order to get the corresponding types at runtime and a related service, RTTC (Runtime Type Creation), which creates new types when programs are executed and generates corresponding data objects [4]. …

Search by... Author
Show... All Results Primary Sources Peer-reviewed


An unknown error has occurred. Please click the button below to reload the page. If the problem persists, please try again in a little while.