Dicionário Protheus
Início

Tabela CMP no Protheus

Contratante/Prestador

O que é a tabela CMP no Protheus?

A tabela CMP faz parte do sistema ERP Protheus da TOTVS e é utilizada para contratante/prestador.

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 CMP 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 CMP, incluindo todos os campos e índices relacionados.

Propriedades da Tabela

Propriedade Valor
X2_CHAVE CMP
X2_PATH \DATA\
X2_ARQUIVO CMP990
X2_NOME Contratante/Prestador
X2_NOMESPA Contratante/Prestador
X2_NOMEENG Contractor/Server
X2_ROTINA -
X2_MODO E
X2_MODOUN E
X2_MODOEMP E
X2_DELET 0
X2_TTS -
X2_UNICO CMP_FILIAL+CMP_ID+CMP_VERSAO+CMP_INSCES+CMP_INSCCO
X2_PYME S
X2_MODULO 84
X2_DISPLAY -
X2_SYSOBJ -
X2_USROBJ -
X2_POSLGT 1
X2_CLOB 1
X2_AUTREC 1
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_ 2482
R_E_C_D_E_L_ 0

Campos da Tabela CMP (13 campos)

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_
CMP 01 CMP_FILIAL C 2 0 Filial Sucursal Branch Filial Sucursal Branch - - x x x x x x x x x x x x x x x - - 1 - - - - S A R - - - - - - - - 033 - S - - N - N - - - 1 2 - - - 38651 0
CMP 02 CMP_ID C 36 0 ID ID ID Identificador do registro Identificador de registro Identifier of Record - - x x x x x x x x x x x x x x x - - 1 - - - - S V R - - - - - - - - 085 - S - - N - N - - - 1 2 - - - 38652 0
CMP 03 CMP_VERSAO C 14 0 Id. Ver. Reg Id.Ver.Reg. RecordVer.ID Id da versão do registro Id.Version del registro Record Version ID @! - x x x x x x x x x x x x x x x - - 1 - - - - N A R - - - - - - - - 078 - S - - N - N - - - 1 2 - - - 38653 0
CMP 04 CMP_INSCES C 14 0 Nr. Inscr. No. Inscr. Inscrptn No. Numero Inscrição Numero inscripcion Inscription Number @! - x x x x x x x x x x x x x x x - - 1 - - - - N A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38654 0
CMP 05 CMP_TPINSC C 1 0 Tp. Inscr. Tp. Inscr. RegistrtnTP Tipo Inscrição Tipo inscripcion Registration Type @! Pertence(" 12") x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - 1=CNPJ;2=CPF 1=CNPJ;2=CPF 1=CNPJ;2=CPF - - - - - S - - N - N - - - 1 2 - - - 38655 0
CMP 06 CMP_INSCCO C 14 0 Nr. Inscr. No. Inscr. Inscrptn No. Número Inscrição Numero inscripcion Inscription Number @! XFUNVldPJF(,2,.F.) x x x x x x x x x x x x x x x x - - 1 x x - - - S A R - - - - - - - - - - S - - N - N - - - 1 1 - - - 38656 0
CMP 07 CMP_VLBRUT N 16 2 Val. Bruto Val. Bruto Gross Amount Valor Bruto Valor bruto Gross Amount @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38657 0
CMP 08 CMP_VLSERV N 16 2 Val. Serviço Val.Servicio ServiceValue Valor Serviços Valor Servicios Value of Services @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38658 0
CMP 09 CMP_BCRETE N 16 2 Bc. Retenção BC Retenc. Withhold Bc. Base de Calculo Retenção Base de calculo retencion Withholding Calc Base @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38659 0
CMP 10 CMP_VLRETE N 16 2 Val. Ret. Val. Ret. Amt Withhld Valor Retenção Valor retencion Amount Withheld @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38660 0
CMP 11 CMP_VLADIC N 16 2 Val. Adic. Val. Adic. Addit.Amount Valor Adicional Valor adicional Additional Amount @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38661 0
CMP 12 CMP_VLNRET N 16 2 Val. Não Ret Val.No Ret. Amt Nt Withh Valor Não Retido Valor no retenido Amount Not Withheld @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38662 0
CMP 13 CMP_BCCOOP N 16 2 BC. Coop. BC. Coop. Coop. BC Base de Calc. Cooperativa Base de Calc. Cooperativa Cooperative Calc Base @E 9,999,999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 38663 0

Índices da Tabela CMP (2 índices)

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_
CMP 1 CMP_FILIAL+CMP_ID+CMP_VERSAO+CMP_INSCES+CMP_INSCCO ID + Id. Ver. Reg + Nr. Inscr. + Nr. Inscr. ID + Id.Ver.Reg. + No. Inscr. + No. Inscr. ID + RecordVer.ID + Inscrptn No. + Inscrptn No. S - - S 2 3 - 5967 0
CMP 2 CMP_FILIAL+CMP_INSCCO Nr. Inscr. No. Inscr. Inscrptn No. S - - S 2 3 - 5968 0

Perguntas frequentes

Para que serve a tabela CMP no Protheus?

Ela é utilizada para contratante/prestador dentro do sistema ERP Protheus.

Como consultar os campos da tabela CMP?

Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.

O que são os índices da tabela CMP?

Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.

Exemplo de consulta SQL da tabela CMP

Modelo de query gerado automaticamente com base na estrutura da tabela.

SELECT
    CMP_FILIAL,
    CMP_ID,
    CMP_VERSAO,
    CMP_INSCES,
    CMP_TPINSC,
    CMP_INSCCO,
    CMP_VLBRUT,
    CMP_VLSERV,
    CMP_BCRETE,
    CMP_VLRETE,
    CMP_VLADIC,
    CMP_VLNRET,
    CMP_BCCOOP
FROM CMP
WHERE
    D_E_L_E_T_ = ' '
    AND CMP_FILIAL = 'VALOR'
    AND CMP_ID = 'VALOR'
    AND CMP_VERSAO = 'VALOR'
    AND CMP_INSCES = 'VALOR'
    AND CMP_TPINSC = 'VALOR'
    AND CMP_INSCCO = 'VALOR'
    AND CMP_VLBRUT = 0
    AND CMP_VLSERV = 0
    AND CMP_BCRETE = 0
    AND CMP_VLRETE = 0
    AND CMP_VLADIC = 0
    AND CMP_VLNRET = 0
    AND CMP_BCCOOP = 0