Archive for the ‘Sample Code’ Category

Tic-Tac-Toe Game in SAP

Monday, August 24th, 2009

The main objective of this program is to develop a game in abap. The game is called as “Tic Tac Toe” which can be played against a computer. Simple procedures are used to write this program. Use of selection screen concepts are done in this game.

Tic-Tac-Toe Game

(more…)

Convert Spool Request to PDF in SAP

Saturday, August 22nd, 2009

The following program converts the spool requests (can be seen using SP01) to PDF format on your PC.

At Program execution, specify the path where to download the PDF file.

Spool Request-To-PDF

(more…)

Deactivate an Account in SAP

Thursday, August 20th, 2009

This report de-activates the account of the specified user. This can be used as a utility to SAP BASIS people.

Please be cautious of its use, and thus should be used correctly.

(more…)

Lock Objects in SAP

Wednesday, August 19th, 2009

Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.

SAP Provide three type of Lock objects.

- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table

- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.

- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.

Type of Locks

(more…)

ABAP Program to Hide Source Code of a Program

Saturday, August 8th, 2009

Although this method is not recommended by SAP and I have not found any ‘Rollback’ to retrieve the source code for this hide, still it can be used for Source Code Hiding taking following points into consideration:

1. Please do take a backup of the code (.txt).

2. At the time of unhiding( source code 2 in the following sample code), source code is lost/blanked. Copy-paste the code from the backup.

Enter Program Name to Hide

Enter Program Name to Hide

(more…)