Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

ROLLBACKSXE()

RollbackSxe()

Discards a numbering reservation in the legacy flow.

ROLLBACKSXE()AdvPL
01 · OVERVIEW

Overview

Training describes discarding the number reserved by the last GetSxeNum. This does not roll back a SQL transaction, delete a saved document or establish equivalence with RollbackSX8 by name alone. Reservation ownership determines who confirms or discards. The TOTVS article shows MATA410 may manage its own numbering; extra numbering calls and C5_NUM in the automatic array must then be removed. The block is not executed without a caller-owned reservation. (Sources: refs. 1–2.)

02 · SYNTAX

Syntax

RollbackSxe()

Return value

Unspecified in the selected reference; not used as Boolean.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed633()
    // Only the reservation owner should decide to discard it.
    Local bDiscard := {|| RollbackSxe()}
    ConOut(ValType(bDiscard))
Return Nil
Expected result

Creates block B without changing numbering. This source documents no useful return value. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check numbering service, release and reservation owner. Never discard a confirmed number.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Programação em ADVPL. Referência histórica, p. 29, semáforos. Accessed on 2026-10-27.
  2. TOTVS. MATA410 e GetSXENum: controle pertencente à rotina. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha