The following diagram shows the components of SAP ABAP. Generally speaking, it contains the ABAP language, development environment, runtime environment, technologies that based on ABAP and other tools & services. All these components forms the ABAP (Advanced Business Application Programming).
In order to be a senior ABAP consultant, you should have a good command of all these components. I wants to share my personal experience on all these topics.
Read more…
In ABAP Objects programming, event handling – event trigger and event handler means that certain methods act as triggers and trigger events, to which other methods – the handlers – react. This means that the handler methods are executed when the event occurs. This works exactly like the delegates and events in C#.
Both ABAP and C# programming language supports the event programming from language level. This feature can be used to implement observer pattern easily. The observer pattern (a subset of the publish/subscribe pattern) is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. Below diagram illustrate the class diagram of observer pattern.
Read more…
ALV is the abbreviation of SAP List View which is an UI element for displaying tabular data. ALV provides a rich set of functionalities like sorting, filtering, aggregation, exporting, persistence of custom settings.

History of SAP ALV
ALV is formerly known as ABAP List Viewer. From basis 4.0, ALV is available for SAP internal usage based on ABAP list processor technology.
Read more…
In some cases, the business wants to store some constants in a custom table not hardcode in the program directly. This will be allow users to change the constants directly in QA or Prod system without changing the program. This posts try to give a tutorial on how to create such a custom table.
Step 1. Create a custom table with delivery class ‘C’.
Read more…
BAPI – BAPI_SALESORDER_CREATEFROMDAT2 is designed to create sales order from external system. It belongs to object type BUS2032.
Note
If you fill the target_qty field in the item table but the sales order created with the quantity ‘0’. – You need to fill the schedule line table and maintain the req_quantity field as well. Below code snip can be used to create sales order.
Read more…
ABAP language allows calling program exposes some data definition to the called subroutines which exists in other programs. All these programs are loaded into the same internal session. This can be achieved using statement DATA BEGIN OF COMMON PART.
DATA BEGIN OF COMMON PART as well as TABLES, NODES are used to define interface work areas. The interface work area exists once only in each program group and are shared by all of its programs. Each main program that begins with the PROGRAM or REPORT statement, and each function group that begins with FUNCTION-POOL shares the interface work areas with the main programs of all of its external subroutines.
This illustration shows the memory organization for external subroutines and function modules.
Read more…
SAP Object Type is the object-oriented modeling of business objects such as sales order, customer, vendor. All these Object Types are stored in BOR (Business Object Repository) which acts as the central repository for all the object type definition. BAPIs are defined as methods of SAP business object types (or SAP interface types). The Object Type is also the foundation of SAP business workflow.
Below is a great tutorial on how to create a custom object type in BOR step-by-step. I finished this guide today and found it is quite useful. I would like to share it with my blog audiences.
Tutorial: Workflow Programming
In this tutorial, I try to explain how to use t-code WE19 to test an IDoc inbound processing. This is a very basic tutorial but I believe it is very helpful for beginners to have a general understanding of IDoc processing. The test scenario for this tutorial is an external SAP system sends an IDoc to the receiver SAP system and the receiver SAP system will send the inbound IDoc to the agent to review.
Below are the steps to configure, test and monitor the whole scenario. All these steps are performed in the receiver system as I use the WE19 to simulate the inbound IDoc, so all the configuration activities in the sender system is omitted in this tutorial.
Step 1. Define the logical system for the external SAP system
Go to transaction BD54 to add a new logical system for the external SAP system. You can find the external SAP system’s logical system using transaction SCC4 and select the correct client you are using, you can find the assigned logical system to this client.
Read more…
In certain circumstances, programmer needs to make the complex or time consuming logic to be executed asynchronously. There are two methods to make this happen.
Update Techniques – Update Function Module
The main purpose of SAP update technique is to group all the changes on the business data into a same SAP LUW. All the update function modules in the same SAP LUW will be executed in the update work process other than the dialog work process which runs the main transaction program. This feature can also be used for the asynchronous programming.
ABAP also allows you to perform the update synchronously using statement:
or local update using statement:
Read more…
Transaction represents a sequence of actions which logically belong together. All these actions must be executed completely or not at all. This will prevent the inconsistent business data. The transaction must be atomic, consistent, isolated and durable. There are two kind of transaction in ABAP.
Database LUW
Database LUW is the same like the transaction mechanism in other programming language. It relies on the DBMS.

Read more…