Saldos Item Contábil
A tabela CT4 faz parte do sistema ERP Protheus da TOTVS e é utilizada para saldos item contábil.
Ela pertence ao dicionário de dados do Protheus (SX2) e armazena informações essenciais utilizadas em processos como cadastros, movimentações e integrações do sistema.
A tabela CT4 possui diversos campos (SX3), cada um com regras específicas como tipo, tamanho e validações, além de índices (SIX) que otimizam a performance das consultas.
Nesta página você pode consultar a estrutura completa da tabela CT4, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | CT4 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | CT4990 |
| X2_NOME | Saldos Item Contábil |
| X2_NOMESPA | Saldos Ítem Contable |
| X2_NOMEENG | Accounting Item Balances |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | CT4_FILIAL+DTOS(CT4_DATA)+CT4_ITEM+CT4_CUSTO+CT4_CONTA+CT4_MOEDA+CT4_TPSALD+CT4_LP |
| X2_PYME | S |
| X2_MODULO | 34 |
| X2_DISPLAY | - |
| X2_SYSOBJ | - |
| X2_USROBJ | - |
| X2_POSLGT | 1 |
| X2_CLOB | 2 |
| X2_AUTREC | 2 |
| X2_TAMFIL | 2 |
| X2_TAMUN | 0 |
| X2_TAMEMP | 0 |
| X2_STAMP | 2 |
| X2_INSDT | 2 |
| D_E_L_E_T_ | - |
| R_E_C_N_O_ | 2707 |
| R_E_C_D_E_L_ | 0 |
| X3_ARQUIVO | X3_ORDEM | X3_CAMPO | X3_TIPO | X3_TAMANHO | X3_DECIMAL | X3_TITULO | X3_TITSPA | X3_TITENG | X3_DESCRIC | X3_DESCSPA | X3_DESCENG | X3_PICTURE | X3_VALID | X3_USADO | X3_RELACAO | X3_F3 | X3_NIVEL | X3_RESERV | X3_CHECK | X3_TRIGGER | X3_PROPRI | X3_BROWSE | X3_VISUAL | X3_CONTEXT | X3_OBRIGAT | X3_VLDUSER | X3_CBOX | X3_CBOXSPA | X3_CBOXENG | X3_PICTVAR | X3_WHEN | X3_INIBRW | X3_GRPSXG | X3_FOLDER | X3_PYME | X3_CONDSQL | X3_CHKSQL | X3_IDXSRV | X3_ORTOGRA | X3_IDXFLD | X3_TELA | X3_PICBRV | X3_AGRUP | X3_POSLGT | X3_MODAL | X3_CHKSUM | X3_ADDSUM | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CT4 | 01 | CT4_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial do Sistema | Sucursal del Sistema | System Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42174 | 0 |
| CT4 | 02 | CT4_ITEM | C | 9 | 0 | Cod Item | Cod. Item | Item Code | Codigo do Item | Codigo de Item | Item Code | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 005 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42175 | 0 |
| CT4 | 03 | CT4_CUSTO | C | 9 | 0 | Cod CC | Cod. CC | C.C. Code | Codigo do Centro de Custo | Codigo de Centro de Costo | Cost Center Code | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 004 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42176 | 0 |
| CT4 | 04 | CT4_CONTA | C | 20 | 0 | Cod Conta | Cod Cuenta | Account Code | Codigo da Conta Contabil | Codigo de Cuenta Contable | Ledger Account Code | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 003 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42177 | 0 |
| CT4 | 05 | CT4_MOEDA | C | 2 | 0 | Moeda | Moneda | Currency | Moeda | Moneda | Currency | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42178 | 0 |
| CT4 | 06 | CT4_DATA | D | 8 | 0 | Data Saldo | Fecha Saldo | Balance Date | Data do Saldo | Fecha de Saldo | Balance Date | 99/99/9999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42179 | 0 |
| CT4 | 07 | CT4_DEBITO | N | 16 | 2 | Deb na Data | Deb en Fecha | Deb on date | Debito na Data | Debito en la Fecha | Debit on date | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42180 | 0 |
| CT4 | 08 | CT4_CREDIT | N | 16 | 2 | Crd na Data | Crd en Fecha | Crd on date | Credito na Data | Credito en la Fecha | Credit on date | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42181 | 0 |
| CT4 | 09 | CT4_TPSALD | C | 1 | 0 | Tipo do Sld | Tipo de Sld | Balance Type | Tipo do Saldo | Tipo de Saldo | Balance Type | ! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | - | - | - | - | 1=Real;2=Orcado;3=Gerencial | 1=Real;2=Presupuestado;3=Gestion | 1=Real;2=Budgeted;3=Managerial | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42182 | 0 |
| CT4 | 10 | CT4_STATUS | C | 1 | 0 | Status | Estatus | Status | Status do Saldo (Ab/Enc) | Estatus de Saldo (Ab/Enc) | Balance Status (Pd/Cld) | ! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42183 | 0 |
| CT4 | 11 | CT4_ATUDEB | N | 16 | 2 | Sld Atu Deb | Sld.Act.Adeu | Deb Crt Bal | Saldo Atual Devedor | Saldo Actual Adeudado | Debtor Current Balance | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42184 | 0 |
| CT4 | 12 | CT4_ATUCRD | N | 16 | 2 | Sld Atu Crd | Sld Act Acre | Crd Crt Bal | Saldo Atual Credor | Saldo Actual Acreditado | Creditor Current Balance | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42185 | 0 |
| CT4 | 13 | CT4_ANTDEB | N | 16 | 2 | Sld Ant Deb | Sld Ant Adeu | Deb Prev Bal | Saldo Anterior Devedor | Saldo Anter. Adeudado | Debtor Previous Balance | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42186 | 0 |
| CT4 | 14 | CT4_ANTCRD | N | 16 | 2 | Sld Ant Crd | Sld Ant Acre | Crd Prev Bal | Saldo Anterior Credor | Saldo Anterior Acred. | Creditor Previous Balance | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42187 | 0 |
| CT4 | 15 | CT4_LPDEB | N | 16 | 2 | LP Debito | GP Debito | Debit GL | Lucro Perda Debito | Ganancia Perdida Debito | Debit Gain Loss | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42188 | 0 |
| CT4 | 16 | CT4_LPCRD | N | 16 | 2 | LP Credito | GP Credito | Credit GL | Lucro Perda Credito | Ganancia/Perdida Credito | Credit Gain Loss | @E 9,999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42189 | 0 |
| CT4 | 17 | CT4_SLBASE | C | 1 | 0 | Flag Sld Bas | Flag Sld Bas | Bas.Bal.Flag | Flag Saldo Basico | Flag Saldo Basico | Basic Balance Flag | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42190 | 0 |
| CT4 | 18 | CT4_DTLP | D | 8 | 0 | Dt Apuracao | Fch. Determ. | Calc. Date | Data da apuracao | Fecha de Determinacion | Calculation Date | 99/99/9999 | - | x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 42191 | 0 |
| CT4 | 19 | CT4_LP | C | 1 | 0 | Sld L.Perdas | Sld L.Perdid | P/L Bal. | Flag Saldo Lucros Perdas | Flag Saldo Gananc.Perdida | Profit/Losse Balance Flag | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42192 | 0 |
| CT4 | 20 | CT4_SLCOMP | C | 1 | 0 | Flag Sl Comp | Flag Sl Comp | Com.Blc.Flag | Flag Saldo Composto | Flag Saldo Compuesto | Comp.Balance Flag | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 42193 | 0 |
| INDICE | ORDEM | CHAVE | DESCRICAO | DESCSPA | DESCENG | PROPRI | F3 | NICKNAME | SHOWPESQ | IX_VIRTUAL | IX_VIRCUST | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CT4 | 1 | CT4_FILIAL+CT4_MOEDA+CT4_TPSALD+CT4_CONTA+CT4_CUSTO+CT4_ITEM+DTOS(CT4_DATA)+CT4_LP | Moeda + Tipo do Sld + Cod Conta + Cod CC + Cod Item + Data Saldo + Sld | Moneda + Tipo de Sld + Cod Cuenta + Cod. CC + Cod. Item + Fecha Saldo | Currency + Balance Type + Account Code + C.C. Code + Item Code + Balan | S | - | - | S | 2 | 3 | - | 6463 | 0 |
| CT4 | 2 | CT4_FILIAL+CT4_CONTA+CT4_CUSTO+CT4_ITEM+CT4_MOEDA+CT4_TPSALD+DTOS(CT4_DATA)+CT4_LP | Cod Conta + Cod CC + Cod Item + Moeda + Tipo do Sld + Data Saldo + Sld | Cod Cuenta + Cod. CC + Cod. Item + Moneda + Tipo de Sld + Fecha Saldo | Account Code + C.C. Code + Item Code + Currency + Balance Type + Balan | S | - | - | S | 2 | 3 | - | 6464 | 0 |
| CT4 | 3 | CT4_FILIAL+DTOS(CT4_DATA)+CT4_ITEM+CT4_MOEDA+CT4_TPSALD+CT4_CONTA+CT4_CUSTO | Data Saldo + Cod Item + Moeda + Tipo do Sld + Cod Conta + Cod CC | Fecha Saldo + Cod. Item + Moneda + Tipo de Sld + Cod Cuenta + Cod. CC | Balance Date + Item Code + Currency + Balance Type + Account Code + C. | S | - | - | S | 2 | 3 | - | 6465 | 0 |
| CT4 | 4 | CT4_FILIAL+CT4_ITEM+CT4_MOEDA+CT4_TPSALD+DTOS(CT4_DATA)+CT4_CONTA+CT4_CUSTO | Cod Item + Moeda + Tipo do Sld + Data Saldo + Cod Conta + Cod CC | Cod. Item + Moneda + Tipo de Sld + Fecha Saldo + Cod Cuenta + Cod. CC | Item Code + Currency + Balance Type + Balance Date + Account Code + C. | S | - | - | S | 2 | 3 | - | 6466 | 0 |
| CT4 | 5 | CT4_FILIAL+CT4_SLCOMP+CT4_TPSALD+CT4_MOEDA+DTOS(CT4_DATA)+CT4_ITEM+CT4_CUSTO+CT4_CONTA | Flag Sl Comp + Tipo do Sld + Moeda + Data Saldo + Cod Item + Cod CC + | Flag Sl Comp + Tipo de Sld + Moneda + Fecha Saldo + Cod. Item + Cod. C | Com.Blc.Flag + Balance Type + Currency + Balance Date + Item Code + C. | S | - | - | S | 2 | 3 | - | 6467 | 0 |
| CT4 | 6 | CT4_FILIAL+CT4_LP+CT4_CONTA+CT4_CUSTO+CT4_ITEM+CT4_MOEDA+CT4_TPSALD+DTOS(CT4_DATA) | Sld L.Perdas + Cod Conta + Cod CC + Cod Item + Moeda + Tipo do Sld + D | Sld L.Perdid + Cod Cuenta + Cod. CC + Cod. Item + Moneda + Tipo de Sld | P/L Bal. + Account Code + C.C. Code + Item Code + Currency + Balance T | S | - | - | S | 2 | 3 | - | 6468 | 0 |
Ela é utilizada para saldos item contábil dentro do sistema ERP Protheus.
Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.
Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.
Modelo de query gerado automaticamente com base na estrutura da tabela.
SELECT
CT4_FILIAL,
CT4_ITEM,
CT4_CUSTO,
CT4_CONTA,
CT4_MOEDA,
CT4_DATA,
CT4_DEBITO,
CT4_CREDIT,
CT4_TPSALD,
CT4_STATUS,
CT4_ATUDEB,
CT4_ATUCRD,
CT4_ANTDEB,
CT4_ANTCRD,
CT4_LPDEB,
CT4_LPCRD,
CT4_SLBASE,
CT4_DTLP,
CT4_LP,
CT4_SLCOMP
FROM CT4
WHERE
D_E_L_E_T_ = ' '
AND CT4_FILIAL = 'VALOR'
AND CT4_ITEM = 'VALOR'
AND CT4_CUSTO = 'VALOR'
AND CT4_CONTA = 'VALOR'
AND CT4_MOEDA = 'VALOR'
AND CT4_DATA BETWEEN '20261001' AND '20261031'
AND CT4_DEBITO = 0
AND CT4_CREDIT = 0
AND CT4_TPSALD = 'VALOR'
AND CT4_STATUS = 'VALOR'
AND CT4_ATUDEB = 0
AND CT4_ATUCRD = 0
AND CT4_ANTDEB = 0
AND CT4_ANTCRD = 0
AND CT4_LPDEB = 0
AND CT4_LPCRD = 0
AND CT4_SLBASE = 'VALOR'
AND CT4_DTLP BETWEEN '20261001' AND '20261031'
AND CT4_LP = 'VALOR'
AND CT4_SLCOMP = 'VALOR'