Friday 24 May 2019

SAP BASIS FANDAS LOCK MANAGEMENT



LOCK MANAGEMENT CONCEPT IN SAP SYSTEMS



To Ensure the data consistency within a SAP system ,we need to ensure that the data is not editable by more than one user.
To do that SAP system used enqueue work process.The enqueue work process manages a logical lock of the sap transaction in the lock table.Now this lock table is located in the main memory of the instance with enqueue work process.
The instance whose main memory contains the lock table is called ENQUEUE SERVER.

Locks are different types :

  1. Write locks (Exclusive Lock) : This kind of lock can be edited by one user.The requests for another edit lock and read lock should be rejected.A Write lock protects the lock objects against all types of transactions.Only the same lock owner can set the lock again.An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock (accumulate).
  2. Read Locks (Lock Mode Shared) : This kind of lock having read access while a table is lock by any user.
    Several users (transactions) can access locked data at the same time in display mode. Requests from further shared locks are accepted, even if they are from different users.
    An exclusive lock (E) set by another user on an object that already has a shared lock will be rejected. Every extended exclusive lock (X) will also be rejected.
  3. Enhanced write locks  X (eXclusive non-cumulative) : while a write lock is successively requested and released by the same transaction an enhanced write lock can be requested once,even by the same transaction.Whereas exclusive locks can be requested several times by the same transaction and released one by one, an exclusive, non-cumulative lock can only be requested once by the same transaction. Each further lock request will be rejected.
  4. Optimistic Lock : An Optimistic lock is behaving like that 1st it request access to read data and then after it can be changed to write locks.An optimistic lock is set if the user display data in change mode.  Optimistic locks initially behave like shared locks and can be converted into exclusive locks.
Main thing is if any one access a table in edit mode and making some changes then other users can't do any changes in the table at that time.Only read only mode can be access by the other users.
When the user1 will release the editable mode then only user2 can access the table or if it exceeded the idle time limit then also the enqueue lock automatically release and user2 can access the table.

From TCODE SM12 we can delete the lock,by deleting the user session .
But before deleting it from sm12 we need to send a mail to that particular user. We can get the user details from SU01,also checks SM04 that whether the user is still logged on or not before deleting anything.





Wednesday 22 May 2019

SAP BASIS FANDAS BASIC


 


PRELIMINARY FANDAS FOR SAP BASIS


  • What is ERP?

Answer : Its called Enterprise Resource Product.

SAP ERP : In that Product there is multiple modules like BASIS,CRM,ABAP etc.

Sap Erp is divided into 2 products i.e CRM and SCM.

  • Types of SAP architecture for BASIS people:

R/1 : Main frame systems 
R/2 : Client Server Architecture
R/3 : Client+App server+ Database (Client is in presentation layer ,App server is in Application layer , and DB server is in database layer).

  • Full form of BASIS?
 Business Application Systems Integrated Solutions 

  • Basis are divided into 2 part for business i.e below
 i) Implementation : a) Hardware Sizing 
                                 b) Operating system and Database.
                                 c) Remote Desktop
                                 d) Download the software's from SAP service market place.
                                 e) Installation
                                 f) Post Installation steps 
ii) Support : a) Level1 i.e Monitoring sap systems
                    b) Level 2 i.e Trouble shooting,Working on tickets,Ticketing tools,Job tools.
                    c) Level 3 i.e Critical issues.
From Business prospective there are SLA (Service level Agreement) on tickets.

  • Architecture of the SAP R/3:

 

In the picture SAP GUI is application layer and PAS and AAS is in application layer and Database is in database layer.

Need to remember that Message Server always will be in PAS i.e Primary application server.

MSG server : Message Server
GTW server : Gateway Server
WP : Work process
ENQ server : Enqueue server
PAS : Primary Application Server
AAS : Additional Application Server
DB : Database
  • What is Dispatcher ?
 SAP dispatcher is the control agent which manages the resources for R/3 applications.
Mainly dispatcher works for load balancing in process management.

  •  What is SAP Work Process?
An Sap application server has dispatcher , all the request are coming from sap gui or front end landed in sap dispatcher.Then the dispatcher transfers the requests to work process.Then the WP execute the desired requests.


  • Types of Work Process in SAP system?Back
          1) DIALOG WP                   
          2) BACKGROUND WP
          3) UPDATE WP
          4) SPOOL WP
          5) ENQUEUE WP

1) Dialog Wp: Dialog work process fulfill all the requests  for execution of dialog steps trigger by an active user.Every dispatcher need at least 2 dialog wp and maximum 98.

2) Background Wp: Back Ground wp execute programs that run without interacting with the user.
We need at least 2 Background Wp and maximum 98.

3) Update Wp: Update wp execute update requests.we need at least 1 update wp in dispatcher.
we can configure multiple update wp in a dispatcher.

4) Spool Wp : Spool work process pass sequential data flows on to printers.we need at least 1 spool wp.

5) Enqueue Wp : The Enqueue wp administers the lock table in the shared memory.The lock table contains the logical database locks of the abap run time environment of the SAP system.Only one enqueue wp need for for each system.




  • What is ABAP Message Server ?
Message Server handles communications between the distributed dispatchers within AS ABAP systems,thereby enabling scalability of several parallel application servers.
Message server is configured only once per SAP system.

  • What is Gateway Server?
 The Internet gateway server enables the communication between 2 SAP systems and also SAP server to Outside and vice versa.
There is one per dispatcher .

  • What is ICM (Internet Communication Manager)?
 An ICM enables the communications between SAP systems through HTTP protocol.The ICM receive the requests from users and forward them to SAP systems (ABAP+JAVA) .In dual stack system (ABAP+JAVA) its recognize the request whether it came for ABAP system or AS JAVA system and process them accordingly.It can also process HTTP request from SAP system to any Web Server and send the response back to SAP server.
Need to remember that we can configure 1 ICM process per application server.


 





The following process are there in AS JAVA server:

  1. The Dispatcher distributes the incoming requests to server process.
  2. The server process executes the java applications.Every Server process can process a large number of requests in parallel.For each dispatcher there is at least once server process and can be up to 16 server process.
  3. The Java message services manages a list of java dispatchers and server process.It is responsible for the communication within java run time environment.
  4. The java enqueue services manages the logical locks that are set by executed java application program in a server process.


  • Types of SAP Net weaver AS :


         Architecture SAP 7.0 and lower





















Architecture SAP 7.1 and Higher.

 Changes we can see in SAP netweaver 7.1 and higher :

  1. The CI  was renamed to PAS (Primary application server)
  2. The Dialog Instance is renamed as AAS (Additional Application Server)
  3. The Java Dispatcher is replaced by ICM .
  4. The SDM process is discontinued.
  5. The Java central instances has compromises a gateway process.