Licenciamento Forn por Produto
A tabela TB5 faz parte do sistema ERP Protheus da TOTVS e é utilizada para licenciamento forn por produto.
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 TB5 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 TB5, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | TB5 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | TB5990 |
| X2_NOME | Licenciamento Forn por Produto |
| X2_NOMESPA | Licenciamiento Sumin. por Prod |
| X2_NOMEENG | Vendor Accreditation by Produc |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | TB5_FILIAL+TB5_CODIGO |
| X2_PYME | S |
| X2_MODULO | 56 |
| 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_ | 9156 |
| R_E_C_D_E_L_ | 0 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TB5 | 01 | TB5_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial do Sistema | Sucursal del sistema | System Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152795 | 0 |
| TB5 | 02 | TB5_CODIGO | C | 6 | 0 | Código | Codigo | Code | Código Receptor | Codigo Receptor | Recept.Code | @! | ExistChav("TB5",M->TB5_CODIGO) .and. FreeForUse("TB5") | x x x x x x x x x x x x x x x xxx | IF(INCLUI,GETSXENUM("TB5","TB5_CODIGO"),TB5->TB5_CODIGO) | - | 1 | x x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 152796 | 0 |
| TB5 | 03 | TB5_TPRECE | C | 1 | 0 | Tp. Receptor | Tp. Receptor | Tp.Recept. | Tipo de Receptor | Tipo de Receptor | Type of Recept. | @! | Pertence("12") .and. SG280LIMPA("TB5_FORNEC",,aLimpa,,,"TB5_FORNEC") | x x x x x x x x x x x x x x x x x | If(Inclui,"1",TB5->TB5_TPRECE) | - | 1 | x x | - | - | - | S | A | R | - | - | 1=Fornecedor;2=Cliente | 1=Proveedor;2=Cliente | 1=Supplier;2=Customer | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 152797 | 0 |
| TB5 | 04 | TB5_FORNEC | C | 6 | 0 | Receptor | Receptor | Receptor | Receptor | Receptor | Receptor | @! | SG280VLF() | x x x x x x x x x x x x x x x x | - | FOR | 1 | x x x x | - | S | - | S | A | R | - | - | - | - | - | - | - | - | 001 | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 152798 | 0 |
| TB5 | 05 | TB5_LOJA | C | 2 | 0 | Loja | Tienda | Store | Loja do Fornecedor | Tienda del Proveedor | Supplier Store | @! | "EXISTCPO('SA2',M->TB5_FORNEC+M->TB5_LOJA) .and. EXISTCHAV('TB5',M->TB5_FORNEC+M->TB5_LOJA)" | x x x x x x x x x x x x x x x x | - | - | 1 | x x x x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 002 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 152799 | 0 |
| TB5 | 06 | TB5_DESC | C | 40 | 0 | Desc. Forn. | Desc. Prov | Suppl. Desc. | Descricäo do Fornecedor | Descripcion del Proveedor | Supplier Description | @! | - | x x x x x x x x x x x x x x x x | If(!Inclui,SG280RELA(,,,'NOME'),'') | - | 1 | x x xx x | - | - | - | S | V | V | - | - | - | - | - | - | - | SG280RELA(,,,'NOME') | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152800 | 0 |
| TB5 | 07 | TB5_END | C | 40 | 0 | Endereco | Direccion | Address | Endereco do Funcionario | Direccion de Empleado | Employee's Address | @! | - | x x x x x x x x x x x x x x x x | If(!Inclui,SG280RELA(,,,'END'),'') | - | 1 | x x xx x | - | - | - | N | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152801 | 0 |
| TB5 | 08 | TB5_TEL | C | 20 | 0 | Telefone | Telefono | Phone | Numero do Telefone | Numero de Telefono | Telephone Number | @! | - | x x x x x x x x x x x x x x x x | If(!Inclui,SG280RELA(,,,'TEL'),'') | - | 1 | xxxxxx x | - | - | - | N | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152802 | 0 |
| TB5 | 09 | TB5_CODLAM | C | 12 | 0 | Licença | Licencia | License | Código Licença Ambiental | Codigo Licencia Ambient | Envirom.License Code | @! | ExistCpo("TA0",M->TB5_CODLAM) .AND. SGA280LA() | x x x x x x x x x x x x x x x x | - | TA0 | 1 | x x | - | S | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 152803 | 0 |
| TB5 | 10 | TB5_DESLAM | C | 80 | 0 | Descrição | Descripcion | Descrip. | Desc. Licença Ambiental | Desc. Licencia Ambiental | Envirom.License Desc. | @! | - | x x x x x x x x x x x x x x x x | TA0->(VDISP(M->TB5_CODLAM,"TA0_EMENTA")) | - | 1 | x | - | - | - | N | V | V | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152804 | 0 |
| TB5 | 11 | TB5_STATUS | C | 1 | 0 | Status | Estatus | Status | Status do Receptor | Estatus del receptor | Status of Receiver | @! | PERTENCE("12") .AND. SGA280STA() | x x x x x x x x x x x x x x x x | IIF(!Inclui,IIF(M->TB5_DATAVA < dDATABASE,"2",TB5->TB5_STATUS),"") | - | 1 | x x | - | - | - | N | A | R | - | - | 1=Ativa;2=Inativa | 1=Activa;2=Inactiva | 1=Active;2=Inactive | - | M->TB5_DATAVA >= dDATABASE | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 152805 | 0 |
| TB5 | 12 | TB5_DATAVA | D | 8 | 0 | Dt. Validade | Fch.Validez | Val.Date | Data da Validade | Fecha de Validez | Validity Date | - | - | x x x x x x x x x x x x x x x x | SGAA280DAT() | - | 1 | x | - | - | - | N | V | V | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 152806 | 0 |
| TB5 | 13 | TB5_MOTIVO | M | 10 | 0 | Motivo Inat. | Motivo Inac. | Inactvt.Motv | Motivo da Inatividade | Motivo de la Inactividad | Motive of Inactivity | @! | - | x x x x x x x x x x x x x x x x | IIF(!Inclui,IIF(M->TB5_DATAVA < dDATABASE,"Licença vencida",TB5->TB5_MOTIVO),"") | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | M->TB5_STATUS == "2" .AND. M->TB5_DATAVA >= dDATABASE | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 152807 | 0 |
| TB5 | 14 | TB5_DOCFIL | C | 2 | 0 | Filial Docum | Suc. Docum. | Doc Branch | Filial do Documento | Suc. del Documento | Branch of Document | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 152808 | 0 |
| TB5 | 15 | TB5_DOCTO | C | 16 | 0 | Documento | Documento | Document | Documento Relacionado | Documento Relacionado | Related Document | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 152809 | 0 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TB5 | 1 | TB5_FILIAL+TB5_CODIGO | Código | Codigo | Code | S | - | - | S | 2 | 3 | - | 21815 | 0 |
| TB5 | 2 | TB5_FILIAL+TB5_TPRECE+TB5_FORNEC+TB5_LOJA+TB5_CODLAM | Tp. Receptor + Receptor + Loja + Licença | Tp. Receptor + Receptor + Tienda + Licencia | Tp.Recept. + Receptor + Store + License | S | - | - | S | 2 | 3 | - | 21816 | 0 |
| TB5 | 3 | TB5_FILIAL+TB5_FORNEC+TB5_LOJA+TB5_CODLAM | Receptor + Loja + Licença | Receptor + Tienda + Licencia | Receptor + Store + License | S | - | - | S | 2 | 3 | - | 21817 | 0 |
Ela é utilizada para licenciamento forn por produto dentro do sistema ERP Protheus.
Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.
Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.
Modelo de query gerado automaticamente com base na estrutura da tabela.
SELECT
TB5_FILIAL,
TB5_CODIGO,
TB5_TPRECE,
TB5_FORNEC,
TB5_LOJA,
TB5_DESC,
TB5_END,
TB5_TEL,
TB5_CODLAM,
TB5_DESLAM,
TB5_STATUS,
TB5_DATAVA,
TB5_MOTIVO,
TB5_DOCFIL,
TB5_DOCTO
FROM TB5
WHERE
D_E_L_E_T_ = ' '
AND TB5_FILIAL = 'VALOR'
AND TB5_CODIGO = 'VALOR'
AND TB5_TPRECE = 'VALOR'
AND TB5_FORNEC = 'VALOR'
AND TB5_LOJA = 'VALOR'
AND TB5_DESC = 'VALOR'
AND TB5_END = 'VALOR'
AND TB5_TEL = 'VALOR'
AND TB5_CODLAM = 'VALOR'
AND TB5_DESLAM = 'VALOR'
AND TB5_STATUS = 'VALOR'
AND TB5_DATAVA BETWEEN '20260501' AND '20260531'
AND TB5_DOCFIL = 'VALOR'
AND TB5_DOCTO = 'VALOR'