Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F330EXCOMP

User Function F330EXCOMP()

Validates deletion or reversal of receivable compensation.

F330EXCOMPFINA330
01 · OVERVIEW

Overview

TDN documents PARAMIXB[1] as titles, [2] as SE5 records and [3] as operation: 5 for reversal and 4 for deletion. .T. permits the operation and .F. aborts it. The page lists 12 positions per title, including document, E5_SEQ, net amount, compensated amount and branch. This differs from the five F330ESE5 values. (Ref. 1) The community call confirms three arguments. (Ref. 2)

02 · SYNTAX

Syntax

User Function F330EXCOMP()

Parameters

PARAMIXB[1]
ArrayExecution context

Titles selected for reversal/deletion. (Ref. 1)

PARAMIXB[2]
ArrayExecution context

Records containing SE5 RecNo values linked to compensation. (Ref. 1)

PARAMIXB[3]
NumericExecution context

Operation: 5 reversal; 4 deletion. (Ref. 1)

Return value

Logical: .T. permits deletion/reversal; .F. aborts the operation and leaves records intact, as documented.

03 · PRACTICAL EXAMPLE

Editorial example based on documentation

#Include "Protheus.ch"

User Function F330EXCOMP()
    // Adapted from the TOTVS example (ref. 1); interactive confirmation only.
    Local nOperation := PARAMIXB[3]
    Local lAllow := .F.
    If Len(PARAMIXB[1]) > 0 .And. Len(PARAMIXB[2]) > 0
        If nOperation == 5
            lAllow := MsgYesNo("Confirm compensation reversal?")
        ElseIf nOperation == 4
            lAllow := MsgYesNo("Confirm compensation deletion?")
        EndIf
    EndIf
Return lAllow
Expected result

Teaching proposal with behavior described in comments. Verify the context before compiling in a test environment. Under review: example not compiled or run in Protheus. Verify aliases, locks, transaction position and compatibility in the target release and patch.

04 · PRACTICAL EXAMPLE

Observed call and context

// P12.2210 caller excerpt (EURAI, ref. 2); not an entry point implementation.
// FINA330.PRX - FA330DESC() -> LF330EXCLUI := (EXECBLOCK( "F330EXCOMP", .F., .F.,{ATITULOS,AREGISTROS,NOPC}))
Expected result

The record shows arguments and immediate return use where present. It omits the full caller body and does not establish commit timing.

BEST PRACTICES
  • The confirmation dialog is illustrative and requires interactive execution. Test operations 4 and 5 separately and inspect titles, movements and accounting after a negative answer.
  • A call without a fourth argument does not document a PARAMIXB layout. Preserve caller identifiers and do not invent fields or positions.
  • Test plan: compare standard and customized flows, exercise success, rejection and repetition, and inspect balances, movements and accounting as applicable.
  • Under review: example not compiled or run in Protheus. Verify aliases, locks, transaction position and compatibility in the target release and patch.

Related content

REFERENCES
  1. TOTVS. F330EXCOMP - Valida exclusão/estorno da compensação. TDN. Accessed on 2026-10-24.
  2. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. Accessed on 2026-10-24.
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