Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

MTA103MNU

User Function MTA103MNU()

Adds custom options to the MATA103 Incoming Document aRotina menu array.

Entry pointsPurchasingIncoming documentMATA103Menu
01 · OVERVIEW

Overview

MTA103MNU runs in MenuDef while the Incoming Document menu is being assembled. It receives no formal parameters: the customization appends items to the global aRotina array, usually with AAdd(). The official page consulted lists Protheus 10 and 11; confirm availability and the expected menu structure in the release you use.

02 · SYNTAX

Syntax

User Function MTA103MNU()

Parameters

aRotina
Array de registrosOptional

Global variable exposed by MenuDef. It receives additional menu options and is not a formal MTA103MNU parameter.

Return value

No return value is documented. The customization directly changes the global aRotina array.

03 · PRACTICAL EXAMPLE

Add an option to Incoming Document

#Include "TOTVS.ch"

User Function MTA103MNU()
    Local aNewOption := { ;
        "Additional inquiry", ;
        "U_InputInquiry", ;
        0, ;
        2, ;
        0, ;
        .F. ;
    }

    AAdd(aRotina, aNewOption)
Return

User Function InputInquiry()
    MsgInfo("Additional inquiry for the incoming document.", "MATA103")
Return
Expected result

While building the MATA103 menu, Protheus adds “Additional inquiry” and runs U_InputInquiry when it is selected. Validate the historical array positions in the release in use.

BEST PRACTICES
  • Add only required options and link every action to a function available in the environment.
  • Preserve standard entries and use AAdd() to append the new item.
  • The item layout may vary by release and routine context; confirm every array position.
  • Retest all Incoming Document operations after installing the entry point.
COMMON PITFALLS
  • The official reference lists Protheus 10 and 11. Confirm the entry point and its contract in the current release source and documentation.
  • A misspelled action or missing function may fail only when the user selects the menu option.
  • Replacing aRotina instead of appending an item can remove standard options.
  • Access permissions and business rules remain the responsibility of the custom routine.

Related content

REFERENCES
  1. TOTVS. MTA103MNU — Add options to the aRotina array. TDN historical documentation for Protheus 10 and 11.
  2. TOTVS. Entry points available in Incoming Document (MATA103). TDN, last change shown as Oct. 23, 2024.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR