CUSTOS DE DOCUMENTOS TMS
A tabela DFN faz parte do sistema ERP Protheus da TOTVS e é utilizada para custos de documentos tms.
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 DFN 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 DFN, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | DFN |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | DFN990 |
| X2_NOME | CUSTOS DE DOCUMENTOS TMS |
| X2_NOMESPA | COSTOS DE DOCUMENTOS TMS |
| X2_NOMEENG | TMS DOCUMENT COSTS |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | DFN_FILIAL+DFN_FILDOC+DFN_DOC+DFN_SERIE+DFN_SERTMS+DFN_TIPTRA+DFN_CODDES |
| X2_PYME | N |
| X2_MODULO | 43 |
| X2_DISPLAY | DFN_FILIAL+DFN_IDCTMS+DFN_FILDOC+DFN_SERIE+DFN_SERTMS+DFN_TIPTRA+DFN_CODDES+ DFN_FILCUS |
| 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_ | 3229 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DFN | 01 | DFN_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 | - | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50104 | 0 |
| DFN | 02 | DFN_IDCTMS | C | 6 | 0 | ID.Custo TMS | ID.Costo TMS | TMS Cost ID | ID.Custo TMS | ID.Costo TMS | TMS Cost ID | @! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50105 | 0 |
| DFN | 03 | DFN_FILDOC | C | 2 | 0 | Fil.Docto. | Suc. Doc. | Doc. Branch | Filial do Documento | Sucursal del Documento | Document Branch | - | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50106 | 0 |
| DFN | 04 | DFN_DOC | C | 9 | 0 | No.Docto. | No. Doc. | Doc. Number | No.Documento | Numero de Documento | Document Number | @! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 018 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50107 | 0 |
| DFN | 05 | DFN_SERIE | C | 3 | 0 | Serie Docto. | Serie Doc. | Doc. Series | Serie Documento | Serie Documento | Document Series | !!! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 094 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50108 | 0 |
| DFN | 06 | DFN_SERTMS | C | 1 | 0 | Serv.Transp. | Serv.Transp. | Transp. Serv | Servico de Transporte | Servicio de Transporte | Transportation Service | @! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50109 | 0 |
| DFN | 07 | DFN_TIPTRA | C | 1 | 0 | Tipo Transp. | Tipo Transp. | Transp. Type | Tipo de Transporte | Tipo de Transporte | Transportation Type | @! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50110 | 0 |
| DFN | 08 | DFN_CODDES | C | 15 | 0 | Cod.Despesa | Cod. Gasto | Expense Cd | Cod.Despesa | Cod. Gasto | Expense Code | @! | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 50111 | 0 |
| DFN | 09 | DFN_DSCDES | C | 30 | 0 | Desc.Despesa | Desc. Gasto | Expense Desc | Desc.Despesa | Desc. Gasto | Expense Description | @! | - | x x x x x x xx x x x x x x x x | Iif(Inclui, '', Posicione('DT7', 1, xFilial('DT7')+DFN->DFN_CODDES, 'DT7_DESCRI')) | - | 1 | xx | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione('DT7', 1, xFilial('DT7')+DFN->DFN_CODDES, 'DT7_DESCRI') | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50112 | 0 |
| DFN | 10 | DFN_CUSTO1 | N | 14 | 2 | Custo Moeda1 | Cost Moneda1 | Currency1 Co | Custo Moeda 1 Apurado | Costo Moneda 1 Anulado | Calculated Currency1 Cost | @E 99,999,999,999.99 | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50113 | 0 |
| DFN | 11 | DFN_CUSTO2 | N | 14 | 2 | Custo Moeda2 | Cto Moneda2 | Cur. 2 Cost | Custo Moeda 2 Apurado | Costo Moneda 2 Calculado | Calculated Currency2 Cost | @E 99,999,999,999.99 | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50114 | 0 |
| DFN | 12 | DFN_CUSTO3 | N | 14 | 2 | Custo Moeda3 | Cto Moneda3 | Cur. 3 Cost | Custo Moeda 3 Apurado | Costo Moneda 3 Calculado | Calculated Currency3 Cost | @E 99,999,999,999.99 | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50115 | 0 |
| DFN | 13 | DFN_CUSTO4 | N | 14 | 2 | Custo Moeda4 | Cost Moneda4 | Currency4 Co | Custo Moeda 4 Apurado | Costo Moneda 4 Anulado | Calculated Currency4 Cost | @E 99,999,999,999.99 | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50116 | 0 |
| DFN | 14 | DFN_CUSTO5 | N | 14 | 2 | Custo Moeda5 | Cost Moneda5 | Cost Curr. 5 | Custo Moeda 5 Apurado | Costo Moneda 5 Calculado | Cost Currency 5 Accrued | @E 99,999,999,999.99 | - | x x x x x x xx x x x x x x x x | - | - | 1 | xxxx | - | - | - | - | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50117 | 0 |
| DFN | 15 | DFN_FILCUS | C | 2 | 0 | Fil.Custo | Suc. Costo | Cost Branch | Filial de custo | Sucursal de costo | Cost Branch | - | - | x x x x x x xx x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 50118 | 0 |
| DFN | 16 | DFN_SDOC | C | 3 | 0 | Série Doc. | Serie Doc. | Inv.Series | Série do Documento Fiscal | Serie de Documento Fiscal | Invoice Series | !!! | - | x x x x x x x x x x x x x x x | - | - | 1 | xx x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | 095 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 50119 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DFN | 1 | DFN_FILIAL+DFN_IDCTMS+DFN_FILDOC+DFN_DOC+DFN_SERIE+DFN_SERTMS+DFN_TIPTRA+DFN_CODDES+DFN_FILCUS | ID.Custo TMS + Fil.Docto. + No.Docto. + Serie Docto. + Serv.Transp. + | ID.Costo TMS + Suc. Doc. + No. Doc. + Serie Doc. + Serv.Transp. + Tipo | TMS Cost ID + Doc. Branch + Doc. Number + Doc. Series + Transp. Serv + | S | DFJ+XXX+XXX+XXX+XXX+XXX+XXX | - | S | 2 | 3 | - | 7737 | 0 |
| DFN | 2 | DFN_FILIAL+DFN_FILDOC+DFN_DOC+DFN_SERIE+DFN_SERTMS+DFN_TIPTRA | Fil.Docto. + No.Docto. + Serie Docto. + Serv.Transp. + Tipo Transp. | Suc. Doc. + No. Doc. + Serie Doc. + Serv.Transp. + Tipo Transp. | Doc. Branch + Doc. Number + Doc. Series + Transp. Serv + Transp. Type | S | XXX+XXX+XXX+XXX+XXX | - | S | 2 | 3 | - | 7738 | 0 |
| DFN | 3 | DFN_FILIAL+DFN_IDCTMS+DFN_FILDOC+DFN_DOC+DFN_SDOC+DFN_SERTMS+DFN_TIPTRA+DFN_CODDES+DFN_FILCUS | ID.Custo TMS + Fil.Docto. + No.Docto. + Série Doc. + Serv.Transp. + Ti | ID.Costo TMS + Suc. Doc. + No. Doc. + Serie Doc. + Serv.Transp. + Tipo | TMS Cost ID + Doc. Branch + Doc. Number + Inv.Series + Transp. Serv + | S | DFJ+XXX+XXX+XXX+XXX+XXX+XXX | - | N | 2 | 3 | - | 7739 | 0 |
| DFN | 4 | DFN_FILIAL+DFN_FILDOC+DFN_DOC+DFN_SDOC+DFN_SERTMS+DFN_TIPTRA | Fil.Docto. + No.Docto. + Série Doc. + Serv.Transp. + Tipo Transp. | Suc. Doc. + No. Doc. + Serie Doc. + Serv.Transp. + Tipo Transp. | Doc. Branch + Doc. Number + Inv.Series + Transp. Serv + Transp. Type | S | XXX+XXX+XXX+XXX+XXX | - | N | 2 | 3 | - | 7740 | 0 |
| DFN | 5 | DFN_FILIAL+DFN_IDCTMS+DFN_FILDOC+DFN_DOC+DFN_SERIE+DFN_CODDES | ID.Custo TMS + Fil.Docto. + No.Docto. + Serie Docto. + Cod.Despesa | ID.Costo TMS + Suc. Doc. + No. Doc. + Serie Doc. + Cod. Gasto | TMS Cost ID + Doc. Branch + Doc. Number + Doc. Series + Expense Cd | S | - | - | S | 2 | 3 | - | 7741 | 0 |
Ela é utilizada para custos de documentos tms 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
DFN_FILIAL,
DFN_IDCTMS,
DFN_FILDOC,
DFN_DOC,
DFN_SERIE,
DFN_SERTMS,
DFN_TIPTRA,
DFN_CODDES,
DFN_DSCDES,
DFN_CUSTO1,
DFN_CUSTO2,
DFN_CUSTO3,
DFN_CUSTO4,
DFN_CUSTO5,
DFN_FILCUS,
DFN_SDOC
FROM DFN
WHERE
D_E_L_E_T_ = ' '
AND DFN_FILIAL = 'VALOR'
AND DFN_IDCTMS = 'VALOR'
AND DFN_FILDOC = 'VALOR'
AND DFN_DOC = 'VALOR'
AND DFN_SERIE = 'VALOR'
AND DFN_SERTMS = 'VALOR'
AND DFN_TIPTRA = 'VALOR'
AND DFN_CODDES = 'VALOR'
AND DFN_DSCDES = 'VALOR'
AND DFN_CUSTO1 = 0
AND DFN_CUSTO2 = 0
AND DFN_CUSTO3 = 0
AND DFN_CUSTO4 = 0
AND DFN_CUSTO5 = 0
AND DFN_FILCUS = 'VALOR'
AND DFN_SDOC = 'VALOR'