Tabela SGJ

Amarração PV x OP
13camposNome físicoSGJ010(empresa 01)

Campos da tabela SGJ

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

13
CampoDescrição
GJ_FILIAL
Caractere (C)(2)
Filial
GJ_NUMPV
Caractere (C)(6)
Numero do PV
Máscara:
@!
Contexto:
Real
GJ_ITEMPV
Caractere (C)(2)
Item do PV
Máscara:
@!
Contexto:
Real
GJ_ITGRDPV
Caractere (C)(3)
Item Grade
Máscara:
@!
Contexto:
Real
GJ_PRODUTO
Caractere (C)(15)
Produto
Máscara:
@!
Contexto:
Real
GJ_LOCAL
Caractere (C)(2)
Armazem
Máscara:
@!
Contexto:
Real
Consulta F3:
NNR
Validação:
ExistCpo("NNR")
GJ_NUMOP
Caractere (C)(6)
Numero da OP
Máscara:
@!
Contexto:
Real
GJ_ITEMOP
Caractere (C)(2)
Item da OP
Máscara:
@!
Contexto:
Real
GJ_SEQUEN
Caractere (C)(3)
Sequenc. OP
Máscara:
@!
Contexto:
Real
GJ_ITGRDOP
Caractere (C)(2)
Item Grade
Máscara:
@!
Contexto:
Real
GJ_QUANT
Numérico (N)(9,2)
Qtde. do PV
Contexto:
Real
GJ_QEMPN
Numérico (N)(12,2)
Qtde. Emp.
Contexto:
Real
GJ_QEMPN2
Numérico (N)(12,2)
Qtde. Emp. 2
Contexto:
Real

SELECT de exemplo da tabela SGJ

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
  SGJ.GJ_FILIAL,
  SGJ.GJ_NUMPV,
  SGJ.GJ_ITEMPV,
  SGJ.GJ_ITGRDPV,
  SGJ.GJ_PRODUTO,
  SGJ.GJ_LOCAL,
  SGJ.GJ_NUMOP,
  SGJ.GJ_ITEMOP
FROM SGJ010 SGJ
WHERE SGJ.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.