Tabela TWP

Retorno de saldos
13camposNome físicoTWP010(empresa 01)

Campos da tabela TWP

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

13
CampoDescrição
TWP_FILIAL
Caractere (C)(2)
Filial
Contexto:
Real
TWP_IDREG
Caractere (C)(20)
Id Registro
Contexto:
Real
TWP_NUMNF
Caractere (C)(9)
Numero NF
Máscara:
@!
Contexto:
Real
TWP_SERNF
Caractere (C)(3)
Serie NF
Máscara:
!!!
Contexto:
Real
TWP_QTDRET
Numérico (N)(12)
Qtd Retorno
Máscara:
@E 999,999,999,999
Contexto:
Real
TWP_SDOCNF
Caractere (C)(3)
Ser Doc NF
Máscara:
@!
Contexto:
Real
TWP_ITEMNF
Caractere (C)(4)
Item NF
Máscara:
!!!
Contexto:
Real
TWP_OSTIPO
Caractere (C)(1)
Tipo OS
Máscara:
@9
Contexto:
Real
Validação:
Pertence("12")
2 valores possíveis
  • 1Sigatec
  • 2Sigamnt
TWP_OSNUM
Caractere (C)(6)
Numero OS
Máscara:
@!
Contexto:
Real
TWP_OSITEM
Caractere (C)(2)
Item OS
Máscara:
@!
Contexto:
Real
TWP_EXIGNF
Caractere (C)(1)
Exige NF
Máscara:
@!
Contexto:
Real
TWP_DTRET
Data (D)(8)
Data Ret
Contexto:
Real
TWP_FILNF
Caractere (C)(2)
Filial NF
Contexto:
Real

SELECT de exemplo da tabela TWP

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
  TWP.TWP_FILIAL,
  TWP.TWP_IDREG,
  TWP.TWP_NUMNF,
  TWP.TWP_SERNF,
  TWP.TWP_QTDRET,
  TWP.TWP_SDOCNF,
  TWP.TWP_ITEMNF,
  TWP.TWP_OSTIPO
FROM TWP010 TWP
WHERE TWP.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.