Google Search - Blog...........

Structure and execution of ABAP/4 programs

Structure and execution of ABAP/4 programs are essentially different from entirely sequential programming languages such as FORTRAN, PASCAL, or C. ABAP/4 instead shares certain similarities with modular, event-orient programming languages such as Visual Basic or JAVA.
The two most important statements concerning structure and execution are:

An ABAP/4 program has a modular structure.
For execution, you need a special runtime environment.
This means, that ABAP/4 source texts always consist of a collection of program modules (one single module in the easiest case) or the sequential set of statements. The individual program modules consist of sequential elements. The set of statements of a program module is also called processing block.
The runtime environment is responsible for calling the individual program modules one after the other. The runtime environment is the ABAP/4 processor, which can communicate with the list processor or the dialog processor, depending on the program type.

Program flow within the individual processing blocks is sequential, as you know it from other sequential programming languages (for example, FORTRAN, PASCAL and C). Within the processing blocks, you can use the general control statements for the program flow, such as IF, DOES, WHILE, ABAP/4 does not contain GOTO elements.

We mainly use programs that consist of a single processing block only and, therefore, behave most likely like programs of other sequential programming languages. For programming applications, the entirely sequential concept is not sufficient. SAP distinguishes between two general types of application programs:

Reports: You use reports to read databases and represent the results in lists. Reports are collections of processing blocks that the system calls depending on events.

Dialog programs: You can dialog programs to execute transactions, which usually read and change databases. Dialog programs are collections of processing blocks (so-called module pools) that are called by a screen flow logic. The third part of the User’s Guide describes dialog programming in detail.

Reports can call dialog programs and vice versa.

In its easiest version, an ABAP/4 program contains one single sequential piece of coding and, thus, one single processing block.

Characteristics of the ABAP/4 programming languages
• Declarative elements for declaring data of different type and structures.
• Operational elements for manipulating data.
• Control elements to control processing flow.
• ABAP/4 is multi-lingual. Text elements such as titles, headings, and text body are stored separately, independent of the program codes. Thus, you can change, translate, and maintain text elements without having no adapt the coding.
• ABAP/4 supports business-related data types and operations. You can execute calculations using special data and time fields. The system automatically executes all necessary type conversions.
• ABAP/4 provides a number of functions for processing character strings.
• ABAP/4 allows you to define and call subroutines. You can even call subroutines of other programs. There are different ways of how to pass parameters to and from the Subroutines.
• ABAP/4 contains a special type of subroutine, called function module. Function modules are stored and maintained in a central library. They have clearly defined data interfaces to the calling program. You can test function modules in a stand-alone mode independent of the calling program.
• ABAP/4 contains an SQL subset called OPEN SQL. OPEN SQL allows you to read and change database tables independent of the underlying database system.
• ABAP/4 allows you to define and process internal tables that exist only for the execution period of the program. Internal tables efficiently support the usage of database tables and allow you to implement complex data structures in a program.
• ABAP/4 allows you to store data not only in databases but also as sequential files on application and presentation servers.

No comments:

Post a Comment