C_CreditOpenItem

DDL: C_CREDITOPENITEM SQL: CCREDITOPENITEM Type: view CONSUMPTION Package: ODATA_ASSIGNOPENITEMS

Credit Open Items

C_CreditOpenItem is a Consumption CDS View that provides data about "Credit Open Items" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 24 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 1 association to related views. Part of development package ODATA_ASSIGNOPENITEMS.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem I_OperationalAcctgDocItem from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_PaytAdviceItemFromAssignment _PaytAdviceItemFromAssignment _PaytAdviceItemFromAssignment.FiscalYear = $projection.FiscalYear and _PaytAdviceItemFromAssignment.CompanyCode = $projection.CompanyCode and _PaytAdviceItemFromAssignment.AccountingDocument = $projection.AccountingDocument and _PaytAdviceItemFromAssignment.AccountingDocumentItem = $projection.AccountingDocumentItem and _PaytAdviceItemFromAssignment.Customer = $projection.Customer and _PaytAdviceItemFromAssignment.DocumentDate = $projection.DocumentDate and _PaytAdviceItemFromAssignment.ClearingDate = $projection.ClearingDate and _PaytAdviceItemFromAssignment.DebitCreditCode = $projection.DebitCreditCode and _PaytAdviceItemFromAssignment.PaymentAdvice like '09%'

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CCREDITOPENITEM view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Credit Open Items view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
KEY AccountingDocumentItem AccountingDocumentItem
TransactionCurrency TransactionCurrency
Customer Customer
AccountingDocumentType AccountingDocumentType
PostingKey PostingKey
DocumentDate DocumentDate
AmountInTransactionCurrency
FinancialAccountType FinancialAccountType
SpecialGLCode SpecialGLCode
SpecialGLTransactionType SpecialGLTransactionType
ClearingDate ClearingDate
ClearingAccountingDocument ClearingAccountingDocument
ClearingJournalEntry ClearingJournalEntry
AssignmentReference AssignmentReference
DocumentItemText DocumentItemText
DebitCreditCode DebitCreditCode
CustomerName _Customer CustomerName
_Customer _Customer
PaymentAdvice _PaytAdviceItemFromAssignment PaymentAdvice
Reference1IDByBusinessPartner Reference1IDByBusinessPartner
DocumentReferenceID _JournalEntry DocumentReferenceID
@AbapCatalog.sqlViewName: 'CCREDITOPENITEM'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Credit Open Items'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
define view C_CreditOpenItem
  as select from I_OperationalAcctgDocItem 
  
  association [0..1] to I_PaytAdviceItemFromAssignment as _PaytAdviceItemFromAssignment on _PaytAdviceItemFromAssignment.FiscalYear = $projection.FiscalYear
                                                                                       and _PaytAdviceItemFromAssignment.CompanyCode = $projection.CompanyCode
                                                                                       and _PaytAdviceItemFromAssignment.AccountingDocument = $projection.AccountingDocument
                                                                                       and _PaytAdviceItemFromAssignment.AccountingDocumentItem = $projection.AccountingDocumentItem
                                                                                       and _PaytAdviceItemFromAssignment.Customer = $projection.Customer
                                                                                       and _PaytAdviceItemFromAssignment.DocumentDate = $projection.DocumentDate
                                                                                       and _PaytAdviceItemFromAssignment.ClearingDate = $projection.ClearingDate
                                                                                       and _PaytAdviceItemFromAssignment.DebitCreditCode = $projection.DebitCreditCode
                                                                                       and _PaytAdviceItemFromAssignment.PaymentAdvice like '09%'
                                                                  
{
  key CompanyCode,
      @Consumption.semanticObject: 'AccountingDocument'
  key AccountingDocument,
  key FiscalYear,
  key AccountingDocumentItem,
      @Semantics.currencyCode: true
      TransactionCurrency,
      @ObjectModel.text.element: ['CustomerName']
      @Consumption.semanticObject: 'Customer'
      Customer,
      AccountingDocumentType,
      PostingKey,
      DocumentDate,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      cast(AmountInTransactionCurrency as farp_transaction_amount preserving type) as AmountInTransactionCurrency,
      FinancialAccountType,
      SpecialGLCode,
      SpecialGLTransactionType,
      ClearingDate,
      @VDM.lifecycle.status:    #DEPRECATED
      @VDM.lifecycle.successor: 'ClearingJournalEntry'    
      ClearingAccountingDocument,
      ClearingJournalEntry,
      AssignmentReference,
      DocumentItemText,
      @UI.hidden: true
      DebitCreditCode,
      @UI.hidden: true
      _Customer.CustomerName,
      _Customer,
      _PaytAdviceItemFromAssignment.PaymentAdvice,
      Reference1IDByBusinessPartner, 
      _JournalEntry.DocumentReferenceID
}

where
      FinancialAccountType                  =  'D'
  and ClearingAccountingDocument            = ''
  and AccountingDocumentCategory            <> 'D'
  and AccountingDocumentCategory            <> 'M'
  and ( (  DebitCreditCode                   =  'H' 
         and IsNegativePosting             <> 'X' )
     or  ( DebitCreditCode                   =  'S' 
         and IsNegativePosting             =  'X' ) )
  and AmountInTransactionCurrency           <=  0
  and _PaytAdviceItemFromAssignment.PaymentAdvice is null