Dealer (B2B) Order Portal Integration with SAP Sales Orders
Short answer: A custom integration between the dealer order portal and SAP. Orders from the portal are checked and turned into sales orders automatically; the order number, confirmed quantity and date are returned to the portal. The portal queries the dealer-specific price, open orders and account balance from SAP in real time, so the price list is not kept in two places.
- Estimated effort
- L · 12–18 working days
- System
- ECC and S/4HANA
- Tables
- 9
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
In the standard, external orders can be received via EDI/IDoc (and reprocessed with BD87), but this needs an EDI partner setup and a converter for each dealer, and most dealers do not use EDI. ECC has no ready service that offers the dealer price, balance and order status queries a portal needs. S/4HANA has released sales order APIs, but duplicate checks, dealer-specific responses and error handling still have to be designed. As a result portal orders are often retyped in VA01.
Who uses it? Dealer channel sales teams, order entry and customer service, portal and integration teams.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| VBAKSales Document Header | Sales order header created | Write | ECC + S/4 |
| VBAPSales Document Item | Order items created | Write | ECC + S/4 |
| VBKDSales Document: Business Data | Duplicate check by portal order number (customer PO number) | Read / write | ECC + S/4 |
| VBEPSales Document: Schedule Line Data | Confirmed quantity and date (response to the portal) | Read | ECC + S/4 |
| KNVVCustomer Master Sales Data | Dealer's sales area data | Read | ECC + S/4 |
| KNVPCustomer Master Partner Functions | Dealer's ship-to partners | Read | ECC + S/4 |
| KNA1Customer Master (General Section) | Dealer name and order block | Read | ECC + S/4 |
| MVKESales Data for Material | Sales status of the material | Read | ECC + S/4 |
| BALHDRApplication Log Header | Processing log of each portal message | Write | ECC + S/4 |
BAPIs and functions used
- BAPI_SALESORDER_CREATEFROMDAT2Create Sales Order. Creates the sales order from the portal order
- BAPI_SALESORDER_SIMULATESimulate Sales Order. Calculates the dealer-specific price and confirmation date for the portal
- BAPI_SALESORDER_GETSTATUSDisplay Sales Order Status. Returns the open order status to the portal
- BAPI_AR_ACC_GETKEYDATEBALANCECustomer Account Balance at Key Date. Returns the dealer's account balance
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Commits the order
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_AUART | Order type for portal orders | Single value | VBAK-AUART | Yes | OR |
| S_KUNNR | Dealer (monitor screen) | Range / multiple | VBAK-KUNNR | No | 200510 |
| S_ERDAT | Message date (monitor screen) | Range / multiple | VBAK-ERDAT | No | 16.11.2026 |
| P_ERR | Show failed messages only | Checkbox | — | No | X |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Portal order number | VBKD-BSTKD | Yes |
| 2 | Dealer | VBAK-KUNNR | Yes |
| 3 | Ship-to | VBPA-KUNNR | No |
| 4 | Material | VBAP-MATNR | Yes |
| 5 | Quantity | VBAP-KWMENG | Yes |
| 6 | Unit | VBAP-VRKME | No |
| 7 | Requested delivery date | VBEP-EDATU | No |
Sample upload file
| 1 | Portal order number * | Dealer * | Ship-to | Material * | Quantity * | Unit | Requested delivery date |
|---|---|---|---|---|---|---|---|
| 2 | B2B-2026-118734 | 200510 | 200511 | FG-1040 | 24 | ST | 11/25/2026 |
| 3 | B2B-2026-118734 | 200510 | 200511 | FG-2210 | 10 | ST | 11/25/2026 |
| 4 | B2B-2026-118790 | 200534 | 200534 | FG-1040 | 60 | ST | 11/28/2026 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Message time | Calculated Date and time the message was received (BALHDR) |
| 2 | Portal order number | VBKD-BSTKD |
| 3 | Dealer | VBAK-KUNNR |
| 4 | SAP order | VBAK-VBELN |
| 5 | Net value | VBAK-NETWR |
| 6 | Currency | VBAK-WAERK |
| 7 | Confirmation | Calculated Fully, partly or not confirmed (VBEP-BMENG) |
| 8 | Status | Calculated Created, awaiting approval, duplicate or error |
| 9 | Message | Calculated First error or information message from the BAPI return table |
Sample result list
| Message time | Portal order number | Dealer | SAP order | Net value | Currency | Confirmation | Status | Message |
|---|---|---|---|---|---|---|---|---|
| 2026-11-16 09:14 | B2B-2026-118734 | 200510 | 10024580 | 30,480 | TRY | Fully | Created | Order saved |
| 2026-11-16 10:02 | B2B-2026-118790 | 200534 | 10024583 | 52,200 | TRY | Partly | Awaiting approval | Credit limit exceeded; order blocked |
| 2026-11-16 10:05 | B2B-2026-118790 | 200534 | Duplicate | This portal order number was already received as 10024583 | ||||
| 2026-11-16 11:37 | B2B-2026-118812 | 200588 | Error | Material FG-3300 is not released for sale |
How does the program work?
- The portal sends the order to a REST/JSON service: dealer code, portal order number, ship-to, items and requested delivery date. The service user is authorized for this service only.
- Checks: the dealer is defined in the sales area (KNVV) and has no order block (KNA1-AUFSD), the ship-to is a partner of the dealer (KNVP), the material is released for sale (MVKE-VMSTA), and the same portal order number has not been received for this dealer before (VBKD-BSTKD).
- The order is created with BAPI_SALESORDER_CREATEFROMDAT2 in the order type defined for the portal; the portal order number is written as the customer PO number. Pricing, campaigns and credit check run in standard order processing.
- Response: SAP order number, confirmed quantity and date per item (VBEP) and net value. If the order was saved incomplete or with a credit block, the portal receives an “awaiting approval” status; errors are returned with their message texts.
- Query services: price simulation via BAPI_SALESORDER_SIMULATE, open order status via BAPI_SALESORDER_GETSTATUS and account balance via BAPI_AR_ACC_GETKEYDATEBALANCE.
- Each message is written to the application log (BALHDR) with its result. A monitor screen shows failed messages; after the data is corrected the message can be reprocessed.
Performance notes
Do not simulate the whole catalogue item by item for price queries; let the portal make one simulation call for the items in the basket. Run the duplicate check with an indexed read on VBKD-BSTKD. At peak hours queue order creation, but keep the query services synchronous.
Features
- Line-by-line result and error log Every portal message is kept in the application log with its result.
- ALV list (sort, filter, subtotals)
- Runs as a background job Queued orders and status updates are processed by a short-interval job.
- Download failed lines as a separate file
Authorization objects
- V_VBAK_AATAuthorization to create orders of the portal order type
- V_VBAK_VKOSales order authorization by sales organization
- S_SERVICEAuthorization for the service user to call the portal service only
Frequently asked questions
Which portal technology does it work with?
It works with any portal that can make REST/JSON calls. On the SAP side the service and message structure are agreed with the portal team during installation; if middleware is used, the service is placed behind it.
How does the portal price stay the same as the SAP price?
The portal takes the price from a simulation of SAP pricing rather than from its own list. Condition records, discounts and campaigns are therefore kept in one place and the price does not change when the order is created.
What happens to the order of a dealer over its credit limit?
The order is created in SAP but stays blocked by the standard credit check; the portal shows it as "awaiting approval". When the credit team releases the block, a status update goes to the portal.
Related reports
Credit-Blocked Sales Orders by Value and Age Report
A custom ALV report that groups credit-blocked sales orders per credit account and shows the blocked order value, the age of the oldest block, the …
Incomplete Sales Orders with Missing Fields Report
A custom ALV report that lists sales orders with an incompletion log, one line per missing field, with the field name, the affected item, the order …
Mass Sales Order Creation from Excel Program
A custom program that creates sales orders in bulk from the rows of an order file sent by the customer. It groups rows into orders by customer PO …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.