Contratos Futuros
A tabela NCS faz parte do sistema ERP Protheus da TOTVS e é utilizada para contratos futuros.
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 NCS 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 NCS, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | NCS |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | NCS990 |
| X2_NOME | Contratos Futuros |
| X2_NOMESPA | Contratos futuros |
| X2_NOMEENG | Future Contracts |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | C |
| X2_MODOEMP | C |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | NCS_FILIAL+NCS_CODIGO |
| X2_PYME | N |
| X2_MODULO | 67 |
| 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_ | 6728 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NCS | 01 | NCS_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial | Sucursal | Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106813 | 0 |
| NCS | 02 | NCS_CODIGO | C | 10 | 0 | Código seque | Código Secue | Seq code | Código sequencial do regi | Código secuencial de Reg | Record sequential code | @! | - | x x x x x x x x x x x x x x x x | GetSx8Num("NCS", "NCS_CODIGO") | - | 1 | x x xx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106814 | 0 |
| NCS | 03 | NCS_DATAIN | C | 19 | 0 | Dt / Hr | Fc / Hr | Dt / Tm | Dt Hora Rec. registro | Fch Hora Rec. Registro | Dt time record rec | @! | - | x x x x x x x x x x x x x x x | cValToChar(DATE()) + " " + cValToChar(TIME()) | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106815 | 0 |
| NCS | 04 | NCS_BOLSA | C | 6 | 0 | Bolsa | Beca | Bag | Bolsa | Beca | Bag | @! | Vazio() .or. ExistCpo("N8C", M->NCS_BOLSA) | x x x x x x x x x x x x x x x x | - | N8C | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106816 | 0 |
| NCS | 05 | NCS_TICKER | C | 15 | 0 | Ticker | Ticker | Ticker | Ticker (contrato) | Ticker (contrato) | Ticker (contract) | @! | Vazio() .or. ExistCpo("NK0", M->NCS_TICKER) | x x x x x x x x x x x x x x x x | - | NK0IDX | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106817 | 0 |
| NCS | 06 | NCS_DTINI | D | 8 | 0 | Data Inicial | Fecha inicia | Start Date | Data inicial | Fecha inicial | Start Date | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106818 | 0 |
| NCS | 07 | NCS_DTVCTO | D | 8 | 0 | Dt. Vcto | Fch Vcto | Due Date | Data Vencimento Contrato | Fch Vencimiento contrato | Contract Due Date | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106819 | 0 |
| NCS | 08 | NCS_POSICA | C | 1 | 0 | Posicao | Situación | Status | Posicao contrato | Situación contrato | Contract position | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | 1=Compra;2=Venda | 1=Compra;2=Venta | 1=Purchase;2=Sale | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106820 | 0 |
| NCS | 09 | NCS_QTDE | N | 15 | 0 | Qtde. Contra | Cant. Contra | Qty. Contr | Qtde Contratos | Cant Contratos | Qty Contracts | @E 999,999,999,999,999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106821 | 0 |
| NCS | 10 | NCS_UNMED | C | 2 | 0 | Un. Medida | Un. Medida | Meas Unit | Unidade Medida Item contr | Unidad medida ítem Contr | Measur Unit Contr Item | - | Vazio().Or.ExistCpo('SAH', M->NCS_UNMED) | x x x x x x x x x x x x x x x x | - | SAH | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 122 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106822 | 0 |
| NCS | 11 | NCS_MESEMB | C | 6 | 0 | Ano/mes | Año/Mes | Year/month | Ano/Mês embarque | Año/Mes embarque | Shipment Year/Month | @R 9999/99 | OGA960VLAM() | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106823 | 0 |
| NCS | 12 | NCS_COMMOD | C | 15 | 0 | Commoditie | Commoditie | Commodity | Commoditie | Commoditie | Commodity | @! | Vazio().Or.ExistCpo('SB1', M->NCS_COMMOD) | x x x x x x x x x x x x x x x x | - | SB1 | 1 | x xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | 030 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106824 | 0 |
| NCS | 13 | NCS_DESCOM | C | 50 | 0 | Des. Prod. | Des. Prod. | Prod. Desc. | Descricao do Produto | Descripción del producto | Product Description | @! | - | x x x x x x x x x x x x x x x x | If (Inclui,' ',Posicione('SB1',1,xFilial('SB1')+NCS->NCS_COMMOD,'B1_DESC')) | - | 1 | x x xx | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione('SB1',1,xFilial('SB1')+NCS->NCS_COMMOD,'B1_DESC') | 171 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106825 | 0 |
| NCS | 14 | NCS_SAFRA | C | 15 | 0 | Safra | Cosecha | Crop | Código safra | Código cosecha | Crop Code | @! | Vazio().Or.ExistCpo('NJU', M->NCS_SAFRA) | x x x x x x x x x x x x x x x x | - | NJU | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 130 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106826 | 0 |
| NCS | 15 | NCS_VALOR | N | 15 | 4 | Valor contra | Valor Contr | Contr Value | Valor do Contrato | Valor del contrato | Contract Value | @E 9,999,999,999.9999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106827 | 0 |
| NCS | 16 | NCS_OPERAC | C | 20 | 0 | Operação | Operación | Operation | Operação | Operación | Operation | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106828 | 0 |
| NCS | 17 | NCS_CPARTE | C | 3 | 0 | Banco | Banco | Bank | Banco-Contra Parte | Banco-Contraparte | Bank-Counterpart | @! | - | x x x x x x x x x x x x x x x x | - | K6 | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106829 | 0 |
| NCS | 18 | NCS_IDM2M | C | 40 | 0 | Id M2M | Id M2M | Id M2M | Id M2M | Id M2M | Id M2M | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106830 | 0 |
| NCS | 19 | NCS_IDCTR | C | 40 | 0 | Id Contrato | Id Contrato | Contr Id | Id do Contrato | Id del contrato | Contract ID | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106831 | 0 |
| NCS | 20 | NCS_MANDAT | C | 30 | 0 | Mandato | Mandato | Term of Offi | Mandato | Mandato | Term of Office | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106832 | 0 |
| NCS | 21 | NCS_MEMO | C | 254 | 0 | Memorando | Memorando | Memorandum | Memorando | Memorando | Memorandum | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxx xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106833 | 0 |
| NCS | 22 | NCS_TPORD | C | 1 | 0 | Tipo Ordem | Tipo orden | Type of Orde | Tipo de Ordem | Tipo de orden | Order Type | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106834 | 0 |
| NCS | 23 | NCS_OK | C | 2 | 0 | OK | OK | OK | Campo Ok | Campo Ok | Field OK | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x x xx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 106835 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NCS | 1 | NCS_FILIAL+NCS_CODIGO | Código seque | Código Secue | Seq code | S | - | - | S | 2 | 3 | - | 15367 | 0 |
| NCS | 2 | NCS_FILIAL+NCS_IDM2M | Id M2M | Id M2M | Id M2M | S | - | - | S | 2 | 3 | - | 15368 | 0 |
Ela é utilizada para contratos futuros 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
NCS_FILIAL,
NCS_CODIGO,
NCS_DATAIN,
NCS_BOLSA,
NCS_TICKER,
NCS_DTINI,
NCS_DTVCTO,
NCS_POSICA,
NCS_QTDE,
NCS_UNMED,
NCS_MESEMB,
NCS_COMMOD,
NCS_DESCOM,
NCS_SAFRA,
NCS_VALOR,
NCS_OPERAC,
NCS_CPARTE,
NCS_IDM2M,
NCS_IDCTR,
NCS_MANDAT,
NCS_MEMO,
NCS_TPORD,
NCS_OK
FROM NCS
WHERE
D_E_L_E_T_ = ' '
AND NCS_FILIAL = 'VALOR'
AND NCS_CODIGO = 'VALOR'
AND NCS_DATAIN = 'VALOR'
AND NCS_BOLSA = 'VALOR'
AND NCS_TICKER = 'VALOR'
AND NCS_DTINI BETWEEN '20260501' AND '20260531'
AND NCS_DTVCTO BETWEEN '20260501' AND '20260531'
AND NCS_POSICA = 'VALOR'
AND NCS_QTDE = 0
AND NCS_UNMED = 'VALOR'
AND NCS_MESEMB = 'VALOR'
AND NCS_COMMOD = 'VALOR'
AND NCS_DESCOM = 'VALOR'
AND NCS_SAFRA = 'VALOR'
AND NCS_VALOR = 0
AND NCS_OPERAC = 'VALOR'
AND NCS_CPARTE = 'VALOR'
AND NCS_IDM2M = 'VALOR'
AND NCS_IDCTR = 'VALOR'
AND NCS_MANDAT = 'VALOR'
AND NCS_MEMO = 'VALOR'
AND NCS_TPORD = 'VALOR'
AND NCS_OK = 'VALOR'