Symptom
Change logs show that a purchase order confirmation with sequence 0001 was deleted, but the inbound delivery/confirmation view still shows sequence 1 instead of incrementing to the next sequence (for example 0002).
Environment
- Materials Management (MM)
- SAP R/3
- SAP R/3 Enterprise 4.7
- SAP ERP Core Component
- SAP ERP
- SAP enhancement package for SAP ERP
- SAP enhancement package for SAP ERP, version for SAP HANA
- SAP S/4 HANA
Reproducing the Issue
- Open transaction ME23N and display a purchase order.
- Go to the Confirmations tab and review the first inbound delivery/confirmation sequence.
- Compare with the purchase order change logs (CDHDR/CDPOS) that indicate deletion of a confirmation line.
- Observe that the new/remaining confirmation still uses sequence 0001 rather than a higher sequence.
Cause
Standard behaviour:
- After a confirmation line is deleted, the next created confirmation reuses the freed sequence number (ETENS) obtained from the bitmask handler, not the next incremental number.
- This is set by code lines such as t_ekes-etens = lo_bit->get_etens() in the confirmation maintenance logic (e.g., VL31N/ME22N).
Resolution
- Acknowledge that confirmation sequence numbers (EKES-ETENS) are reused when freed. The system intentionally assigns the lowest available sequence (for example 0001) after deletion.
- When analyzing change history, note that deletion events in ME22N/ME23N record only the action (deletion) and not the detailed field values in CDPOS/CDHDR.
- To identify active/visible confirmations in ME23N and downstream reporting, select EKES entries where EKES-MENGE is not zero; lines with zero quantity are not displayed and indicate no open requirement.
- Manage confirmations linked to inbound deliveries via VL* transactions (for example VL31N) rather than ME22N; EKES entries tied to deliveries are processed in logistics transactions.
- If integration or reporting logic assumed monotonically increasing sequences, adjust it to:
- 1. Determine the valid confirmation by status/quantity (for example EKES-MENGE > 0) and delivery reference, not by sequence progression.
- 2. Treat ETENS as a reusable identifier that can reappear after deletions.
See Also
When the new confirmation line is created in VL31N:
Include LEINBU08 (FUNCTION ME_CONFIRMATION_MAINTAIN_AVIS)
...
case t_ekes-kz.
*- Neues Avis ----------------------------------------------------------
when 'I'.
*- vervollständigen ----------------------------------------------------
* get ETENS from bitmask
t_ekes-etens = lo_bit->get_etens( ).
...
=========================================
When the new confirmation line is created in ME22N:
Include LEINBF11 (FORM ETS_FUELLEN)
...
* get new ETENS from bitmask handler
ekes-etens = lo_bit->get_etens( ).
...
=========================================
- Refer to: SAP Note 2714012
- Refer to: SAP Note 3256594
- Refer to: SAP Note 457511
Keywords
EKES, CDPOS, CDHDR, ME22N, ME23N, VL31N, inbound delivery, confirmation control, ETENS, sequence reuse, deletion, change log, shipping notification, purchase order confirmations, MENGE , KBA , MM-PUR-GF-CON , Confirmation Control/Shipping Notification , Problem
SAP Knowledge Base Article - Public