Filling the Field CT2_KEY

Product:

Microsiga Protheus

Occurrence:

How should the CT2_KEY field (responsible for the origin of the record in managerial accounting) be filled?)

Step by step:

This field must be configured through the  in: (CTBA090 – Relationships)  routine in: Managerial Accounting / Updates / Registrations / Relationships.

From this routine, it is possible to specify the ‘search key’ that the respective LP will use to record the information.

Pay attention to the fields:


CTL_KEY
: Specifies the search key in the index of the main table involved.

Example SE5: E5_FILIAL+E5_TIPODOC+E5_PREFIXO+E5_NUMERO+E5_PARCELA+E5_TIPO+DTOS(E5_DATA)+E5_CLIFOR+E5_LOJA+E5_SEQ 


CTL_ORDER: Specifies the order of the search key according to the 'Index of the respective table'.

Example SE5: Order: 2

Remarks:

To find out the key and its respective order for a given table, simply access the routine: Database (via configuration), option: Indexes.