-->

Thursday, October 26, 2023

SAP Shortcut Keys



What is the use of F1 key in SAP?
Ans: F1 – Help.

What is the use of F4 key in SAP?
Ans: F4 – Possible entries or match code for the field you are accessing.

What is the use of F5 key in SAP?
Ans: F5 – Selection screen

What is the use of F7 key in SAP?
Ans: F7 – Previous screen

What is the use of F8 key in SAP?
Ans: F8 – Next screen

What is the use of F9 key in SAP?
Ans: F9 – Technical info


What is the use of /n in SAP?
Ans: /n – Skip to the next record if you are processing one batch input session.

What is the use of /bend in SAP?
Ans: /bend – Cancel a batch input foreground process.

What is the use of /nend in SAP?
Ans: /nend – Close all R/3 sessions and logoff.

What is the use of /nxxxx in SAP?
Ans: /nxxxx – Call the transaction xxxx in the same session.

What is the use of /o in SAP?
Ans: /o – Generate a session list.

What is the use of /oxxxx in SAP?
Ans: /oxxxx – Call the transaction xxxx in an additional session.

What is the use of /i in SAP?
Ans: /i – Delete the current session.

What is the use of /h in SAP?
Ans: /h – Turn the debug mode on.

What is the use of /$tab in SAP?
Ans: /$tab – Reset all buffers (for System Administrators).


To get SAP Job Updates

Types of Locks


There are different types of locks in SAP ABAP. The lock mode describes what type of lock it is. There are four types of locks in the SAP System:
1.   Shared lock.
2.   Exclusive lock.
3.   Exclusive but not cumulative lock.
4.   Optimistic lock

To get SAP Job Updates

SAP LOCK MODES


Types of Lock Modes

There are four types of lock modes in the SAP System:

1.   S (Shared) mode for shared lock.
2.   E (Exclusive) mode for exclusive locks.
3.   X (eXclusive non-cumulative) mode for exclusive but not cumulative locks
4.   (Optimistic) mode for optimistic lock



    Shared lock uses S (Shared) mode – where several users (transactions) can access locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock set on an object that already has a shared lock will be rejected.

     Exclusive lock uses E (Exclusive) mode – where 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). Exclusive locks can be requested several times from the same transaction and are processed successively.

     Exclusive but not cumulative lock uses X (eXclusive non-cumulative) mode – where in contrast to Exclusive locks, exclusive but not cumulative locks can be called only once from the same transaction. Each further lock request will be rejected.
 

     Optimistic lock uses (Optimistic) mode – where optimistic locks initially behave like shared locks and can be converted into exclusive locks.

To get SAP Job Updates




What are SAP locks?


SAP locks exists until the application data has been changed in the database, that is, in most cases, until the SAP update is completed. This does not impair performance, since the lock is not a database lock.
To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the SAP System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.
The SAP lock concept is based on lock objects. Lock objects allow you to set SAP locks for entire application objects. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships. Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary. When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_Name and DEQUEUE_Name. The former allow you to lock in the table, the latter releases the lock object

To get SAP Job Updates

SAP LOCKS FAQ


What is database locks?

The database lock exists only for the duration of the database LUW, in which the changes made in the SAP system are actually updated. Logical SAP locks must be set in dialog programs to prevent concurrent data accesses because set database locks may be implicitly removed before the changes have been made to the data

Life-Span of SAP Locks or Duration of SAP Locks

Locks remains set until you either call the corresponding DEQUEUE function module, or close the transaction with an implicit DEQUEUE_ALL. Saved locks inherited by the update task are loaded back into the lock table when the system is started up. Lock operations last for a few 100 microseconds in work processes in the lock server.

Where is the lock table stored?                                        

 In the main memory and shared memory of the enqueue server. All work processes in the enqueue server have access to it.

Can locks exist directly after startup?              
Yes, the saved locks, which were inherited by the update task, are reloaded to the lock table during startup.             

 

Are the locks in the lock table also set at the database level?        

Locks are not set on the database. The lock table is stored in the main memory of the enqueue server.

Is a lock table built if an enqueue work process is not started on the enqueue server in the instance profile?           
Yes, because the work processes on the enqueue server use the lock table directly, and not via the enqueue process. The latter is only responsible for lock requests from external application servers.  

How can I find out who is currently holding the ungranted lock? In other words, how can check the program after an ENQUEUE to determine which use is currently holding the lock so that I can let him or her know?                                  
When the ENQUEUE_Name function module is returned, the name of the lock owner is listed in SY-MSGV1.


What is Wild Cards in sap locks?

You can use special characters in your lock argument (especially the ‘at’ sign (@)). The ‘at’ symbol is used as a wildcard in SAP locks (enqueues). In other words, it can stand for any other character during collision checks. In order to prevent the wildcard mechanism from being activated in SAP locks when it is not required, you need to ensure when enqueue function modules are called that key value parameters do not contain any wildcard characters. If key values that you want to use to lock individual entities do contain wildcard characters, you have to replace the wildcards with different characters before the enqueue is called. 

 

Can I use special characters in my lock argument (especially the ‘at’ sign (@))?
The ‘at’ symbol is used as a wildcard in SAP locks (enqueues). In other words, it can stand for any other character during collision checks. For example, the parameter value 12345@ locks the quantities 123450 to 123459, 12345a to 12345z, and 12345A to 12345Z, and all other values with any special character in the 6th character position.               

 

What happens to locks when the enqueue server is restarted?

If they have not been saved to disk in the backup file, they will be lost. The locks that are inherited by the update task when COMMIT WORK is executed after CALL FUNCTION.. IN UPDATE TASK are saved to disk. The locks are saved to disk when the update request becomes valid, that is, with the COMMIT WORK. Each time the enqueue server is restarted, the lock entries saved on the disk are reloaded to the lock table. A lock is saved to disk at the point at which the backup flag is set.     

To get SAP Job Updates