C_ResetClearing

DDL: C_RESETCLEARING SQL: CAGRC Type: view CONSUMPTION Package: ODATA_RESIDUAL_ITEMS

Reset clearings

C_ResetClearing is a Consumption CDS View that provides data about "Reset clearings" in SAP S/4HANA. It reads from 2 data sources (I_AccountingDocument, I_OperationalAcctgDocItem) and exposes 7 fields with key fields CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem. Part of development package ODATA_RESIDUAL_ITEMS.

Data Sources (2)

SourceAliasJoin Type
I_AccountingDocument Header inner
I_OperationalAcctgDocItem ReopenedItem from

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName CAGRC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Reset clearings view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
VDM.viewType #CONSUMPTION view
Metadata.ignorePropagatedAnnotations true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem
DebitCreditCode I_OperationalAcctgDocItem DebitCreditCode
CreationDate I_AccountingDocument AccountingDocumentCreationDate
CreationTime I_AccountingDocument CreationTime
@AbapCatalog.sqlViewName: 'CAGRC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Reset clearings'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED

//@ObjectModel.representativeKey: 'AccountingDocumentItem'

@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D

@VDM.viewType: #CONSUMPTION

@Metadata.ignorePropagatedAnnotations: true
define view C_ResetClearing
  as

  select from I_OperationalAcctgDocItem as ReopenedItem

    inner join I_AccountingDocument     as Header on

    // Make sure that ReopenedItem is not part of a reversal acconting document


        ReopenedItem.CompanyCode = Header.CompanyCode and

        ReopenedItem.AccountingDocument = Header.AccountingDocument and

        ReopenedItem.FiscalYear = Header.FiscalYear /* and

        (
            Header.IsReversal    is null or

            Header.IsReversal = ''

        )*/ and

    // Make sure that ReopenedItem is open


        (
            ReopenedItem.ClearingAccountingDocument is null or

            ReopenedItem.ClearingAccountingDocument = ''

        ) and

    // Make sure that the clearing of ReopenedItem has been rest


        ReopenedItem.ClearingIsReversed = 'X'

{

  key ReopenedItem.CompanyCode,

  key ReopenedItem.FiscalYear,

  key ReopenedItem.AccountingDocument,

  key ReopenedItem.AccountingDocumentItem,

      ReopenedItem.DebitCreditCode,

      Header.AccountingDocumentCreationDate                   as CreationDate,

      Header.CreationTime                                     as CreationTime


}