Daily Transfer of Store POS and Retail Sales to SAP
Short answer: A custom interface that transfers the end-of-day sales of store tills into SAP. Sales are totalled per store, day and material and posted as goods issues from store stock, while turnover and payment types (cash, credit card, gift voucher) are posted to accounting; the till total and the amount posted in SAP are compared in a reconciliation list.
- Estimated effort
- L · 12–18 working days
- System
- ECC and S/4HANA
- Tables
- 7
- Scope
- Global · 1 industries
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
In the retail industry solution, POS sales are received with standard IDocs; systems without that solution have no ready inbound for till sales. Each store's daily sales are deducted from stock with MIGO/MB1A and posted to accounting manually with FB50, while entering them one by one as cash sales orders is not workable at high volume. The custom interface does this automatically every day and shows the differences.
Who uses it? Retail operations teams, store accounting, inventory control and finance 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 |
|---|---|---|---|
| T001WPlants/Branches | Plant representing the store, and its name | Read | ECC + S/4 |
| T001LStorage Locations | Store storage location | Read | ECC + S/4 |
| MEANInternational Article Numbers (EANs) for Material | Barcode to material mapping | Read | ECC + S/4 |
| MARDStorage Location Data for Material | Stock check in the store location | Read | ECC + S/4 |
| MSEGMaterial Document Item | Goods issue items for sales (ECC) | Write | ECC only |
| MATDOCMaterial Documents (S/4HANA) | Goods issue items for sales (S/4HANA) | Write | S/4HANA only |
| BKPFAccounting Document Header | Turnover and collection accounting document; reference for the duplicate check | Read / write | ECC + S/4 |
S/4HANA notes
- MARD → MATDOC: In S/4HANA stock quantities are no longer stored physically; reading MARD returns values calculated on the fly from MATDOC through a compatibility view. Reads still work, but test performance on very large selections.
- MSEG → MATDOC: In S/4HANA MATDOC replaces MSEG; reading MSEG works through a compatibility view but is slow at high volumes.
BAPIs and functions used
- BAPI_GOODSMVT_CREATEPost Goods Movement. Posts the goods issue for sales from store stock
- BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts turnover, VAT and payment types to accounting
- BAPI_SALESORDER_CREATEFROMDAT2Create Sales Order. Optional: creates cash sales orders for SD statistics
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Commits each store-day posting
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_PATH | Folder of the end-of-day files | Single value | — | Yes | /interface/pos/gelen/ |
| P_BUDAT | Posting date (blank = sales day) | Single value | BKPF-BUDAT | No | — |
| P_BWART | Sales movement type | Single value | MSEG-BWART | Yes | 251 |
| P_SDORD | Also create cash sales orders | Checkbox | — | No | — |
| P_TEST | Test mode (check without posting) | 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 | Store (plant) | T001W-WERKS | Yes |
| 2 | Storage location | T001L-LGORT | No |
| 3 | Sales date | BKPF-BUDAT | Yes |
| 4 | Barcode | MEAN-EAN11 | Yes |
| 5 | Quantity | MSEG-MENGE | Yes |
| 6 | Net amount | BSEG-WRBTR | Yes |
| 7 | Tax code | BSEG-MWSKZ | Yes |
| 8 | Payment type | By rule POS payment type code; mapped to a G/L account during installation | No |
Sample upload file
| 1 | Store (plant) * | Storage location | Sales date * | Barcode * | Quantity * | Net amount * | Tax code * | Payment type |
|---|---|---|---|---|---|---|---|---|
| 2 | M012 | 0001 | 11/15/2026 | 8690000123456 | 3 | 1,497 | K2 | KART |
| 3 | M012 | 0001 | 11/15/2026 | 8690000654321 | 1 | 349.90 | K2 | NAKIT |
| 4 | M015 | 0001 | 11/15/2026 | 8690000777001 | -1 | -899 | K2 | KART |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Store | T001W-WERKS |
| 2 | Store name | T001W-NAME1 |
| 3 | Sales day | Calculated Sales date in the file |
| 4 | Till turnover | Calculated Σ net amount in the file |
| 5 | Turnover posted in SAP | Calculated Σ revenue lines in the accounting document |
| 6 | Difference | Calculated Till turnover − turnover posted in SAP |
| 7 | Goods issue document | MSEG-MBLNR |
| 8 | Accounting document | BKPF-BELNR |
| 9 | Failed rows | Calculated Number of rows not matched or not posted |
| 10 | Status | Calculated Posted, difference, duplicate or error |
Sample result list
| Store | Store name | Sales day | Till turnover | Turnover posted in SAP | Difference | Goods issue document | Accounting document | Failed rows | Status |
|---|---|---|---|---|---|---|---|---|---|
| M012 | Örnek Market Kadıköy | 11/15/2026 | 184,320.50 | 184,320.50 | 0 | 4900812233 | 0100045120 | 0 | Posted |
| M015 | Örnek Market Bornova | 11/15/2026 | 96,410 | 95,511 | 899 | 4900812234 | 0100045121 | 1 | Difference |
| M018 | Demo Retail Nilüfer | 11/15/2026 | 121,780.25 | 121,780.25 | 0 | 4900812235 | 0100045122 | 0 | Posted |
| M012 | Örnek Market Kadıköy | 11/15/2026 | 184,320.50 | 0 | Duplicate |
How does the program work?
- Each store’s end-of-day file (or the single file of the central POS server) is read from a folder on the application server. The store code is mapped to plant and storage location (T001W, T001L), the POS article code or barcode to the material (MEAN).
- Checks: has the same store and day already been processed (document header reference store-date), is the barcode defined, does the material have stock in the store location (MARD). Unmatched rows go to an error file; the rest are processed.
- Rows are totalled per store, day and material; returns are kept separate. Turnover is also totalled by tax code and collections by payment type.
- Stock: a goods issue for sales (movement type 251, 252 for returns) is posted from the store location with BAPI_GOODSMVT_CREATE.
- Accounting: BAPI_ACC_DOCUMENT_POST credits revenue accounts by tax code and debits cash, card receivables and gift voucher accounts by payment type; the profit center is the store. If SD statistics are needed, the same totals can also be created as cash sales orders and invoices (BAPI_SALESORDER_CREATEFROMDAT2).
- The reconciliation list shows per store and day the till turnover, the turnover posted in SAP, the difference, and the goods issue and accounting document numbers.
Performance notes
Post store-day-material totals instead of receipt lines; this reduces the number of documents by orders of magnitude. Read the barcode mapping from MEAN once and buffer it. Split stores into parallel background jobs so that the run completes within the night window.
Features
- Runs as a background job A nightly job processes the files of all stores and prepares the reconciliation list for the morning.
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Rows with an unknown barcode can be reprocessed after correction.
- ALV list (sort, filter, subtotals)
Authorization objects
- M_MSEG_BWAGoods movement posting authorization by movement type
- M_MSEG_WMBGoods movement authorization by plant (store)
- F_BKPF_BUKAccounting posting authorization by company code
Frequently asked questions
Are sales posted per receipt or in totals?
By default they are posted in totals per store, day and material; this is sufficient for stock and accounting and keeps the number of documents low. If receipt detail is needed, the file is archived and the reconciliation list can drill down to receipt lines.
What happens if a product with a barcode unknown in SAP is sold?
The row goes to the error file and the rest of the store-day is processed; the difference appears in the reconciliation list. Once the barcode is defined, only the failed rows are reprocessed.
Do we need this interface if we use the retail industry solution?
In that case the standard POS inbound IDocs are preferred. This interface is for core SAP systems running without the retail industry solution, which is common for manufacturers and wholesalers with their own stores.
Related reports
MB52 – List of Warehouse Stocks on Hand
MB52 is the standard SAP report (program RM07MLBS) that lists current material stocks per plant and storage location by stock type, together with …
Billing Documents Not Posted to Accounting Report
A custom ALV report that lists billing documents which exist in SD but have no accounting document yet, with the reason code, age and amount. At …
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.