Tabela CMN

Ret Contrib Prev – Serv Prest
34camposNome físicoCMN010(empresa 01)

Campos da tabela CMN

34 campos no dicionário de dados do TOTVS Protheus.

34
CampoDescrição
CMN_FILIAL
Caractere (C)(2)
Filial
Contexto:
Real
CMN_ID
Caractere (C)(36)
ID
Máscara:
@!
Contexto:
Real
CMN_VERSAO
Caractere (C)(14)
Id Ver Reg
Máscara:
@!
Contexto:
Real
CMN_NOMEVE
Caractere (C)(5)
Nome Evento
Máscara:
@!
Contexto:
Real
Validação:
XFUNVldUni("CMN",2,M->CMN_NOMEVE+FWFLDGET("CMN_INDAPU")+FWFLDGET("CMN_PERAPU"))
CMN_INDAPU
Caractere (C)(1)
Ind.Per.Apur
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 12") .And. XFUNVldUni("CMN",2,FWFLDGET("CMN_NOMEVE")+M->CMN_INDAPU+FWFLDGET("CMN_PERAPU"))
2 valores possíveis
  • 1Folha de Pagamento Mensal
  • 2Folha de Decimo Terceiro Salario
CMN_PERAPU
Caractere (C)(6)
Per Apuracao
Máscara:
@R 99-9999
Contexto:
Real
CMN_VERANT
Caractere (C)(14)
Ver Ant Reg
Máscara:
@!
Contexto:
Real
CMN_STATUS
Caractere (C)(1)
Status Reg.
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 0123467")
7 valores possíveis
  • 0Reg Valido
  • 1Reg Invalido
  • 2Reg Trans
  • 3Reg Trans Inconsistencia
  • 4Reg Trans Sucesso
  • 6Exclusao Trans
  • 7Exclusao Trans Sucesso
CMN_PROTUL
Caractere (C)(52)
Recibo
Máscara:
@!
Contexto:
Real
CMN_PROTPN
Caractere (C)(52)
Recibo Ant
Máscara:
@!
Contexto:
Real
CMN_EVENTO
Caractere (C)(1)
Id. Evento
Máscara:
@!
Contexto:
Real
Validação:
Pertence("IAE")
3 valores possíveis
  • IInclusao
  • AAlteracao
  • EExclusao
CMN_ATIVO
Caractere (C)(1)
Reg Ativo
Contexto:
Real
Validação:
Pertence("12")
2 valores possíveis
  • 1Sim
  • 2Nao
CMN_IDESTA
Caractere (C)(6)
Id Estab
Máscara:
@!
Contexto:
Real
Consulta F3:
C1E
Validação:
XFUNVldCmp("C1E",5)
CMN_DESTAB
Caractere (C)(220)
Desc Estab
Máscara:
@!
Contexto:
Real
CMN_TPNUOB
Caractere (C)(16)
Insc Obra
Máscara:
@!
Contexto:
Real
Consulta F3:
T9CA
Validação:
XFUNVldCmp("T9C",3)
CMN_DOBRA
Caractere (C)(30)
Desc Obra
Máscara:
@!
Contexto:
Real
CMN_IDOBRA
Caractere (C)(36)
Id Obra
Máscara:
@!
Contexto:
Real
CMN_TPINSC
Caractere (C)(1)
Tp Inscricao
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 14")
2 valores possíveis
  • 1CNPJ
  • 4CNO
CMN_NRINSC
Caractere (C)(14)
Nr Insc Est
Máscara:
@!
Contexto:
Real
Validação:
Iif( M->CMN_TPINSC $ "1|2", CGC( M->CMN_NRINSC ), .T. )
CMN_TPINST
Caractere (C)(1)
Tp Insc Tom
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 14")
2 valores possíveis
  • 1CNPJ
  • 4CNO
CMN_NRINST
Caractere (C)(14)
Nr Insc Tom
Máscara:
@!
Contexto:
Real
Validação:
Iif( M->CMN_TPINSC $ "1|2", CGC( M->CMN_NRINST ), .T. )
CMN_INDOBR
Caractere (C)(1)
Ind Obra
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 012")
3 valores possíveis
  • 0Nao e obra de const. civil ou nao esta sujeita a matric.
  • 1Obra Const. Civil - Emp. Total
  • 2Obra Const. Civil - Emp. Parcial
CMN_VLRBRU
Numérico (N)(14,2)
Vlr Bruto NF
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_VLRBRE
Numérico (N)(14,2)
Vlr Bc Ret
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_VLRPRI
Numérico (N)(14,2)
Vlr NF Contr
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_VLRADI
Numérico (N)(14,2)
Vlr Adic NF
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_VLRNPR
Numérico (N)(14,2)
Vlr Ret Prin
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_VLRNAD
Numérico (N)(14,2)
Vlr Ad N Con
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMN_PROCID
Caractere (C)(6)
Proc ID
Máscara:
@!
Contexto:
Real
CMN_XMLID
Caractere (C)(36)
Id do XML.
Contexto:
Real
CMN_CODPAR
Caractere (C)(60)
Cod Part
Máscara:
@!
Contexto:
Real
CMN_DPARTI
Caractere (C)(220)
Desc Part
Máscara:
@!
Contexto:
Real
CMN_IDPART
Caractere (C)(36)
Id Particip
Máscara:
@!
Contexto:
Real
CMN_CNPJPR
Caractere (C)(14)
CNPJ Prest
Máscara:
@R 99.999.999/9999-99
Validação:
xFunVldPJF(,2,.F.)

SELECT de exemplo da tabela CMN

No Protheus a tabela física leva o código da empresa (01 → 010) e registros excluídos ficam com D_E_L_E_T_ = '*'.

SQL · SQL Server
SELECT TOP 100
  CMN.CMN_FILIAL,
  CMN.CMN_ID,
  CMN.CMN_VERSAO,
  CMN.CMN_NOMEVE,
  CMN.CMN_INDAPU,
  CMN.CMN_PERAPU,
  CMN.CMN_VERANT,
  CMN.CMN_STATUS
FROM CMN010 CMN
WHERE CMN.D_E_L_E_T_ = ' '

Tabelas próximas no índice do Protheus

O ERPSeeker é um projeto independente, sem vínculo com a TOTVS. A estrutura pode variar conforme a versão e as customizações do seu ambiente.