Automatic Vendor Reminder Email for Overdue Purchase Orders
Short answer: A custom program that runs every morning in the background, collects overdue open purchase order lines per vendor and sends each vendor one email with its own overdue lines and days late. The purchasing group receives the email in copy; vendors that could not be emailed are listed in the log.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
ME9F (and ME91F) produce reminder messages per order according to the reminder levels in the output setup. They do not combine all overdue lines of a vendor with days late into one email, and they do not work at all in companies without order output setup. Buyers write these reminders by hand from an Excel list every week.
Who uses it? Buyers and purchasing managers; indirectly the vendors.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| EKKOPurchasing Document Header | Vendor, purchasing organization and group | Read | ECC + S/4 |
| EKPOPurchasing Document Item | Open items: material, short text, unit | Read | ECC + S/4 |
| EKETPurchasing Schedule Lines | Delivery date and open quantity | Read | ECC + S/4 |
| LFA1Vendor Master (General Section) | Vendor name, address number and correspondence language | Read | ECC + S/4 |
| ADR6E-Mail Addresses (Business Address Services) | Vendor email address | Read | ECC + S/4 |
| T024Purchasing Groups | Purchasing group email address (copy recipient) | Read | ECC + S/4 |
BAPIs and functions used
- SO_NEW_DOCUMENT_ATT_SEND_API1SAPoffice: Send New Document with Attachments. Sends the email with HTML body and Excel attachment to the vendor
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_EKORG | Purchasing organization | Range / multiple | EKKO-EKORG | Yes | 1000 |
| S_EKGRP | Purchasing group | Range / multiple | EKKO-EKGRP | No | 001 |
| S_LIFNR | Vendor (including exclusions) | Range / multiple | EKKO-LIFNR | No | 100245 |
| S_WERKS | Plant | Range / multiple | EKPO-WERKS | No | 1000 |
| P_DAYS | Tolerance (days) | Single value | — | No | 2 |
| P_CCBUY | Copy the purchasing group | Checkbox | — | No | X |
| P_TEST | Test mode (do not send email) | Checkbox | — | No | — |
| P_KEYDT | Key date (default: today) | Single value | SY-DATUM | Yes | 17.11.2026 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Vendor | LFA1-LIFNR |
| 2 | Vendor name | LFA1-NAME1 |
| 3 | ADR6-SMTP_ADDR | |
| 4 | Overdue lines | Calculated Number of overdue schedule lines of the vendor |
| 5 | Total open value | Calculated Σ (EKET-MENGE − EKET-WEMNG) × EKPO-NETPR ÷ EKPO-PEINH |
| 6 | Max days late | Calculated Key date − oldest EKET-EINDT |
| 7 | Status | Calculated Sent, no email address, excluded or test |
| 8 | Message | Calculated Return message of the send function |
Sample result list
| Vendor | Vendor name | Overdue lines | Total open value | Max days late | Status | Message | |
|---|---|---|---|---|---|---|---|
| 100245 | Atlas Ambalaj | [email protected] | 3 | 54,700 | 27 | Sent | Email queued for sending |
| 100387 | Delta Metal | [email protected] | 1 | 48,960 | 9 | Sent | Email queued for sending |
| 100512 | Ege Kimya | 2 | 25,560 | 45 | No email address | No default email address in the vendor master |
How does the program work?
- The job is scheduled every morning. Lines that are not deleted, not delivery completed, whose delivery date (EINDT) is before the key date minus the tolerance days and whose open quantity (MENGE − WEMNG) is above zero are read from EKKO/EKPO/EKET.
- Lines are grouped by vendor. The vendor’s email address is taken from ADR6 (default address) through LFA1-ADRNR; the correspondence language is LFA1-SPRAS.
- For each vendor an HTML table body in its language (TR or EN) and an Excel attachment with the same lines are prepared: order, item, material, open quantity, delivery date, days late.
- The email is sent with SO_NEW_DOCUMENT_ATT_SEND_API1; the purchasing group’s T024-SMTP_ADDR address is added as a copy recipient. Sending can be tracked in SOST.
- The log records the result per vendor: sent, no email address or excluded. In test mode no email is sent; only the list is produced.
Performance notes
The selection is the same as an open order report and runs at night or early morning. Because one email is sent per vendor, the volume is low. SMTP must be set up through SAPconnect (SCOT) for sending.
Features
- Runs as a background job Runs every morning as a scheduled job.
- Send the result by email
- Test mode (check without posting)
- Line-by-line result and error log
Authorization objects
- M_BEST_EKOPurchase order display authorization by purchasing organization
- M_BEST_EKGPurchase order display authorization by purchasing group
Frequently asked questions
How are lines with vendor confirmations handled?
The base version uses the EKET delivery date. If vendor confirmations (EKES) are used, the rule can be extended to use the confirmed date.
Can specific vendors be excluded?
Yes. Exclusions can be used in the vendor selection, or a parameter table of excluded vendors is defined during installation.
Can this program be used on S/4HANA?
Yes. The tables read are the same. In S/4HANA the vendor email comes from the business partner address and is read the same way through LFA1-ADRNR.
Related reports
Goods Received Not Invoiced Purchase Orders Report (GR/IR)
A custom ALV report that compares received and invoiced quantity and amount per purchase order item and lists items that were received but not …
Open Purchase Orders by Vendor Report
A custom ALV report that shows, per vendor, the quantity not yet received, the open order value and the days of delay since the delivery date in a …
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.