The Challenge
The requirement was clear:
"How can we be reminded of expiring warranties directly from SAP ERP?"
Unfortunately, SAP standard does not provide such functionality. Without proactive alerts, maintenance teams risk missing deadlines for warranty claims, leading to unnecessary costs.
The Solution
I developed Report Y_PM_GEWAEHRL_ENDE_LISTE, a simple yet powerful ABAP program that:
This approach ensures maintenance teams have enough time to plan corrective actions or initiate warranty claims.
Key Features
The report:
Email Example:
Subject: SAP System Notification: Warranties Expiring Soon
Body:
Functional Location TPL-1001 | Start: 01.01.2024 | End: 31.12.2025 | Remaining: 45 days
Equipment EQ-2005 | Start: 15.02.2024 | End: 15.02.2025 | Remaining: 30 days
Benefits
" --- Check warranty periods and collect expiring entries ---
lv_today = sy-datum.
" Calculate remaining days and filter by lead time
lv_days = lv_end - lv_today.
ls_output-resttage = lv_days.
IF lv_days >= 0 AND lv_days <= p_rest.
APPEND ls_output TO lt_output.
ENDIF.
" --- Determine if email notification is needed ---
lv_mail_needed = abap_false.
LOOP AT lt_output INTO ls_output.
IF ls_output-resttage < p_rest.
lv_mail_needed = abap_true.
EXIT.
ENDIF.
ENDLOOP.
" --- Send email if required ---
IF p_send = 'X' AND p_email IS NOT INITIAL AND lv_mail_needed = abap_true.
PERFORM send_email USING p_email lt_output.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 9 | |
| 6 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |