Pular para conteúdo

POOrderHistory

Arquivo SQL de origem - Google Cloud Cortex Data Foundation

Google Cloud Cortex Foudantion - Cortex Reporting - (s4) - POOrderHistory

Visão geral

Esta visão de relatório fornece informações detalhadas sobre documentos de compra, incluindo dados de recebimento de mercadorias e recebimento de faturas, de sistemas SAP. Ele combina dados da tabela PurchaseDocuments no conjunto de dados de destino com a tabela ekbe do conjunto de dados de origem e inclui dados adicionais das tabelas currency_decimal, calendar_date_dim e currency_conversion.

Fontes de Dados

Tabela/Visão Descrição
PurchaseDocuments Uma tabela no conjunto de dados de destino que contém informações sobre documentos de compra, incluindo números de conta do fornecedor, números de documento e números de item.
ekbe Uma tabela do sistema SAP de origem que contém dados detalhados sobre documentos de compra, incluindo tipos de eventos de transação, números de documentos de material e informações de quantidade.
currency_decimal Uma tabela no conjunto de dados de destino que contém informações decimais de moeda.
calendar_date_dim Uma tabela no sistema SAP de origem que contém informações de dimensão de data de calendário.
currency_conversion Uma tabela no conjunto de dados de destino que contém informações de conversão de moeda.

Casos de Uso

  • Esta visão pode ser usada para analisar dados de documentos de compra, incluindo dados de recebimento de mercadorias e recebimento de faturas, para fins de relatório e análise.
  • Ele pode ser usado para rastrear o status dos pedidos de compra, monitorar os níveis de estoque e analisar as tendências de compra.

Lógica da Query

A lógica da consulta une a tabela PurchaseDocuments com a tabela ekbe nos campos Client_MANDT, DocumentNumber_EBELN e Item_EBELP. Em seguida, ele une à esquerda a tabela currency_decimal no campo CurrencyKey_WAERS para obter informações decimais da moeda. Ele também une à esquerda a tabela calendar_date_dim nos campos BUDAT e BLDAT para obter informações de dimensão de data do calendário. Finalmente, ele une à esquerda a tabela currency_conversion nos campos Client_MANDT, CurrencyKey_WAERS, ChangeDate_AEDAT e TCURR para obter informações de conversão de moeda.

Possível relação com transações SAP

Código da Transação Descrição da Transação
ME21N Criar Pedido de Compra
ME22N Alterar Pedido de Compra
ME23N Exibir Pedido de Compra
MIGO Entrada de Mercadorias
MIRO Entrada de Fatura

Linhagem de dados

Em desenvolvimento

Campos da Tabela/Visão

Campo Descrição do Campo Descrição no Dicionário SAP (Em breve)
PO.VendorAccountNumber_LIFNR Vendor account number
ekbe.MANDT Client
ekbe.EBELN Purchasing document number
ekbe.EBELP Item number of purchasing document
ekbe.ZEKKN Sequential number of account assignment
ekbe.VGABE Transaction event type
ekbe.GJAHR Material document year
ekbe.BELNR Number of material document
ekbe.BUZEI Item in material document
ekbe.BEWTP Purchase order history category
ekbe.BWART Movement type (inventory management)
ekbe.BUDAT Posting date in the document
ekbe.MENGE Quantity
ekbe.BPMNG Quantity in purchase order price unit
ekbe.WAERS Currency key
ekbe.WESBS Goods receipt blocked stock in order unit
ekbe.BPWES Quantity in GR blocked stock in order price unit
ekbe.SHKZG Debit/credit indicator
ekbe.BWTAR Valuation type
ekbe.ELIKZ Delivery completed
ekbe.XBLNR Reference document number
ekbe.LFGJA Fiscal year of a reference document
ekbe.LFBNR Document number of a reference document
ekbe.LFPOS Item of a reference document
ekbe.GRUND Reason for movement
ekbe.CPUDT Day on which accounting document was entered
ekbe.CPUTM Time of entry
ekbe.EVERE Compliance with shipping instructions
ekbe.REFWR Invoice value in foreign currency
ekbe.MATNR Material number
ekbe.WERKS Plant
ekbe.XWSBR Reversal of GR allowed for GR-based IV despite invoice
ekbe.ETENS Sequential number of vendor confirmation
ekbe.KNUMV Number of the document condition
ekbe.MWSKZ Tax on sales/purchases code
ekbe.LSMNG Quantity in unit of measure from delivery note
ekbe.LSMEH Unit of measure from delivery note
ekbe.EMATN Material number
ekbe.HSWAE Local currency key
ekbe.BAMNG Quantity
ekbe.CHARG Batch number
ekbe.BLDAT Document date in document
ekbe.XWOFF Calculation of ValOpen
ekbe.XUNPL Unplanned account assignment from invoice verification
ekbe.ERNAM Name of person who created the object
ekbe.SRVPOS Service number
ekbe.PACKNO Package number of service
ekbe.INTROW Line number of service
ekbe.BEKKN Number of PO account assignment
ekbe.LEMIN Returns indicator
ekbe.AREWB Clearing value on GR/IR account in PO currency
ekbe.REWRB Invoice amount in PO currency
ekbe.SAPRL SAP release
ekbe.MENGE_POP Quantity
ekbe.BPMNG_POP Quantity in purchase order price unit
ekbe.DMBTR_POP Amount in local currency
ekbe.WRBTR_POP Amount in document currency
ekbe.WESBB Valuated goods receipt blocked stock in order unit
ekbe.BPWEB Quantity in valuated GR blocked stock in order price unit
ekbe.WEORA Acceptance at origin
ekbe.AREWR_POP GR/IR account clearing value in local currency
ekbe.KUDIF Exchange rate difference amount
ekbe.RETAMT_FC Retention amount in document currency
ekbe.RETAMT_LC Retention amount in company code currency
ekbe.RETAMTP_FC Posted retention amount in document currency
ekbe.RETAMTP_LC Posted security retention amount in company code currency
ekbe.XMACC Multiple account assignment
ekbe.WKURS Exchange rate
ekbe.INV_ITEM_ORIGIN Origin of an invoice item
ekbe.VBELN_ST Delivery
ekbe.VBELP_ST Delivery item
ekbe.SGT_SCAT Stock segment
ekbe.ET_UPD Procedure for updating the schedule line quantity
ekbe.J_SC_DIE_COMP_F Depreciation completion flag
ekbe.WRF_CHARSTC1 Characteristic value 1
ekbe.WRF_CHARSTC2 Characteristic value 2
ekbe.WRF_CHARSTC3 Characteristic value 3
CalendarDateDimension_BUDAT.CalYear Year of posting date in the document
CalendarDateDimension_BUDAT.CalMonth Month of posting date in the document
CalendarDateDimension_BUDAT.CalWeek Week of posting date in the document
CalendarDateDimension_BUDAT.CalQuarter Quarter of posting date in the document
CalendarDateDimension_BLDAT.CalYear Year of document date in document
CalendarDateDimension_BLDAT.CalMonth Month of document date in document
CalendarDateDimension_BLDAT.CalWeek Week of document date in document
CalendarDateDimension_BLDAT.CalQuarter Quarter of document date in document
currency_decimal.CURRFIX Currency decimal
ekbe.DMBTR * currency_decimal.CURRFIX Amount in local currency
ekbe.WRBTR * currency_decimal.CURRFIX Amount in document currency
ekbe.AREWR * currency_decimal.CURRFIX GR/IR account clearing value in local currency
ekbe.REEWR * currency_decimal.CURRFIX Invoice value entered in local currency
ekbe.AREWW * currency_decimal.CURRFIX Clearing value on GR/IR clearing account in transac currency

Comentários