SX5 — Generic tables
Organizes generic-table codes and descriptions.
Overview
SX5 holds code domains used by routines. The community example distinguishes positioned-record fDescSX5 from SX5Desc, which receives generic-table identifier and key. Displaying a description does not validate business-rule eligibility. The block uses table 02/key PI from the source without assuming the record exists or has identical descriptions in every language. (Sources: refs. 1–2.)
Commented example
#Include "Protheus.ch"
User Function Ed684()
// Community lookup pattern; block not invoked.
Local bDescription := {|| SX5Desc("02","PI")}
ConOut(ValType(bDescription))
Return NilCreates block B without reading or writing SX5. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Check table, key, branch and language; handle missing entries without fabricating a successful description.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.