Tabela CMR

Aquisição de Produção Rural
20camposNome físicoCMR010(empresa 01)

Campos da tabela CMR

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

20
CampoDescrição
CMR_FILIAL
Caractere (C)(2)
Filial
Contexto:
Real
CMR_ID
Caractere (C)(6)
ID
Máscara:
@!
Contexto:
Real
CMR_VERSAO
Caractere (C)(14)
Id. Ver. Reg
Máscara:
@!
Contexto:
Real
CMR_INDAPU
Caractere (C)(1)
Ind.Per.Apur
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 1") .And. XFUNVldUni("CMR",2,M->CMR_INDAPU+FWFLDGET("CMR_PERAPU")+FWFLDGET("CMR_TPINSC")+FWFLDGET("CMR_INSCES"))
1 valores possíveis
  • 1Mensal
CMR_PERAPU
Caractere (C)(6)
Per.Apuracao
Máscara:
@R 9999-99
Contexto:
Real
Validação:
XFUNVldUni("CMR",2,FWFLDGET("CMR_INDAPU")+M->CMR_PERAPU+FWFLDGET("CMR_TPINSC")+FWFLDGET("CMR_INSCES"))
CMR_VERANT
Caractere (C)(14)
Ver Ant Reg
Máscara:
@!
Contexto:
Real
CMR_STATUS
Caractere (C)(1)
Status Reg.
Máscara:
@!
Contexto:
Real
Validação:
Pertence(' 012349')
6 valores possíveis
  • 0Reg.Valido
  • 1Reg.Invalido
  • 2Reg.Transmitido
  • 3Reg.Transmitido com inconsistencia
  • 4Reg.Transmitido valido
  • 9Em Processame
CMR_PROTUL
Caractere (C)(44)
Ult. Prot.
Máscara:
@!
Contexto:
Real
CMR_PROTPN
Caractere (C)(44)
Pnlt. Prot.
Máscara:
@!
Contexto:
Real
CMR_EVENTO
Caractere (C)(1)
Id. Evento
Máscara:
@!
Contexto:
Real
Validação:
Pertence("IAE")
3 valores possíveis
  • IInclusao
  • AAlteracao
  • EExclusao
CMR_ATIVO
Caractere (C)(1)
Reg. Ativo?
Máscara:
@!
Contexto:
Real
Validação:
Pertence("12")
2 valores possíveis
  • 1Sim
  • 2Nao
CMR_IDESTA
Caractere (C)(6)
Id. Estab.
Máscara:
@!
Contexto:
Real
Consulta F3:
C92A
Validação:
XFUNVldCmp("C92",1,,,,.F.)
CMR_NRCAEP
Caractere (C)(15)
Nr. CAEPF
Máscara:
@!
Contexto:
Virtual (não existe no banco)
CMR_VLRTOT
Numérico (N)(14,2)
Valor Total
Máscara:
@E 99,999,999,999.99
Contexto:
Real
CMR_TPINSC
Caractere (C)(1)
Tp Inscricao
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 13") .and. XFUNVldUni("CMR",2,FWFLDGET("CMR_INDAPU")+FWFLDGET("CMR_PERAPU")+M->CMR_TPINSC+FWFLDGET("CMR_INSCES"))
2 valores possíveis
  • 1CNPJ
  • 3CAEPF
CMR_INSCES
Caractere (C)(15)
Nr Inscricao
Máscara:
@!
Contexto:
Real
Consulta F3:
C92B
Validação:
XFUNVldUni("CMR",2,FWFLDGET("CMR_INDAPU")+FWFLDGET("CMR_PERAPU")+FWFLDGET("CMR_TPINSC")+M->CMR_INSCES)
CMR_STASEC
Caractere (C)(1)
Status Sec.
Contexto:
Real
CMR_DINSIS
Data (D)(8)
Dt Inc. Sist
Contexto:
Real
CMR_XMLID
Caractere (C)(36)
Id do XML.
Contexto:
Real
CMR_LOGOPE
Caractere (C)(1)
Log Operacao
Máscara:
@!
Contexto:
Real
6 valores possíveis
  • 1Incl.Integr
  • 2Incl.Manual
  • 3Incl.Integr+Alt.Integr
  • 4Incl.Integr+Alt.Manual
  • 5Incl.Manual+Alt.Integr
  • 6Incl.Manual+Alt.Manual

SELECT de exemplo da tabela CMR

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
  CMR.CMR_FILIAL,
  CMR.CMR_ID,
  CMR.CMR_VERSAO,
  CMR.CMR_INDAPU,
  CMR.CMR_PERAPU,
  CMR.CMR_VERANT,
  CMR.CMR_STATUS,
  CMR.CMR_PROTUL
FROM CMR010 CMR
WHERE CMR.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.