Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F040FET

ExecBlock("F040FET", .F., .F., nSavRec)

Complements recording of the FETHAB receivable. Execution context, diagnostics and documentation limits.

F040FETFINXFINExecBlockPARAMIXBFETHAB
01 · OVERVIEW

Overview

The Financeiro P12 index associates F040FET with MATXATU/FINXFIN and complementary recording of the FETHAB receivable; its specific documentation remains under construction. (TOTVS, n.d., ref. 1) The call listing records ExecBlock("F040FET", .F., .F., nSavRec) in FINXFIN. (TOTVS, n.d., ref. 2) The generic ExecBlock mechanism exposes its fourth argument through PARAMIXB. (TOTVS, n.d., ref. 3) This evidence does not confirm the meaning of nSavRec or how the return value is used. FETHAB stands for Fundo Estadual de Transporte e Habitação; the MTFUNDOS manual, dated 2022-08-08, provides historical fiscal integration context. (TOTVS, 2022, ref. 4) This page is under review: access restrictions limited full documentation inspection and the example has not been run in Protheus.

02 · SYNTAX

Syntax

ExecBlock("F040FET", .F., .F., nSavRec)

Parameters

PARAMIXB
ContextualExecution context

Context exposed through the fourth ExecBlock argument. It is not a required formal argument of the User Function. The listing shows nSavRec without an explicit array; actual presence, type, and meaning must be confirmed in the target release.

Return value

The specific contract has not been confirmed in the public sources located. The bare Return belongs only to the diagnostic example and does not establish the return required by standard processing.

03 · PRACTICAL EXAMPLE

Diagnostic example

#Include "Protheus.ch"



User Function F040FET()

    Local uContext := Nil



    // The variable may reflect a scalar value; do not assume an array.

    If Type("PARAMIXB") <> "U"

        uContext := PARAMIXB

    EndIf



    // In a test environment, log only the type, without title data.

    ConOut("F040FET: context type = " + ValType(uContext))

Return

Expected result

When the routine actually invokes the entry point, the console should show the received type without exposing the context value. If nothing appears, first check compilation, RPO, environment, and scenario. No message does not prove that the entry point was discontinued.

BEST PRACTICES
  • Confirm the call and title generation scenario in the target release and patch.
  • Preserve work areas if future customization selects or repositions aliases.
  • Start by diagnosing the PARAMIXB type without printing title data.
  • Compare processing without customization and with this example in a test environment.
  • Record the validated version and retain didactic comments in the code.
  • In the MTFUNDOS manual, MV_FETNAT identifies the FETHAB nature code. (TOTVS, 2022, ref. 4) Check the actual test environment configuration before investigating a missing receivable; this setting is not an entry point argument.
  • Editorial test plan: compare a scenario generating FETHAB with one that does not, keeping other inputs unchanged. Record diagnostic invocation counts and resulting receivables. A repeated line in the call index does not establish invocation counts per operation.
COMMON PITFALLS
  • Do not assume PARAMIXB is an array or that PARAMIXB[1] represents the context.
  • Do not infer the received table or record solely from the name nSavRec.
  • Do not assign undocumented authorization or cancellation semantics to .T./.F. returns.
  • Do not assume execution after commit, a record lock, or a positioned alias.
  • The example has neither been compiled nor executed in Protheus; full source verification remains pending.

Related content

REFERENCES
  1. TOTVS. Pontos de Entrada - Financeiro - P12. TDN. Indexed evidence consulted on 2026-10-20.
  2. TOTVS. Pontos de Entrada. TDN. Indexed evidence consulted on 2026-10-20.
  3. TOTVS. ExecBlock - Execução do ponto de entrada. TDN. Indexed evidence consulted on 2026-10-20.
  4. TOTVS. MTFUNDOS - FETHAB, FACS, FABOV, FAMAD e IMA do Estado do Mato Grosso. TDN. Indexed evidence consulted on 2026-10-20.
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