Dicionário Protheus
Início

Tabela RJ2 no Protheus

Substituições

O que é a tabela RJ2 no Protheus?

A tabela RJ2 faz parte do sistema ERP Protheus da TOTVS e é utilizada para substituições.

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

Propriedades da Tabela

Propriedade Valor
X2_CHAVE RJ2
X2_PATH \DATA\
X2_ARQUIVO RJ2990
X2_NOME Substituições
X2_NOMESPA Sustituciones
X2_NOMEENG Substitutions
X2_ROTINA -
X2_MODO E
X2_MODOUN E
X2_MODOEMP E
X2_DELET 0
X2_TTS -
X2_UNICO RJ2_FILIAL+RJ2_MAT+DTOS(RJ2_DATADE)+DTOS(RJ2_DATATE)+RJ2_DEPTO+RJ2_FILSUB+RJ2_MATSUB
X2_PYME S
X2_MODULO 7
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_ 7976
R_E_C_D_E_L_ 0

Campos da Tabela RJ2 (10 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_
RJ2 01 RJ2_FILIAL C 2 0 Filial Sucursal Branch Filial do Substituído Sucursal del sustituido Replacement Branch - - x x x x x x x x x x x x x x x - SM0 1 x - - - S A R - - - - - - - - 033 - S - - N - N - - - 1 2 - - - 125392 0
RJ2 02 RJ2_MAT C 6 0 Substituído Sustituido Replaced Matrícula do Substituído Matrícula del sustituido Replacement Registration @! ExistCpoRh("SRA",FwFldGet("RJ2_MAT"),1,cFilAnt) x x x x x x x x x x x x x x x x - - 1 x - - - S A R - - - - - - - - 121 - S - - N - N - - - 1 2 - - - 125393 0
RJ2 03 RJ2_NOME C 30 0 Nome Nombre Name Nome do Substituído Nombre del sustituido Replacement Name @! - x x x x x x x x x x x x x x x x Iif(INCLUI,"",Posicione("SRA",1,RJ2->RJ2_FILIAL+RJ2->RJ2_MAT,"RA_NOME")) - 1 x x - - - S V V - - - - - - - Posicione("SRA",1,RJ2->RJ2_FILIAL+RJ2->RJ2_MAT,"RA_NOME") - - S - - N - N - - - 1 2 - - - 125394 0
RJ2 04 RJ2_DEPTO C 9 0 Departamento Departamento Department Departamento Departamento Department @! ExistCpo("SQB",FwFldGet("RJ2_DEPTO")) x x x x x x x x x x x x x x x x - - 1 x x - - - S A R - - - - - - - - 025 - S - - N - N - - - 1 2 - - - 125395 0
RJ2 05 RJ2_DESDEP C 30 0 Descr.Depto Descr. Depto Dept. Descr. Descricao do Departamento Descripción del departame Department Description @! - x x x x x x x x x x x x x x x x Iif(INCLUI,"",Posicione("SQB",1,xFilial("SQB")+RJ2->RJ2_DEPTO,"QB_DESCRIC")) - 1 x - - - N V V - - - - - - - - - - S - - N - N - - - 1 2 - - - 125396 0
RJ2 06 RJ2_FILSUB C 2 0 F.Substituto S.Sustituto Subst. Branc Filial do Substituto Sucursal sustituto Subst. Branch - ExistCpo("SM0",cEmpAnt+FwFldGet("RJ2_FILSUB")) x x x x x x x x x x x x x x x x - XM0 1 x - - - - - - - - - - - - - - 033 - S - - N - N - - - 1 2 - - - 125397 0
RJ2 07 RJ2_MATSUB C 6 0 M.Substituto M.Sustituto Subst. Enrol Matricula do Substituto Matrícula del sustituto Substitute Enrollment @! ExistCpoRh("SRA",FwFldGet("RJ2_MATSUB"),1,FwFldGet("RJ2_FILSUB")) x x x x x x x x x x x x x x x x - SRA 1 x - - - S A R - - - - - - - - 121 - S - - N - N - - - 1 2 - - - 125398 0
RJ2 08 RJ2_NOMSUB C 30 0 N.Substituto N.Sustituto Subst. Nm Nome do Substituto Nombre del sustituto Substitute Name @! - x x x x x x x x x x x x x x x x Iif(INCLUI,"",Posicione("SRA",1,RJ2->RJ2_FILSUB+RJ2->RJ2_MATSUB,"RA_NOME")) - 1 x x - - - S V V - - - - - - - Posicione("SRA",1,RJ2->RJ2_FILSUB+RJ2->RJ2_MATSUB,"RA_NOME") - - S - - N - N - - - 1 2 - - - 125399 0
RJ2 09 RJ2_DATADE D 8 0 Inicio Subst Inicio Sust Subst St. Data Inicio Substituicao Fecha Inicio Sustitución Substitution Start Date - NaoVazio() x x x x x x x x x x x x x x x x - - 1 x - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 125400 0
RJ2 10 RJ2_DATATE D 8 0 Fim Substit. Final Sustit Subst. End Data Final Substituicao Fecha Final Sustitución Substitution End Date - - x x x x x x x x x x x x x x x x - - 1 x - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 125401 0

Índices da Tabela RJ2 (4 í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_
RJ2 1 RJ2_FILIAL+RJ2_MAT+DTOS(RJ2_DATADE)+RJ2_DEPTO Substituído + Inicio Subst + Departamento Sustituido + Inicio Sust + Departamento Replaced + Subst St. + Department S - - S 2 3 - 18300 0
RJ2 2 RJ2_FILSUB+RJ2_MATSUB+DTOS(RJ2_DATADE)+RJ2_DEPTO F.Substituto + M.Substituto + Inicio Subst + Departamento S.Sustituto + M.Sustituto + Inicio Sust + Departamento Subst. Branc + Subst. Enrol + Subst St. + Department S - - S 2 3 - 18301 0
RJ2 3 RJ2_FILIAL+DTOS(RJ2_DATADE)+RJ2_MAT+RJ2_DEPTO Inicio Subst + Substituído + Departamento Inicio Sust + Sustituido + Departamento Subst St. + Replaced + Department S - - S 2 3 - 18302 0
RJ2 4 RJ2_FILIAL+RJ2_MAT+DTOS(RJ2_DATADE)+DTOS(RJ2_DATATE)+RJ2_FILSUB+RJ2_MATSUB Substituído + Inicio Subst + Fim Substit. + F.Substituto + M.Substitut Sustituido + Inicio Sust + Final Sustit + S.Sustituto + M.Sustituto Replaced + Subst St. + Subst. End + Subst. Branc + Subst. Enrol S - - S 2 3 - 18303 0

Perguntas frequentes

Para que serve a tabela RJ2 no Protheus?

Ela é utilizada para substituições dentro do sistema ERP Protheus.

Como consultar os campos da tabela RJ2?

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

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

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

Exemplo de consulta SQL da tabela RJ2

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

SELECT
    RJ2_FILIAL,
    RJ2_MAT,
    RJ2_NOME,
    RJ2_DEPTO,
    RJ2_DESDEP,
    RJ2_FILSUB,
    RJ2_MATSUB,
    RJ2_NOMSUB,
    RJ2_DATADE,
    RJ2_DATATE
FROM RJ2
WHERE
    D_E_L_E_T_ = ' '
    AND RJ2_FILIAL = 'VALOR'
    AND RJ2_MAT = 'VALOR'
    AND RJ2_NOME = 'VALOR'
    AND RJ2_DEPTO = 'VALOR'
    AND RJ2_DESDEP = 'VALOR'
    AND RJ2_FILSUB = 'VALOR'
    AND RJ2_MATSUB = 'VALOR'
    AND RJ2_NOMSUB = 'VALOR'
    AND RJ2_DATADE BETWEEN '20260401' AND '20260430'
    AND RJ2_DATATE BETWEEN '20260401' AND '20260430'