P_PH_PRDocumentInfo

DDL: P_PH_PRDOCUMENTINFO SQL: PPHDOCINFO Type: view COMPOSITE

P_PH_PRDocumentInfo is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_AccountingDocument, P_PH_PRWithhodlingTaxSum, I_OperationalAcctgDocItem) and exposes 18 fields with key fields WorkItemUUID, PaymentReceiptUUID.

Data Sources (3)

SourceAliasJoin Type
I_AccountingDocument AccountingDocument left_outer
P_PH_PRWithhodlingTaxSum docItem from
I_OperationalAcctgDocItem GLAccountLineItem left_outer

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PPHDOCINFO view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY WorkItemUUID P_PH_PRWithhodlingTaxSum WorkItemUUID
KEY PaymentReceiptUUID P_PH_PRWithhodlingTaxSum PaymentReceiptUUID
Ledger P_PH_PRWithhodlingTaxSum Ledger
AccountingDocument P_PH_PRWithhodlingTaxSum AccountingDocument
LedgerGLLineItem P_PH_PRWithhodlingTaxSum LedgerGLLineItem
DocumentDate I_OperationalAcctgDocItem DocumentDate
AmountInTransactionCurrency I_OperationalAcctgDocItem AmountInTransactionCurrency
Currency I_OperationalAcctgDocItem TransactionCurrency
ClearingAccountingDocument I_OperationalAcctgDocItem ClearingJournalEntry
DocumentReferenceID I_AccountingDocument DocumentReferenceID
OriginalReferenceDocument I_AccountingDocument OriginalReferenceDocument
TaxCode I_OperationalAcctgDocItem TaxCode
Supplier I_OperationalAcctgDocItem Supplier
Customer I_OperationalAcctgDocItem Customer
DocumentItemText I_OperationalAcctgDocItem DocumentItemText
CompanyCode P_PH_PRWithhodlingTaxSum CompanyCode
FiscalYear P_PH_PRWithhodlingTaxSum FiscalYear
WhldgTaxAmtInTransacCrcy P_PH_PRWithhodlingTaxSum WhldgTaxAmtInTransacCrcy
@AbapCatalog.sqlViewName: 'PPHDOCINFO'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@VDM.private: true
define view P_PH_PRDocumentInfo
  as select from    P_PH_PRWithhodlingTaxSum as docItem
    left outer join I_OperationalAcctgDocItem  as GLAccountLineItem  on  docItem.AccountingDocument    = GLAccountLineItem.AccountingDocument
                                                                     and docItem.LedgerGLLineItem      = GLAccountLineItem.AccountingDocumentItem
                                                                     and GLAccountLineItem.CompanyCode = docItem.CompanyCode
                                                                     and GLAccountLineItem.FiscalYear  = docItem.FiscalYear
    left outer join I_AccountingDocument       as AccountingDocument on  AccountingDocument.CompanyCode        = GLAccountLineItem.CompanyCode
                                                                     and AccountingDocument.AccountingDocument = GLAccountLineItem.AccountingDocument
                                                                     and AccountingDocument.FiscalYear         = GLAccountLineItem.FiscalYear
{
  key docItem.WorkItemUUID,
  key docItem.PaymentReceiptUUID,
      docItem.Ledger,
      docItem.AccountingDocument,
      docItem.LedgerGLLineItem     as LedgerGLLineItem,
      GLAccountLineItem.DocumentDate,
      GLAccountLineItem.AmountInTransactionCurrency                                                                                                                                                                                                                                                                                                                                                                                                as     AmountInTransactionCurrency,
      GLAccountLineItem.TransactionCurrency                                                                                                                                                                                                                                                                                                                                                                                                              as     Currency,
      //to be fixed

      GLAccountLineItem.ClearingJournalEntry as ClearingAccountingDocument,
      AccountingDocument.DocumentReferenceID,  
      AccountingDocument.OriginalReferenceDocument,                                                                                                                                                                                                       
      GLAccountLineItem.TaxCode,
      GLAccountLineItem.Supplier,
      GLAccountLineItem.Customer,
      GLAccountLineItem.DocumentItemText,
      docItem.CompanyCode,
      docItem.FiscalYear,
      docItem.WhldgTaxAmtInTransacCrcy                                                                                                                                                                                                                                                                                                                                                                                                     as     WhldgTaxAmtInTransacCrcy
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"I_OPERATIONALACCTGDOCITEM",
"P_PH_PRWITHHODLINGTAXSUM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/