Tuesday, 4 November 2025

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.



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.





Monday, 23 September 2019

SAP FUNDAS REGARDING CLIENT COPY


SAP CLIENT COPY :

Client copy can be done by 3 different ways.

  1. Local Client copy
  2. Remote Client copy
  3. Client Export or Import
Local Client Copy : 
  •  Logon to the newly created client with sap* user and password.
  • Execute Tcode SCCL 
  • Select profile ,source client and start immediately 
Remote Client Copy :

  • Logon to the newly created client with sap* user and password.
  • Execute Tcode SCC9.
  • Select Profile and Source destination RFC and start immediately.
Client Export/Import :

  •  Client export done from source system using Tcode : SCC8, with select profile and target system and start immediately.
  • Client export done from newly created client from target system by executing tcode STMS_IMPORT and select the transport number which was created while doing export and now import the TR.

 

Monday, 16 September 2019

SAP BASIS FANDAS_SYSTEM REFRESH

SAP SYSTEM REFRESH



  • Why we do system refresh? 
      We do system refresh because we need data for testing in development layer.Those testing should be done by SAP functional consultants.Basically in system refresh activity what basis consultant do he just copy the production systems data into development layer so all developers can do testing.
  • Before starting system refresh what we need to do below steps 1st:     
  • We need to reset the source and destination client DDIC password of 000 client.
  • We need to reset the Schema password (SAPSR3).If not working need to reset it with BRTOOLS.
  • We need to reset the password of SIDADM.
  • We need to reset the password of ORASID.

Before starting we need to remember the following points :

1) Clone to be created through SNAPMIRROR volumes by storage team using the backup taken by BASIS.

2) Split the clone which will be done by storage team.
3) Unmount the original volume which will be done by unix team.
4) Rename the old data and log volume as OLD (volume name) by Storage team.
5) Rename the  volume  CLONE_ORA_(SID)_DATA to ORA_(SID)_DATA by storage team.
6) Now mount the volumes in ORA_(SID)_DATA physical server.
7) Application team will start the applications and monitor it.

The actual activity is divided into 3 types :

1) Pre refresh steps.
2) Actual activity.
3) Post Refresh steps.


Pre-Refresh steps:

  • Take screen shots of mount points.
  • Take a screen shot of client overview.
  • Execute tcode SCC8.Select SAP_USER profile to export the user data and authorization profile.


  • Check the schema user and schema user password working or if not then reset it with BRTOOLS or sql command
  • Take a backup of redo log files 1 hour before and 1 hour after from production system.
  • Take screen shot of Transport overview from STMS.
** Now during exporting from client / (100/200) with DDIC user we need to take the screen shot of the Transports , there will be 3 transport request i.e KO,KT,and KX.


KO transport is for : transporting cross client data
KT transport is for : Client specific data
KX transport is for : Client specific texts,provided texts available in that client.










  • Now we need to stop the background jobs :
SA38-> BTCTRNS1 and suspend all the standard background jobs
Now – stopsap & listener.

Go to the folder location /oracle/SID/refconf and go the folders mentioned below and delete Old log files in the folder mentioned below.


Implog – rm *.log
Refdmp – rm *.dmp
Reflog – rm *.log & rm nolog.txt 


  •  Backup of redo log files:






Now, start export: (It will run around 10-15mins)
here we use scripts to export RFC tables,we can also export those tables through transport.


Once export is done … bring the database down and take offline backup.
Now, send mail to Storage team to create clone.
Once work is done from UNIX and storage side, take as screenshot of df –PH command.

 DB Refresh (ORACLE) : Pre- steps

1) Take the backup (Online and Offline) of the production system through BRTOOLS or from db13 schedule the backup and copy those backup files and 3-4 archive files from source to destination server and rename it to SID/oracle/(tsid)/oraarch (use scp command).

Command : scp -r /oracle/SID/sapbackup root@destination server ip:/restore

2) Take RFC tables export through script or command."Export terminated successfully with warnings."
3) Take control file backup of Production system path will be :

from sql prompt : select name from v$controlfile;

Output will be :  NAME
--------------------------------------------------------------------------------
/oracle/SID/origlogA/cntrl/cntrlSID.dbf
/oracle/SID/origlogB/cntrl/cntrlSID.dbf
/oracle/SID/sapdata1/cntrl/cntrlSID.dbf

4) Now generate the control file from the source system :

>> alter database backup controlfile to trace;
>> exit

control file will be generated in the path :

/oracle/SID/saptrace/diag/rdbms/sid/ssid/trace/

file name will be with extention with .trc (SID...ora...xxxxx... .trc)

5) Now copy the trace file into oraarc directory and Edit the control files as mentioned below :

STARTUP NOMOUNT # delete before lines from 
     CREATE CONTROLFILE SET DATABASE "TSID" RESET LOGS FORCE LOGGING
     NOARCHIVELOG # edit 
CHARACTER SET WE8DEC; #delete after lines 

* Replace the Source SID to Destination SID.
** REUSE to SET.
*** NORESETLOGS to RESETLOGS.
**** ARCHIVE to NOARCHIVELOG.


6) Now we need to start the database with nomount option : startup nomount
7) Also execute the command "@SID_ora_xxxxx.trc" to create a control file in destination server.
8) Now recover the database command  : recover database until 'time stamp of backup need to recover' using  backup controlfile;  
(we can take the time stamp from redolog files which we took backup)

9) After recovery, stop the database and take offline backup.
10 ) Start the database : startup mount;
                                       alter database open resetlogs;

                                       commit;
                                       shu immediate;
11) Now start the Db in open state.

START REFRESH :

12 ) execute those commands after db start :

drop user ops$sapservice<ssid> cascade;
create user ops$<tsid>adm identified externally;
create user ops$ora<tsid> identified externally;
create user ops$sapservice<tsid> identified externally;
grant connect,resource,sapdba to ops$<tsid>adm;
grant connect,resource,sapdba to ops$sapservice<tsid>;
grant connect,resource,sapdba to ops$ora<tsid>;
SELECT * FROM DBA_USERS WHERE USERNAME = 'OPS$<tsid>ADM';
CREATE TABLE "OPS$<tsid>ADM".SAPUSER (USERID
VARCHAR2(256), PASSWD VARCHAR2(256));
INSERT INTO "OPS$<tsid>ADM".SAPUSER VALUES ('SAPR3','sap');

13) check r3trans -d if its connected with 0000 no issue if it give return code with 0012 we need to execute the below command :

                                      >> alter user SAPSR3 identified by sap;
 14) Login to su – sidadm
                        >Startsap all hostname


Post Steps:
 
Install license. ## Download license file from support.sap.com
Hit Sick and se06 commands and change system to new values
* Standard Installation, which has to be selected if the server installed with SAP Export
dump.
* Database copy or Migration, Which has to be selected if server installed with system
copy or Refresh mode.


**Configure the STMS .
***change the client setting in scc4 .
****Go to se03 system change options change to modifiable.
*****Change logical system name with the tcode BDLS
******Enable/Activate Audit log with Tcode SM19