Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F241GAVE

User Function F241GAVE()

Receives aVars directly through PARAMIXB; community example and editorial diagnostics without changing elements.

F241GAVEFINA241aVarsPARAMIXBExecBlock
01 · OVERVIEW

Overview

Eurai Rapelli provides an implementation that receives PARAMIXB as an array and returns it unchanged. (Rapelli, 2023, ref. 1) The official call passes aVars directly as the fourth ExecBlock argument; the specific index entry remains under construction. (TOTVS, n.d., refs. 2–3) The P12.2210 listing places the call in FA241BORDE and shows its return cloned into aVars. (Universo do Desenvolvedor, 2023, ref. 4) The diagnostics below are original editorial code informed by that reading, without reproducing the full article source. Internal array layout and the complete release-specific contract remain unconfirmed.

02 · SYNTAX

Syntax

User Function F241GAVE()

Parameters

PARAMIXB / aVars
Array in community example; layout unconfirmedContext to confirm

The fourth ExecBlock argument is available directly through PARAMIXB. Because the call passes aVars, rather than {aVars}, PARAMIXB represents the whole collection; PARAMIXB[1] is its first element. (TOTVS, n.d., refs. 2 and 5) Names, types and meanings of individual positions await confirmation.

Return value

The caller excerpt passes the result to AClone and replaces aVars. This supports expecting an array in that flow without documenting its individual positions. The community example returns the received value. (refs. 1 and 4)

03 · PRACTICAL EXAMPLE

Editorial diagnostics preserving the collection

#Include "Protheus.ch"

User Function F241GAVE()
    // Original diagnostics; context reference: Eurai Rapelli (ref. 1).
    // No aVars positions are assumed or changed.
    Local uContext := PARAMIXB

    ConOut("F241GAVE: received type = " + ValType(uContext))
    // Count elements only when the received value is an array.
    If ValType(uContext) == "A"
        ConOut("F241GAVE: element count = " + AllTrim(Str(Len(uContext))))
    EndIf

    // Return the received value; this applies no filter rule.
Return uContext
Expected result

Logs type and, for an array, element count; returns the same received value. Reads or changes no positions. If context is not an array, the return is not an array either: the diagnostics do not repair a caller incompatibility. Neither compiled nor executed in Protheus.

04 · PRACTICAL EXAMPLE

Documentary caller excerpt

// P12.2210 community listing: FINA241.PRX / FA241BORDE().
// Documentary excerpt, not an executable F241GAVE implementation.
aVars := AClone(ExecBlock("F241GAVE", .F., .F., aVars))
Expected result

Shows the return passed to AClone before replacing aVars. Does not show position contents or the remainder of the routine.

BEST PRACTICES
  • Do not assign field, filter, bank or date meaning to a position without checking the source and target release context.
  • The diagnostics intentionally make no changes: confirm the received structure before developing the business rule.
  • Do not replace the return with .T., .F. or NIL as though this entry point were a logical validation.
  • In testing, compare payable selection before and after customization, checking preservation of expected array size, order and types.
  • Do not log element contents. The diagnostics limit output to type and count.
  • Transaction position, aliases, locks and cross-release scope remain unconfirmed. GitHub searches located no useful implementation.

Related content

REFERENCES
  1. RAPELLI, Eurai. FINA241-F241GAVE - Alterar aVars. Universo do Desenvolvedor, 2023. Accessed on 2026-10-23.
  2. TOTVS. Pontos de Entrada. TDN. Accessed on 2026-10-23.
  3. TOTVS. Pontos de Entrada - Financeiro - P12. TDN. Accessed on 2026-10-23.
  4. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. Accessed on 2026-10-23.
  5. TOTVS. ExecBlock - Execução do ponto de entrada. TDN. Accessed on 2026-10-23.
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