Simulação Vendas
A tabela SN7 faz parte do sistema ERP Protheus da TOTVS e é utilizada para simulação vendas.
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 SN7 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 SN7, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | SN7 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | SN7990 |
| X2_NOME | Simulação Vendas |
| X2_NOMESPA | Simulación Ventas |
| X2_NOMEENG | Sales Simulation |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | N7_FILIAL+N7_CBASE+N7_ITEM |
| X2_PYME | S |
| X2_MODULO | 1 |
| 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_ | 8467 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SN7 | 01 | N7_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial | Sucursal | System Branch | - | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139052 | 0 |
| SN7 | 02 | N7_CBASE | C | 10 | 0 | Codigo Base | Codigo Base | Asset Bs.Cd. | Codigo Base do Bem | Codigo Base del Bien | Asset Base Code | @! | IIF(inclui,Af180Chav(),.t.) | x x x x x x x x x xx xx x x x x x x x x | - | SSN3 | 1 | x | - | S | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 139053 | 0 |
| SN7 | 03 | N7_ITEM | C | 4 | 0 | Codigo Item | Codigo Item | Item Code | Codigo Item do Bem | Codigo Item del Bien | Item Code of Asset | @! | IIF(inclui,Af180Chav(),.t.) | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x | - | S | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 139054 | 0 |
| SN7 | 04 | N7_DESCRIC | C | 40 | 0 | Descricao | Descripcion | Description | Descricao do Bem | Descripci¾n del Bien | Asset Description | @! | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x x x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139055 | 0 |
| SN7 | 05 | N7_TAXA | N | 9 | 4 | Taxa de Depr | Tasa Deprec. | Deprec.Rate | Taxa de Depreciacao | Tasa de Depreciacion | Depreciation Rate | @E 9,999.9999 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139056 | 0 |
| SN7 | 06 | N7_DATA | D | 8 | 0 | Data de Emis | Fch Emision | Issue Date | Data de Emissao da Simul | Fecha Emision Simulacion | Simulation Issue Date | - | m->n7_data > getmv("MV_ULTDEPR") | x x x x x x x x x xx xx x x x x x x x x | dDataBAse | - | 1 | x x x | - | - | - | N | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139057 | 0 |
| SN7 | 07 | N7_DTBAIXA | D | 8 | 0 | Data Baixa | Fch Cancel. | Posting Date | Data da Efetivacao Baixa | Fecha Concrecion Cancel | Posting Confirmation Date | - | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x x x | - | - | - | N | V | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139058 | 0 |
| SN7 | 08 | N7_DTSIMUL | D | 8 | 0 | Data Prov Bx | Fch Prob Cie | Post.Prob.Dt | DataProvavel da Baixa | Fecha Probable de Cancel. | Posting Probable Date | - | m->n7_dtsimul >= m->n7_data .And. A180DAta() | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139059 | 0 |
| SN7 | 09 | N7_MOTIVO | C | 2 | 0 | Motivo Simul | Mot. Simulac | Simulat.Reas | Motivo da Simulacao | Motivo de la Simulacion | Reason for Simulation | @! | - | x x x x x x x x x xx xx x x x x x x x x | "01" | 16 | 1 | x x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139060 | 0 |
| SN7 | 10 | N7_NOTA | C | 9 | 0 | Nota Fiscal | Factura | Invoice | Numero da Nota Fiscal | Numero de la Factura | Invoice Number | @! | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 018 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139061 | 0 |
| SN7 | 11 | N7_SERIE | C | 3 | 0 | Serie Nota | Serie Fact. | Inv.Series | Serie da Nota Fiscal | Serie de la Factura | Invoice Series | !!! | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | x x x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 094 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139062 | 0 |
| SN7 | 12 | N7_VLSIMU1 | N | 14 | 2 | Valor Simula | Valor Simula | Simulat Val. | Valor Simulado | Valor Simulado | Simulated Value | @E 99,999,999,999.99 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139063 | 0 |
| SN7 | 13 | N7_VORIG1 | N | 14 | 2 | Vl Orig Real | Vl Orig Real | Orig.Val.Rea | Valor Original em Real | Valor Original en Peso | Original Value in Real | @E 99,999,999,999.99 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139064 | 0 |
| SN7 | 14 | N7_VORIG3 | N | 14 | 2 | Vl Orig Ufir | Vl Orig Ufir | UFIR Orig.Vl | Valor Original em Ufir | Valor Original en Ufir | Original Value in UFIR | @E 99,999,999,999.99 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139065 | 0 |
| SN7 | 15 | N7_SALDEPR | N | 14 | 2 | Sal a Deprec | Sdo a Deprec | Bal.to Depr. | Saldo a Depreciar em Real | Saldo a Depreciar en $ | Balance to Deprec. Cur. 1 | @E 99,999,999,999.99 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139066 | 0 |
| SN7 | 16 | N7_VLREAL | N | 14 | 2 | Valor Real | Valor Real | Actual Value | Valor Real | Valor Real | Actual Value | @E 99,999,999,999.99 | - | x x x x x x x x x xx xx x x x x x x x x | - | - | 1 | xxxx x | - | - | - | S | V | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139067 | 0 |
| SN7 | 17 | N7_CONTA | C | 20 | 0 | Conta Contab | Cta Contable | Account | Conta Contabil do Bem | Cta.Contable del Bien | Asset Ledger Account | @! | - | x x x x x x x x x x x x x x x x x x x | - | CT1 | 1 | x x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | 003 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139068 | 0 |
| SN7 | 18 | N7_SUBCTA | C | 9 | 0 | Item da Cont | Item Cuenta | Account Item | Codigo do Item da Conta | Codigo del Item de Cuenta | Item Code in Account | @! | - | x x x x x x x x x xx xx x x x x x x x x | - | CTD | 1 | x x x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | 005 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139069 | 0 |
| SN7 | 19 | N7_CCUSTO | C | 9 | 0 | Centro Custo | Centro Costo | Cost Center | Centro de Custo | Centro de Costo | Cost Center | @! | - | x x x x x x x x x xx xx x x x x x x x x | - | CTT | 1 | x x x | - | - | - | - | V | V | - | - | - | - | - | - | - | - | 004 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 139070 | 0 |
| SN7 | 20 | N7_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 | - | - | - | 139071 | 0 |
| SN7 | 21 | N7_EC05DB | C | 16 | 0 | Ent.Deb. 05 | Ent.Deb. 05 | Ent.Deb. 05 | Ent. Contábil Debito 05 | Ent. Contable Debito 05 | Acc. Entity Debit 05 | @! | CTB105EntC(,M->N7_EC05DB,,'05') | x x x x x x x x x x x x x x x x | - | CV0 | 0 | xxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 040 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 177691 | 0 |
| SN7 | 22 | N7_EC05CR | C | 16 | 0 | Ent.Cred. 05 | Ent.Cred. 05 | Cred.Ent. 05 | Ent. Contábil Credito 05 | Ent. Contable Credito 05 | Acc. Entity Credit 05 | @! | CTB105EntC(,M->N7_EC05CR,,'05') | x x x x x x x x x x x x x x x x | - | CV0 | 0 | xxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 040 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 177692 | 0 |
| SN7 | 23 | N7_EC06DB | C | 16 | 0 | Ent.Deb. 06 | Ent.Deb. 06 | Ent.Deb. 06 | Ent. Contábil Debito 06 | Ent. Contable Debito 06 | Acc. Entity Debit 06 | @! | CTB105EntC(,M->N7_EC06DB,,'06') | x x x x x x x x x x x x x x x x | - | CV0 | 0 | xxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 042 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 177693 | 0 |
| SN7 | 24 | N7_EC06CR | C | 16 | 0 | Ent.Cred. 06 | Ent.Cred. 06 | Cred.Ent. 06 | Ent. Contábil Credito 06 | Ent. Contable Credito 06 | Acc. Entity Credit 06 | @! | CTB105EntC(,M->N7_EC06CR,,'06') | x x x x x x x x x x x x x x x x | - | CV0 | 0 | xxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 042 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 177694 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SN7 | 1 | N7_FILIAL+N7_CBASE+N7_ITEM | Codigo Base + Codigo Item | Codigo Base + Codigo Item | Asset Bs.Cd. + Item Code | S | SN3 | - | S | 2 | 3 | - | 19951 | 0 |
Ela é utilizada para simulação vendas 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
N7_FILIAL,
N7_CBASE,
N7_ITEM,
N7_DESCRIC,
N7_TAXA,
N7_DATA,
N7_DTBAIXA,
N7_DTSIMUL,
N7_MOTIVO,
N7_NOTA,
N7_SERIE,
N7_VLSIMU1,
N7_VORIG1,
N7_VORIG3,
N7_SALDEPR,
N7_VLREAL,
N7_CONTA,
N7_SUBCTA,
N7_CCUSTO,
N7_SDOC,
N7_EC05DB,
N7_EC05CR,
N7_EC06DB,
N7_EC06CR
FROM SN7
WHERE
D_E_L_E_T_ = ' '
AND N7_FILIAL = 'VALOR'
AND N7_CBASE = 'VALOR'
AND N7_ITEM = 'VALOR'
AND N7_DESCRIC = 'VALOR'
AND N7_TAXA = 0
AND N7_DATA BETWEEN '20260501' AND '20260531'
AND N7_DTBAIXA BETWEEN '20260501' AND '20260531'
AND N7_DTSIMUL BETWEEN '20260501' AND '20260531'
AND N7_MOTIVO = 'VALOR'
AND N7_NOTA = 'VALOR'
AND N7_SERIE = 'VALOR'
AND N7_VLSIMU1 = 0
AND N7_VORIG1 = 0
AND N7_VORIG3 = 0
AND N7_SALDEPR = 0
AND N7_VLREAL = 0
AND N7_CONTA = 'VALOR'
AND N7_SUBCTA = 'VALOR'
AND N7_CCUSTO = 'VALOR'
AND N7_SDOC = 'VALOR'
AND N7_EC05DB = 'VALOR'
AND N7_EC05CR = 'VALOR'
AND N7_EC06DB = 'VALOR'
AND N7_EC06CR = 'VALOR'