Dicionário Protheus
Início
O Poder da Hiperautomação

Tabela CPY no Protheus

Produtos Licitados

O que é a tabela CPY no Protheus?

A tabela CPY faz parte do sistema ERP Protheus da TOTVS e é utilizada para produtos licitados.

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 CPY 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 CPY, incluindo todos os campos e índices relacionados.

Propriedades da Tabela

Propriedade Valor
X2_CHAVE CPY
X2_PATH \DATA\
X2_ARQUIVO CPY990
X2_NOME Produtos Licitados
X2_NOMESPA Productos licitados
X2_NOMEENG Bidded Products
X2_ROTINA -
X2_MODO E
X2_MODOUN E
X2_MODOEMP E
X2_DELET 0
X2_TTS -
X2_UNICO CPY_FILIAL+CPY_NUMATA+CPY_CODPRO+CPY_LOTE
X2_PYME S
X2_MODULO 87
X2_DISPLAY CPY_FILIAL+CPY_NUMATA+CPY_CODPRO
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_ 2595
R_E_C_D_E_L_ 0

Campos da Tabela CPY (23 campos)

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_
CPY 01 CPY_FILIAL C 2 0 Filial Sucur Branch Filial do Sistema Sucur sistema System Branch - - x x x x x x x x x x x x x x x - - 1 - - - - - - - - - - - - - - - 033 - S - - N - N - - - 1 2 - - - 40417 0
CPY 02 CPY_NUMATA C 15 0 Num. da Ata Num. de Ata Minute No. Número da Ata Numero acta Minute Number @! - x x x x x x x x x x x x x x x x - - 1 xx - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40418 0
CPY 03 CPY_ITEM C 6 0 Item Item Item Item Item Item @! - x x x x x x x x x x x x x x x x - - 1 xx - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40419 0
CPY 04 CPY_CODPRO C 15 0 Cód. Produto Cd. Producto Product Code Código do Produto Código producto Product Code @! ExistCpo("SB1") x x x x x x x x x x x x x x x x - SB1 1 xxx - S - - - - - - - - - - - - 030 - S - - N - N - - - 1 1 - - - 40420 0
CPY 05 CPY_DESCR C 50 0 Descr.Produt Des.Producto Product Desc Descrição do Produto Descripcion producto Product Description @! - x x x x x x x x x x x x x x x x - - 1 xx - - - - V R - - - - - - - - 171 - S - - N - N - - - 1 2 - - - 40421 0
CPY 06 CPY_REMAN L 1 0 Remanescente Restante Remaining Remanescente Restante Remaining - - x x x x x x x x x x x x x x x x - - 1 xx - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40422 0
CPY 07 CPY_QUANT N 12 2 Quantidade Cantidad Quantity Quantidade Cantidad Quantity @E 999999999.99 Positivo() .And. A300VQt() .And. A300VldQtd() x x x x x x x x x x x x x x x x - - 1 xxxxx - S - - - - - - - - - - - - - - S - - N - N - - - 1 1 - - - 40423 0
CPY 08 CPY_UM C 2 0 UM UM MU Unidade de Medida Unidad de medida Measurement Unit - - x x x x x x x x x x x x x x x x - - 1 xxxx x - - - - - - - - - - - - - - 122 - S - - N - N - - - 1 2 - - - 40424 0
CPY 09 CPY_UM2 C 2 0 UM2 UM2 MU2 Segunda Unidade de Medida Segunda unidad de medida Second Measurement Unit - - x x x x x x x x x x x x x x x x - - 1 xxxx x - - - - - - - - - - - - - - 122 - S - - N - N - - - 1 2 - - - 40425 0
CPY 10 CPY_QUANT2 N 12 2 Quant UM2 Cant UM2 Quantity MU2 Quantidade Segunda UM Cantidae segunda UM Quantity Second MU @E 999999999.99 - x x x x x x x x x x x x x x x x - - 1 xxxx x - - - - V - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40426 0
CPY 11 CPY_SALDO N 12 2 Saldo Quant. Saldo Cant. Qty Balance Saldo de Quantidade Saldo de cantidad Quantity of Balance @E 999999999.99 - x x x x x x x x x x x x x x x x - - 1 xxxx - - - - V - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40427 0
CPY 12 CPY_OBS C 10 0 Observação Observac Note Observação Observacion Note - - x x x x x x x x x x x x x x x - - 1 x xx - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40428 0
CPY 13 CPY_STATUS C 1 0 Situação Situación Status Status do Item Estatus de Item Item Status - - x x x x x x x x x x x x x x x x "1" - 1 x xx - - - - V R - - 1=Habilitado;2=Revogado;3=Anulado;4=Remanescente;5=Cancelado 1=Habilitado;2=Revocado;3=Anulado;4=Remanente;5=Cancelado 1=Enabled;2=Revoked;3=Annulled;4=Remaining;5=Canceled - - - - - S - - N - N - - - 1 2 - - - 40429 0
CPY 14 CPY_CODNE C 12 0 Cod. NE Cod. FR Code NE Cod. da Nota de Empenho Cod. Factura de Reserva Allocation Invoice Code @! - x x x x x x x x x x x x x x x x - - 1 xx - - - - A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 40430 0
CPY 15 CPY_ITEMNE C 3 0 Item NE Item FR Item NE Item da Nota de Empenho Item de Fact de reserva Allocation Invoice Item @! - x x x x x x x x x x x x x x x x - - 1 xx - - - - A R - - - - - - - - - - S - - N - N - - - 1 2 - - - 40431 0
CPY 16 CPY_QTDLIC N 12 2 Qtd Licitada Cant Licitad Bid Quant Quantidade Licitada Cantidad licitada Bid Quantity @E 999,999,999.99 - x x x x x x x x x x x x x x x x - - 1 xxxx - - - - V - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40432 0
CPY 17 CPY_VLUNIT N 12 2 Vl. Original Vl. Original Original Vl Valor Unitário Original Valor unitario original Original Unitary Value @E 999,999,999.99 Positivo() x x x x x x x x x x x x x x x x - - 1 xxxxx - S - S A R - - - - - - - - - - S - - N - N - - - 1 1 - - - 40433 0
CPY 18 CPY_VLTOT N 12 2 Vl. Total Vl. Total Total Value Valor Total Valor total Total Value @E 999,999,999.99 Positivo() .And. GCP300Tot(xOldValue) x x x x x x x x x x x x x x x x - - 1 xxxxx - - - S V R - - - - - - - - - - S - - N - N - - - 1 1 - - - 40434 0
CPY 19 CPY_PERCRJ N 6 2 % Reajuste % Reajuste %Adjustment Percentual de Reajuste Porcentaje de reajuste Adjustment Percentage @E 999.99 - x x x x x x x x x x x x x x x x 0 - 1 xx - S - N A V - - - - - - - - - - S - - N - N - - - 1 2 - - - 40435 0
CPY 20 CPY_VALATU N 14 2 Valor Atual Valor actual Current Valu Valor Unitário Atual Valor unitario actual Current Unitary Value @E 99,999,999,999.99 Positivo() x x x x x x x x x x x x x x x x - - 1 xxxxx - S - S V R - - - - - - - - - - S - - N - N - - - 1 1 - - - 40436 0
CPY 21 CPY_VALRRJ N 12 2 Vl. Reajusta Vl. Reajusta Adjust Vl Valor Reajustado Valor reajustado Adjusted Value @E 999,999,999.99 Positivo() x x x x x x x x x x x x x x x x - - 1 xxxx - - - S A V - - - - - - - - - - S - - N - N - - - 1 2 - - - 40437 0
CPY 22 CPY_OBSERV M 10 0 Observação Observación Note Observação Observación Note - - x x x x x x x x x x x x x x x x - - 1 xx - - - - - - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40438 0
CPY 23 CPY_LOTE C 8 0 Lote Lote Batch Código do Lote Código del lote Batch Code @! - x x x x x x x x x x x x x x x x - - 1 x xx - - - - V - - - - - - - - - - - S - - N - N - - - 1 2 - - - 40439 0

Índices da Tabela CPY (2 índices)

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_
CPY 1 CPY_FILIAL+CPY_NUMATA+CPY_CODPRO Num. da Ata + Cód. Produto Num. de Ata + Cd. Producto Minute No. + Product Code S - CPY1 S 2 3 - 6219 0
CPY 2 CPY_FILIAL+CPY_NUMATA+CPY_LOTE+CPY_CODPRO Num. da Ata + Lote + Cód. Produto Num. de Ata + Lote + Cd. Producto Minute No. + Batch + Product Code S - - S 2 3 - 6220 0

Perguntas frequentes

Para que serve a tabela CPY no Protheus?

Ela é utilizada para produtos licitados dentro do sistema ERP Protheus.

Como consultar os campos da tabela CPY?

Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.

O que são os índices da tabela CPY?

Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.

Exemplo de consulta SQL da tabela CPY

Modelo de query gerado automaticamente com base na estrutura da tabela.

SELECT
    CPY_FILIAL,
    CPY_NUMATA,
    CPY_ITEM,
    CPY_CODPRO,
    CPY_DESCR,
    CPY_REMAN,
    CPY_QUANT,
    CPY_UM,
    CPY_UM2,
    CPY_QUANT2,
    CPY_SALDO,
    CPY_OBS,
    CPY_STATUS,
    CPY_CODNE,
    CPY_ITEMNE,
    CPY_QTDLIC,
    CPY_VLUNIT,
    CPY_VLTOT,
    CPY_PERCRJ,
    CPY_VALATU,
    CPY_VALRRJ,
    CPY_OBSERV,
    CPY_LOTE
FROM CPY
WHERE
    D_E_L_E_T_ = ' '
    AND CPY_FILIAL = 'VALOR'
    AND CPY_NUMATA = 'VALOR'
    AND CPY_ITEM = 'VALOR'
    AND CPY_CODPRO = 'VALOR'
    AND CPY_DESCR = 'VALOR'
    AND CPY_QUANT = 0
    AND CPY_UM = 'VALOR'
    AND CPY_UM2 = 'VALOR'
    AND CPY_QUANT2 = 0
    AND CPY_SALDO = 0
    AND CPY_OBS = 'VALOR'
    AND CPY_STATUS = 'VALOR'
    AND CPY_CODNE = 'VALOR'
    AND CPY_ITEMNE = 'VALOR'
    AND CPY_QTDLIC = 0
    AND CPY_VLUNIT = 0
    AND CPY_VLTOT = 0
    AND CPY_PERCRJ = 0
    AND CPY_VALATU = 0
    AND CPY_VALRRJ = 0
    AND CPY_LOTE = 'VALOR'