Protheus Field Semantics Explorer

•
13
•

Explains the contextual meaning of Protheus SX fields whose definitions change based on specific discriminator values.

The Protheus Field Semantics Explorer is a specialized tool for ADVPL and TLPP developers that solves the common problem of 'chameleon' fields in the TOTVS Protheus ERP. Many database fields change their logic or purpose based on a discriminator (such as TIPO, STATUS, or PODER3), which is often undocumented in the standard X3_DESCRIC metadata. This skill queries a curated catalog of standard Protheus semantics to provide immediate clarity on what a field represents in a given context, preventing hours of debugging and ensuring that AI-generated queries or joins use the correct logic for complex tables like SD2 or SB6.

Key Features

01Covers complex Protheus business logic for tables like SD2, SB6, and others
02Integrates seamlessly with the plugadvpl CLI for fast metadata lookups
03Provides context-specific semantics not found in standard SX3 descriptions
0413 GitHub stars
05Resolves ambiguous field meanings based on record-level discriminators
06Enables AI agents to perform accurate joins by understanding varying column logic

Use Cases

01Determining the correct logic for 'third-party power' fields in inventory tables
02Clarifying the role of origin fields (NFORI) during sales and return processing
03Validating AI-generated SQL queries to ensure correct field interpretation