P_HR_CustomerItemPartPmnt

DDL: P_HR_CUSTOMERITEMPARTPMNT Type: view_entity COMPOSITE

P_HR_CustomerItemPartPmnt is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 9 fields with key fields StatryRptCategory, StatryRptgEntity, StatryRptRunID, CompanyCode, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem PartialPayment from

Annotations (8)

NameValueLevelField
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY StatryRptCategory Log StatryRptCategory
KEY StatryRptgEntity Log StatryRptgEntity
KEY StatryRptRunID Log StatryRptRunID
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY AccountingDocument I_OperationalAcctgDocItem InvoiceReference
KEY FiscalYear I_OperationalAcctgDocItem InvoiceReferenceFiscalYear
KEY AccountingDocumentItem I_OperationalAcctgDocItem InvoiceItemReference
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
PartialPaymentAmountInCCCrcy
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XXL,
  dataClass: #MIXED
}

define view entity P_HR_CustomerItemPartPmnt as select from I_OperationalAcctgDocItem as PartialPayment

  inner many to one join I_StRpJournalEntryHeaderLog as Log
   on Log.CompanyCode        = PartialPayment.CompanyCode
  and Log.AccountingDocument = PartialPayment.AccountingDocument
  and Log.FiscalYear         = PartialPayment.FiscalYear

{
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key PartialPayment.CompanyCode,
  key PartialPayment.InvoiceReference as AccountingDocument,
  key PartialPayment.InvoiceReferenceFiscalYear as FiscalYear,
  key PartialPayment.InvoiceItemReference as AccountingDocumentItem,
  PartialPayment.CompanyCodeCurrency,
  /*
    Negative amount => partial payment; Positive amount => residual item
  */
  @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
  sum(PartialPayment.AmountInCompanyCodeCurrency) as PartialPaymentAmountInCCCrcy

}

where
  PartialPayment.FinancialAccountType ='D'
  and PartialPayment.AccountingDocumentCategory <> 'D'
  and PartialPayment.AccountingDocumentCategory <> 'M'
  and PartialPayment.InvoiceReference is not initial

group by
  Log.StatryRptCategory,
  Log.StatryRptgEntity,
  Log.StatryRptRunID,
  PartialPayment.CompanyCode,
  PartialPayment.InvoiceReference,
  PartialPayment.InvoiceReferenceFiscalYear,
  PartialPayment.InvoiceItemReference,
  PartialPayment.CompanyCodeCurrency
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONALACCTGDOCITEM",
"I_STRPJOURNALENTRYHEADERLOG"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/