POOrderHistory
Arquivo SQL de origem - Google Cloud Cortex Data Foundation
Google Cloud Cortex Foudantion - Cortex Reporting - (ecc) - POOrderHistory
Visão geral
Esta visão de relatórios fornece um conjunto de dados abrangente de documentos de compras SAP, combinando dados da tabela PurchaseDocuments e da tabela ekbe. Ele oferece insights sobre vários aspectos das atividades de compras, incluindo detalhes do documento, informações do item, dados contábeis e dimensões do calendário.
Fontes de Dados
Tabela/Visão | Descrição |
---|---|
PurchaseDocuments | Uma tabela contendo dados mestres para 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 ERP que armazena informações detalhadas sobre documentos de compra, como tipos de eventos de transação, dados de documento de material, informações de quantidade e valor e detalhes de atribuição de conta. |
Casos de Uso
- Analisar padrões e tendências de compras
- Monitorar o status de ordens de compra e faturas
- Reconciliar dados de ordem de compra com dados financeiros
- Identificar potenciais economias de custos e oportunidades de otimização
- Fornecer uma base para relatórios e análises sobre atividades de compras
Lógica da Query
A consulta combina dados da tabela PurchaseDocuments e da tabela ekbe usando condições de junção interna em Client_MANDT, DocumentNumber_EBELN e Item_EBELP. Ele também inclui junções esquerdas com a tabela currency_decimal para conversão de moeda e com a tabela calendar_date_dim para adicionar dimensões de calendário aos dados. A consulta filtra os resultados para incluir apenas transações de recebimento de mercadorias e recebimento de fatura (VGABE IN('1', '2')).
Possível relação com transações SAP
Código da Transação | Descrição da Transação |
---|---|
ME21N | Criar ordem de compra |
ME22N | Alterar ordem de compra |
ME23N | Exibir ordem de compra |
MIRO | Inserir fatura |
MRKO | Entrada de mercadorias para ordem de compra |
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 | |
AmountInLocalCurrency_DMBTR | Amount in local currency | |
AmountInDocumentCurrency_WRBTR | Amount in document currency | |
GrirAccountClearingValueInLocalCurrency_AREWR | GR/IR account clearing value in local currency | |
InvoiceValueEntered__inLocalCurrency___REEWR | Invoice value entered in local currency | |
ClearingValueOnGrirClearingAccount__transacCurrency___AREWW | Clearing value on GR/IR clearing account in transaction currency |