Histórico Open To Buy
A tabela AYF faz parte do sistema ERP Protheus da TOTVS e é utilizada para histórico open to buy.
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 AYF 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 AYF, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | AYF |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | AYF990 |
| X2_NOME | Histórico Open To Buy |
| X2_NOMESPA | Historial Open To Buy |
| X2_NOMEENG | History Open to buy |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | AYF_FILIAL+AYF_ANO+AYF_SEMANA+AYF_CAT1+AYF_CAT2+AYF_CAT3+AYF_CAT4+AYF_CAT5 |
| X2_PYME | N |
| X2_MODULO | 0 |
| X2_DISPLAY | - |
| X2_SYSOBJ | - |
| X2_USROBJ | - |
| X2_POSLGT | 2 |
| 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_ | 538 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AYF | 01 | AYF_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 | x | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7219 | 0 |
| AYF | 02 | AYF_CAT1 | C | 10 | 0 | Categoria 1 | Categoría 1 | Category 1 | Categoria 1 | Categoría 1 | Category 1 | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7220 | 0 |
| AYF | 03 | AYF_CAT2 | C | 10 | 0 | Categoria 2 | Categoría 2 | Category 2 | Categoria 2 | Categoría 2 | Category 2 | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7221 | 0 |
| AYF | 04 | AYF_CAT3 | C | 10 | 0 | Categoria 3 | Categoría 3 | Category 3 | Categoria 3 | Categoría 3 | Category 3 | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7222 | 0 |
| AYF | 05 | AYF_CAT4 | C | 10 | 0 | Categoria 4 | Categoría 4 | Category 4 | Categoria 4 | Categoría 4 | Category 4 | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7223 | 0 |
| AYF | 06 | AYF_CAT5 | C | 10 | 0 | Categoria 5 | Categoría 5 | Category 5 | Categoria 5 | Categoría 5 | Category 5 | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7224 | 0 |
| AYF | 07 | AYF_ANO | C | 4 | 0 | Ano | Año | Year | Ano do Periodo | Año del período | Period Year | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7225 | 0 |
| AYF | 08 | AYF_SEMANA | C | 2 | 0 | Nº Semana | Nº Semana | No. Week | Nº Semana no Periodo | Nº Semana en el período | No. Week in Period | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7226 | 0 |
| AYF | 09 | AYF_QTDE | N | 13 | 2 | Vendas Qtde | Ventas Cant. | Sales Qty | Vendas em Quantidade | Ventas en cantidad | Sales in Quantity | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7227 | 0 |
| AYF | 10 | AYF_VALOR | N | 13 | 2 | Vendas Valor | Ventas valor | Value Sales | Vendas em Valor | Ventas en valor | Sales in Value | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7228 | 0 |
| AYF | 11 | AYF_CUSTO | N | 13 | 2 | Vendas Custo | Ventas costo | Sales in Cos | Vendas em Custo | Ventas en costo | Sales in Cost | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7229 | 0 |
| AYF | 12 | AYF_ESTQTD | N | 13 | 2 | Qtde Estoque | Cant. Stock | Qty Stock | Quantidade em Estoque | Cantidad en stock | Quantity in Stock | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7230 | 0 |
| AYF | 13 | AYF_ESTVLR | N | 13 | 2 | Vlr Estoque | Val. Stock | Stock Vl | Valor em Estoque | Valor en stock | Value in Stock | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7231 | 0 |
| AYF | 14 | AYF_ESTCST | N | 13 | 2 | CustoEstoque | Costo stock | Cost Stock | Custo em Estoque | Costo en stock | Cost in Stock | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7232 | 0 |
| AYF | 15 | AYF_VLRACM | N | 13 | 2 | Vlr.Acum.Ven | Val.Acum.Ven | Vl Accr Sale | Valor Acumulado em Vendas | Valor acumulado ventas | Value Accrued in Sales | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7233 | 0 |
| AYF | 16 | AYF_CSTACM | N | 13 | 2 | Cst.Acum.Ven | Cos.Acum.Ven | Accr Cost Sa | Custo Acumulado em Vendas | Costo acumulado en venta | Accrued Cost in Sales | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7234 | 0 |
| AYF | 17 | AYF_QTDACM | N | 13 | 2 | Qtd.Acum.Ven | Cnt.Acu.Ven | Qty Accr Sal | Qtd. Acumulado em Vendas. | Cant. Acumulado ventas | Qty Accrued in Sales | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7235 | 0 |
| AYF | 18 | AYF_ESTACM | N | 13 | 2 | Est.Acum.Qtd | Stoc.Acu.Can | St Accr Qty | Estoque Acumulando Qtd. | Stock acumulando Cant. | Stock Accruing Qty | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7236 | 0 |
| AYF | 19 | AYF_EVLACM | N | 13 | 2 | Evl.Acum.Qtd | Eval.Acu. Ca | Pr Accr Qty | Evolucao Acumulando Qtd. | Evoluc. Acumul. Cant. | Progress Accruing Qty | @E 9,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | - | N | - | - | - | 2 | 2 | - | - | - | 7237 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AYF | 1 | AYF_FILIAL+AYF_CAT1+AYF_CAT2+AYF_CAT3+AYF_CAT4+AYF_CAT5+AYF_ANO+AYF_SEMANA | Categoria 1 + Categoria 2 + Categoria 3 + Categoria 4 + Categoria 5 + | Categoría 1 + Categoría 2 + Categoría 3 + Categoría 4 + Categoría 5 + | Category 1 + Category 2 + Category 3 + Category 4 + Category 5 + Year | S | - | - | S | 2 | 3 | - | 1295 | 0 |
| AYF | 2 | AYF_FILIAL+AYF_ANO+AYF_SEMANA | Ano + Nº Semana | Año + Nº Semana | Year + No. Week | S | - | - | S | 2 | 3 | - | 1296 | 0 |
| AYF | 3 | AYF_FILIAL+AYF_ANO+AYF_SEMANA+AYF_CAT1+AYF_CAT2+AYF_CAT3+AYF_CAT4+AYF_CAT5 | Ano + Nº Semana + Categoria 1 + Categoria 2 + Categoria 3 + Categoria | Año + Nº Semana + Categoría 1 + Categoría 2 + Categoría 3 + Categoría | Year + No. Week + Category 1 + Category 2 + Category 3 + Category 4 + | S | - | - | S | 2 | 3 | - | 1297 | 0 |
Ela é utilizada para histórico open to buy 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
AYF_FILIAL,
AYF_CAT1,
AYF_CAT2,
AYF_CAT3,
AYF_CAT4,
AYF_CAT5,
AYF_ANO,
AYF_SEMANA,
AYF_QTDE,
AYF_VALOR,
AYF_CUSTO,
AYF_ESTQTD,
AYF_ESTVLR,
AYF_ESTCST,
AYF_VLRACM,
AYF_CSTACM,
AYF_QTDACM,
AYF_ESTACM,
AYF_EVLACM
FROM AYF
WHERE
D_E_L_E_T_ = ' '
AND AYF_FILIAL = 'VALOR'
AND AYF_CAT1 = 'VALOR'
AND AYF_CAT2 = 'VALOR'
AND AYF_CAT3 = 'VALOR'
AND AYF_CAT4 = 'VALOR'
AND AYF_CAT5 = 'VALOR'
AND AYF_ANO = 'VALOR'
AND AYF_SEMANA = 'VALOR'
AND AYF_QTDE = 0
AND AYF_VALOR = 0
AND AYF_CUSTO = 0
AND AYF_ESTQTD = 0
AND AYF_ESTVLR = 0
AND AYF_ESTCST = 0
AND AYF_VLRACM = 0
AND AYF_CSTACM = 0
AND AYF_QTDACM = 0
AND AYF_ESTACM = 0
AND AYF_EVLACM = 0