Systems are connected to Server. Tier 2 System Server
Input, allowing the users to manipulate the system Output, allowing the system to produce the results of user’s manipulation . SAP is having Graphical User interface (SAP GUI). The SAP GUI is installed on Individual machines which acts as presentation layer. Presentation/Client Tier
Application Layer
In Application layer , ABAP programs communicate with the database management system of the central relational database (RDBMS) and with the presentation layer . ABAP applications are written in the ABAP programming language, and run within the application layer of the SAP Web Application Server . Here, application programs are executed. The application layer contains a kernel written primarily in C/C++ that serves as a platform for the application programs . The kernel of AS ABAP provides Virtual Machines for ABAP with ABAP Objects (main programming interface of AS ABAP for business applications), XSLT and ST (transformation languages for transforming ABAP data to XML and vice versa), and still JavaScript (obsolete, server-side scripting in BSPs beside ABAP).
D ispatcher. Gateway. shared memory. ABAP application server contains:
Work Processes. Work processes are components that are able to execute an application (that is, one dialog step each ). Each work process is linked to a memory area containing the context of the application being run . The context contains the current data for the application program. This needs to be available in each dialog step.
Dispatcher The dispatcher is the link between the work processes and the users logged onto the ABAP application server. Its task is to receive requests for dialog steps from the SAP GUI and direct them to a free work process. In the same way, it directs screen output resulting from the dialog step back to the appropriate user.
Gateway This is the interface for the communication protocols of NetWeaver AS ABAP (RFC, CPI/C ). It can communicate with other ABAP application servers of the same NW AS, with other SAP Systems, or with external non-SAP systems.
Shared Memory. All of the work processes on an ABAP application server use a common main memory area called shared memory to save contexts or to buffer constant data locally . Memory management in the NetWeaver AS ABAP ensures that the work processes always address the correct context, that is the data relevant to the current state of the program that is running.
Persistent data is held in a database. The database is accessed by ABAP programs through the database interface of AS ABAP that is subdivided into an Open SQL interface and a native SQL interface . Open SQL is a subset of the Structured Query Language (SQL) realized directly by ABAP statements. Native SQL are database-specific SQL instructions that are passed directly to the database system. Database Layer
Open SQL: Open SQL consists of a set of ABAP statements that perform operation on central database in the R/3 System. When a programmer writes an ABAP program with Open SQL statements, the kernel SAP programs convert Open SQL statements to real / native SQL statements for database in use. So like that write once, run for all databases and even for all operating systems . Open SQL contains the following keywords : SELECT - Reads data from database tables . INSERT - Adds lines to database tables . UPDATE - Changes the contents of lines of database tables . MODIFY - Inserts lines into database tables or changes the contents of existing lines . DELETE - Delete lines from database tables . OPEN CURSOR, FETCH, CLOSE CURSOR - Reads lines of database tables using the cursor.