SAP Architecture • BASIS S/W It interfaces between OS, DB, communication protocol and SAP GUI.

It guarantees the integration to all SAP modules Exception is for AS/400 as it works on EBCDIC character code and not on ASCII • Transaction Transaction is nothing but the sequence of related steps. These are logically related steps called as dialog steps There are two steps in the transaction a) Interactive Phase:- In this phase data is prepared to make update in the DB. There can be multiple steps in a transaction. b) Update Phase:- This phase may have no or many steps. In this phase the data is updated in the DB which is prepared in the previous phase. Every transaction in SAP is associated with the transaction code(Tcode-SM04, SU53 etc.) and is stored in table TSTC. • Dialog steps It is also called as dynpro or dynamic program. A dialog step or dynpro is associated with the screens and the related processing logic. Processing logic consists mainly of two parts a) Process Before Output(PBO):- Means what to be done before displaying the screen b) Process After Output(PAI):- Means what to be done after user finishes entering the info. Navigating in SAP Screen is nothing but making the dialog steps. • Logical Unit of Work(LUW) It provides the locking mechanism to maintain the transaction integrity. LUW always guarantees Atomicity.i.e the effect will be full or null.

Select S A P T R A N = S A P L U W Modify DB Commit Select DB Commit Select DB Commit Insert DB Commit Commit Work SAP Architecture Page 1 of 8

DB Tran.= DB LUW

DB Tran.= DB LUW

DB Tran.= DB LUW

DB Tran.= DB LUW

Work process is the service offered by the server and requested by the client. First thing after the installation is to copy the standard client(e. is written in ANSI C & C++. or 001). It can be used for the client copy. Dispatcher is the control program which manages the resources of SAP R/3. transactions. 000. The main task of the dispatcher process is a) Balancing of the transaction Load to the work process.e. The tech. is OS is POSIX compliant.Simple organizational structure of the test company. 000:. 000. Quantity of the data going in the network from dispatcher to SAPGUI is max. 066:-It is reserved by SAP to access customers system to perform the Early watch Service. • SAP System Central Interface. It contains the standard settings. SAP Architecture Page 2 of 8 .g. Both the dynpro and the abap interpreter shares the common data envi. • SAP R/3 Clients It is a legal and organizationally independent unit is SAP. configuration for the control of the strd. The configurations and customizing in this client is client dependent. Base of R/3 is made up of interrelation of the dynpro interpreter and the ABAP/4 language. 001:. b) Connection with the presentation layer. • Dispatcher Process. The SAP R/3 runtime env.It is the exact copy/replica of the client 000 including the test company. All the application program is written in ABAP/4 which is interpreted language. are followed i. Of R/3 in the form of ABAP dictionary. 2KB  On each application server there is one dispatcher. In SAP there are three default clients viz. Commit Work marks the end of the SAP LUW while Commit work Marks the end of the DB tran. c) Organization of the communication processes.001 and 066. It works like a typical transaction monitor. It receives the data from the presentation layer and passes it to the corresponding work process. The O/S System Interface BASIS system guaranties the portability of the whole system independent of O/S The portability is possible if the POSIX std.

SAP GUI Dispatcher W P W P W P Data Base Schematic Representation of the dispatcher • Work Process Architecture Task Handler ABAP Process or Dialog Interpr eter DB Interfa ce Work Process Data Base SAP Architecture Page 3 of 8 .

ABAP interpreter is responsible for executing the ABAP programs. Dialog interpreter is responsible for executing the logic of the R/3 Screens. Objects and data. The DB interface allows WP to establish the link with the DB. When this is not required it is paged out or rolled out of the memory. For the better performance the proper tuning and the configuration of the memory is very essential.WP consists of the Task Handler. authorization related information). If the data is required more than once it is held in the shared memory and available to the WP. SAP Architecture Page 4 of 8 . Task handler communicates with the dispatcher and activates ABAP or dialog interpreter as requested. Activities in WP are coordinated by Task handler.e.) The Roll area holds the user context data entered in the previous dialog step and other user control information (e. report listing etc. internal tables. When ever the main memory is available the paging area and roll area resides in it. ABAP processor and the Dialog interpreter and DB Interface.g.  The paging area holds the application program data (i.  WP executes dialog steps for the end user  WP is available for service once it completes it existing task. Group made up of dispatcher along with the WP constitutes the application server. Dialog steps needs code dict.

b) Background WP: BG WP responsible to execute the ABAP program in background. Profile parameter rdisp/wp_no_btc controls the no of background processes. Profile parameter rdisp/wp_no_dia controls number of dialog WP per instance. There can be application which supports only dialog WP. The ABAP program submitted for background processing are executed in planned time by the BG WP. Dialog WP constantly switches between the different user sessions.Time taken from step-1 to step-7 is called response time. default value for the response time is 300 Sec. The BG WP is nothing but the batch job queue.• Type of Work Processes a) Dialog WP:It is in charge of interactive task in SAP R/3. The long running reports are suitable for the background processing. A background job can have multiple steps. SAP GUI (Presentation Server) Dispatcher Task Handler AB AP Dialo g DB Request Queue Application Server Roll Area Page Area Main Memory Data Base Server Dataflow in the Dialog WP Response time:. Dialog WP executes one single dialog step at a time and becomes immediately available to the other requests. SAP Architecture Page 5 of 8 .  If time exceeds 300 Sec time_out error occurs.

Spool request indicating printer and printing formats are generated during dialog or BG processing. profile parameter rdisp/wp_no_spo controls the number of spool WP. c) Cumulative(type X i. b) Exclusive(type E) This lock can be held by single user only. Locking is managed by the lock table which resides in the memory. When ever a lock request is made the two lock objects are created automatically one at the beginning of the transaction (ENQUE) and one at the end of the transaction(DEQUEUE) d) Update WP:It is responsible for making the changes in the DB as requested by the user. SAP locking mechanism is designed in such a way that it is respected by all the participating application servers. Profile parameter rspol/store_location controls where to store date(i. (rdisp/enqname=<instance name>). a) Shared(type S) Several users can access the same data at the same time in Display mode only. The default. It also ensures the data consistency. Locking request is made before the data reading is done.  When the data is printed for spool job an output request is generated which is executed by the spool WP.e exclusive but not cumulative) This lock can be called only once. It also protects the application from blocking among themself.c) Spool WP:It is incharge if formatting the data for printing and passing it to the host spool system. Lock Objects:Following are the lock objects in SAP.(many may exists). It ensures that the lock is held till the end of the transaction. It is used to avoid the parallel modifications.e in the file system or in the database). Once the spool WP edited data for the printing print request is generates and is sent to O/S host spooler. By default there is only one enqueue WP per server. Update WP may run on the same server where the DB is running or on different server.plf file maintains the name of the instance running enqueue WP. If the exclusive lock is present then the request for the cumulative lock is rejected. d) Enqueue WP: It is responsible for the locking management and mechanism in SAP. It is held in the spool DB known as the TEMSE(temporal sequential Objects). SAP Architecture Page 6 of 8 .

The parameter rdisp/mshost in default. R/2 and external systems. • Gateway Server It allows the communication between R/3. • Presentation Server(SAP GUI) The connection between the Presentation Server(SAP GUI) and the dispatcher is made by using the optimized protocol called DIAG. menu etc. If there is failure in the update the express message “Update terminated” is given and mail is sent to SAP inbox of the user and the data is rolled backed. Update processes are Asynchronous in nature i.) SAP Architecture Page 7 of 8 .For better performance the update WP should run on the same server as that of DB. It also do the sap license checking and the load balancing. they get executed the order and moment in which they arrive to the DB server. If error occurred in the V1 component then the modifications are rolled backed and the log record in the VBLOG table error flag is made against the failed V1 and V2 update is not executed at all. There are two components in update request a) Primary called as V1:.The time critical components are held in the V1 part. For successful completion of V2 component the V1 must be successful.plf gives the host of message server. DIAG sends the small data package through network to the dispatcher. buttons. • Message Server It is the service used by the different application servers to exchange the data and the internal messages. reports etc. Message server can be on any of the server not necessarily on the DB server. It routes the messages between the different application servers.) are held in the database and are sent to the user screen on demand. If error occurs in the V2 component then the modifications done by this component are rolled back. There is only one message server per SAP R/3 system. • Database Interface In SAP database includes everything (menus.e. screens. b) Secondary called as V2:-They are less time critical components held in V2. The SAPGUI also allows to upload and download functionality from the application server. The main function of the Gateway server is to exchange the large amount of the data between the application servers. In SAP the GUI components (Buttons. The update WP creates a log in the table VBLOG which contains the necessary information required for the updation of the records.

SAP Architecture Page 8 of 8 .  In SAP there are there types of data a) Master data which conatins information that does not change often e. invoices. user name. index. It also try to use the buffers held in the main memory of the application server to ensure the faster performance. accounting transaction etc.g.The main task of the database interface is to convert the SQL request from SAP development environment to the database’s own SQL request. ABAP dictionary is connected to the other part of the business applications. b) Control data which is held in the control tables which includes the system and tech. the database interface also makes the syntax check. SAP declared dictionary table have the corresponding underlined structure in the DB. SAP transparent tables are the structures that exactly matches the underlined database table structure. It also uses the cursor caching method which helps to reuse the already used path for the SQL statements. It also helps the developer to write the native SQL.g. customer order. This method is not recommended as it may creates the problem during the upgrade of the system. During the interpretation of the ABAP open SQL statements. definition of objects. Etc. c) Transaction data this data changes very rapidly e. fields. • ABAP Dictionary:It is the central source of definition of the objects (metadata) e. relationship with different tables etc. printer def.g. Functions of the sap system.