ORDER CREATION CUSTOMIZATION USING BAPI
- Esma Sümer
- May 1
- 2 min read
In the SAP system, transactions such as sales order creation are normally entered manually by users via the VA01 screen. However, in some cases, it is necessary to automate this process. This is where order creation customization using BAPI comes into play.
What is the purpose?
To eliminate the need for manual user input,
To automatically create orders in the background of the system,
This saves time, reduces the margin of error, and speeds up the process.
In this operation, we use a standard tool provided by SAP called BAPI (Business Application Programming Interface). By simply calling a function module, you can create a real sales order in the system.
First, go to the relevant screen using the SE37 transaction code. Enter the BAPI name BAPI_SALESORDER_CREATEFROMDAT1 in the Function Module field. (Alternatively, we can also use the existing BAPIs BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CREATEFROMDATA in the system.)
Press F8 to execute.

After entering the screen, click on the "Details View/Edit" button marked in red.

The input parameters of the function module are displayed horizontally. Here, we can either enter them one by one, or switch to a more detailed input screen by clicking the highlighted button on the right side of the screen.

We fill in the fields we want to complete as shown below.


After completing the relevant fields, we need to return to the previous screen and go to the ORDER_ITEMS_IN section (Order items). This is where we enter information such as which materials will be included in the order and how many units are required. Click the blue button to open the detail screen.

After filling in the fields as shown below, we click the green checkmark and return to the main screen.

Next, we go to the ORDER_PARTNERS section. This is where we define information such as the customer placing the order and the person who will receive the shipment. Again, we click the blue button.

We enter the partner role and partner number as shown below. The SP partner role refers to the person who places the sales order and is usually the main contact within the sales organization. It represents the customer who is purchasing or placing the order. When creating a sales order (VA01), the customer number we enter is actually entered under the SP role. That’s why we wrote SP as the role here.

After this, we click the green checkmark again to return to the main screen and press F8 to execute. Now, a sales order with number 10000117 has been created for customer 3000000004.

When we go to the VA02 screen, we can see that order number 10000117 appears as the most recently created order in the system.


コメント