Row level locking of database table

SAPThe default behavior is if a person opens table maintenance generator and tries to maintain the table, the table is locked and no one else can maintain the same table at the same time.

This is because there is a “table-level lock” by default in SAP. This means only one user can maintain any table at a time through SM30 or any transaction that calls table maintenance generator. In the tutorial below you will find out how to replace table level lock with row level lock.
By row-level lock you ensure any number of users can modify the table at same time, but any particular row can be modified by only one user at a time (the first one who accessed the row for maintenance). We will create a transaction for this purpose. This transaction will call our custom report where at first the table lock is deleted and subsequently the table maintenance generator will be called. Continue reading

SAPScript: different column headers for different lists

SAPOnce I needed to have several lists in MAIN window output and each of these lists needed to have different column headers. As usually, there are several ways how to achieve this and I’ll try to present two possible ways:

Continue reading

SAP: How to create Data Source based on InfoSet

SAPIf you want to create a new datasource based on InfoSet where data is retrieved by your own Z-program, then walk through this tutorial and use it as an example or guide during creation of your own data source. Continue reading

Check if ABAP program runs in production system

SAPThere are lot of cases where you need to run a whole program or its piece in development or testing environment only and you want to avoid running it in production. Or vice versa. In the following article I’ll show you a construct which will check if you’re running on production system or not. Continue reading