# Automatic Reminder Email for Overdue Quality Notification Tasks

> A custom background job that checks corrective and preventive action tasks on quality notifications against their planned finish date and emails each responsible person a list of their own overdue and upcoming tasks. When a delay exceeds a set number of days, the quality manager is copied in.

- Type: Program, Custom development, Background program
- Module: QM
- Estimated effort: S (2–4 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/overdue-quality-notification-task-reminder-email/


## Why is the standard not enough?

QM02 manages tasks notification by notification; QM12 lists tasks but sends nothing to the owner. A workflow (SAP Business Workflow) can be set up to remind task owners, but that needs its own design and maintenance. Closing corrective actions on time needs a lightweight job that emails the owner regularly.

### Closest standard alternatives

- QM12: Lists tasks; sends no reminder to the owner.
- QM02: Changes tasks one notification at a time.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| QMEL | Quality notification header, type and short text | Read | - | ECC + S/4 |
| QMSM | Notification tasks, owner and planned finish date | Read | QMSM-QMNUM = QMEL-QMNUM | ECC + S/4 |
| USR21 | User's address and person number | Read | USR21-BNAME = QMSM-PARNR | ECC + S/4 |
| ADR6 | Owner's email address | Read | ADR6-ADDRNUMBER = USR21-ADDRNUMBER AND ADR6-PERSNUMBER = USR21-PERSNUMBER | ECC + S/4 |

## BAPIs and functions used

- SO_DOCUMENT_SEND_API1: Emails the task list to each owner

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_QMART | Notification type | Range / multiple | QMEL-QMART | Yes |
| S_WERK | Plant | Range / multiple | QMEL-MAWERK | No |
| S_PARNR | Responsible | Range / multiple | QMSM-PARNR | No |
| P_LEAD | Days ahead for upcoming tasks | Single value | - | No |
| P_ESC | Days overdue for escalation | Single value | - | No |
| P_CC | Quality manager email address | Single value | - | No |
| P_TEST | Test mode (list without sending email) | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Responsible | QMSM-PARNR |
| Email | ADR6-SMTP_ADDR |
| Notification | QMEL-QMNUM |
| Notification text | QMEL-QMTXT |
| Task text | QMSM-MATXT |
| Planned finish | QMSM-PETER |
| Overdue (days) | Calculated: Today − QMSM-PETER (a negative value is days left) |
| Sending | Calculated: Sent, sent with escalation, test, no address or error |

## How does the program work?

1. Quality notifications (QMEL) and their tasks (QMSM) are read for the selected notification types and plants; tasks that are not completed (ERLDAT empty) and not deleted (KZLOESCH empty) are taken.
2. Tasks whose planned finish date (PETER) is before today are classified as "overdue", those within the day count in the parameter as "upcoming".
3. The task owner is determined from QMSM-PARVW and PARNR. If the owner is an SAP user, the email address is read from ADR6 via USR21; for other partner types the address is taken from the partner master data. Tasks without an address are collected in the list sent to the quality manager.
4. One email is prepared per owner: notification number, notification short text, task text, planned finish and days overdue. When the delay exceeds the escalation day count, the quality manager is copied in. The email is sent with SO_DOCUMENT_SEND_API1.
5. In test mode no email is sent; only who would receive what is listed. The sending result is written to the job log; notifications are not changed.

## Authorization objects

- Q_QMEL: Quality notification display authorization by notification type
- S_OC_SEND: Authorization to send email

## Frequently asked questions

### What if the owner is a personnel number or a vendor?

The address is read from the relevant master data according to the partner type. If no address is found, the task is not lost; it appears as "no address" in the list sent to the quality manager.

### Can the email text be in Turkish and English?

Yes. The text is prepared in the owner's user language; Turkish and English templates are part of the delivery.

### Does it work on S/4HANA?

Yes. QMEL, QMSM and the address tables are the same on S/4HANA. Email sending can also be done with the BCS classes if preferred.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=qm-notification-task-reminder-email
