I_ACCOUNTINGDOCUMENT

CDS View

Accounting Document

I_ACCOUNTINGDOCUMENT is a CDS View in S/4HANA. Accounting Document. It contains 34 fields. 95 CDS views read from this table.

CDS Views using this table (95)

ViewTypeJoinVDMDescription
C_ID_StRpVATExportCube view from CONSUMPTION Cube View for ID Exports VAT Report
C_ID_StRpVATImportCube view from CONSUMPTION Cube View for ID Imports VAT Report
C_ID_StRpVATInb view from CONSUMPTION Tax Items for ID VAT IN Statutory Report
C_ID_StRpVATOut view from CONSUMPTION ID VAT OUT Statutory Report view
C_ResetClearing view inner CONSUMPTION Reset clearings
C_RO_SAFTPurInvoiceHeader view inner CONSUMPTION Purchase invoice header for RO SAFT
C_RO_SAFTSalesInvoiceHeader view inner CONSUMPTION Sales invoice header for RO SAFT
C_RU_BPBalRecnclnItm view left_outer CONSUMPTION FI RU Business Partner Reconciliation Report Items
C_SuplrDueInvcBlkdSitn view left_outer CONSUMPTION Situation for Blocked and Due Supplier Invoices
C_SuplrInvcBlkdSitn view left_outer CONSUMPTION Situation for Blocked Supplier Invoices
CIC_DeltaOpenItem view_entity inner Proj. View on Delta Open Item
CIC_DeltaResidualOpenItem view_entity inner Proj. View on Open Item Delta
CIC_InitialOpenItem view_entity inner Proj. View on Initial Open Item
CIC_InitialResidualOpenItem view_entity inner Proj. View on Initial Residual Open Item
CIC_UpdatedOpenItem view_entity inner Proj. View on Updated Open Item
CIC_UpdatedResidualOpenItem view_entity inner Proj. View on Residual Item Update
FCLM_FI_STAGING_AREA view left_outer FI Staging Area
I_AccountingDocumentStdVH view from COMPOSITE Accounting Document
I_AR_StRpTaxItem view left_outer COMPOSITE Argentina VAT Tax Line Item Calculation
I_CrcyAdjmtItemToBeVerified view left_outer COMPOSITE Union View of Crcy Adjmt to be verified
I_GLJrnlEntryItemAmount view from COMPOSITE View to Calculate Line Item Amount
I_GLJrnlEntryItemToBeVerified view left_outer COMPOSITE Union View of LI in GL JE to be verified
I_ID_StRpVATReturnInCube view from COMPOSITE Indonesia VAT Return In - Cube
I_ID_StRpVATReturnOutCube view from COMPOSITE Indonesia VAT Return Out - Cube
I_IN_STODocument view left_outer COMPOSITE STO GR verified Documents for Invoice
I_NL_SAFTBusinessPartner view inner COMPOSITE SAF-T NL Business Partner
I_PaymentBatchPaymentDocument view_entity inner COMPOSITE Payment Batch Payment Documents
I_PH_SuplrCustJournalCube view left_outer COMPOSITE PH CAS Supplier Customer Journal Cube
I_PT_SAFTSelfBillgSuplrInvcHdr view inner COMPOSITE SAF-T PT Self-Billing SupplierInv Header
I_RO_SAFTPurchaseInvoice view from COMPOSITE RO SAFT Purchase Invoice
I_RO_SAFTSalesInvoice view from COMPOSITE RO SAFT Sales Invoice
I_RO_SAFTStkMovementHeader view from COMPOSITE Romania SAFT Stock Movement Header
I_SAFTAccountingHeader view from COMPOSITE SAF-T Accounting Header
I_TW_ZeroTaxItem view left_outer BASIC Taiwan Zero Tax Item
I_WrntyClaimAccountingDocument view from BASIC Warranty Claim Accounting Document
P_ACCOUNTING_DOC view from COMPOSITE Accounting document
P_AR_LengthOfRefDoc view from COMPOSITE
P_Arbsitmopenitm view inner COMPOSITE
P_BillingDocProcFlow11 view inner CONSUMPTION
P_BillingDocProcFlow21 view inner CONSUMPTION
P_BillingDocProcFlowC11 view inner CONSUMPTION
P_BillingDocProcFlowC21 view inner CONSUMPTION
P_CanclnBillingDocProcFlow01 view inner CONSUMPTION
P_CanclnBillingDocProcFlow11 view inner CONSUMPTION
P_CreditMemoReqProcFlow21 view inner CONSUMPTION
P_CreditMemoReqProcFlow31 view inner CONSUMPTION
P_CustRetProcFlow21 view inner CONSUMPTION
P_CustRetProcFlow31 view inner CONSUMPTION
P_CustRetProcFlow41 view inner CONSUMPTION
P_DebitMemoReqProcFlow21 view inner CONSUMPTION
P_DebitMemoReqProcFlow31 view inner CONSUMPTION
P_DEFTAX_ITEM_2 view left_outer CONSUMPTION
P_DeltaOpenItem view inner CONSUMPTION
P_DeltaResidualOpenItem view inner CONSUMPTION
P_GLOvwJrnlEntrItmToBeVerify01 view left_outer COMPOSITE
P_GLOvwJrnlEntrItmToBeVerify03 view from COMPOSITE
P_GLOvwJrnlEntrItmToBeVerify03 view union_all COMPOSITE
P_InitialOpenItem view inner CONSUMPTION
P_InitialResidualOpenItem view inner CONSUMPTION
P_JP_ARDocumentHeaderList view inner COMPOSITE
P_JP_CentralBkPaytWithItems view left_outer CONSUMPTION View for Japan Central Bank Payment Detail Items
P_JP_GRDocumentHeader view inner COMPOSITE
P_JP_IRDocumentHeader view inner COMPOSITE
P_Mpoduevenpay view inner COMPOSITE
P_PaymentRcptRelatedADocType view inner TRANSACTIONAL
P_PH_CASCashItem view inner COMPOSITE
P_PH_ClearingDocTaxInfo view left_outer COMPOSITE
P_PH_IsPaymentIndicator view inner COMPOSITE
P_PH_PaytClrdReceivablePyblItm view left_outer COMPOSITE
P_PH_PaytOpnReceivablePyblItm view inner COMPOSITE
P_PH_PRDocumentInfo view left_outer COMPOSITE
P_PL_SAFTTaxVATDeclnBasic view union CONSUMPTION
P_PT_DocItemPartner view inner CONSUMPTION View to select all partner and customer line item
P_PT_PAYORGON view left_outer COMPOSITE
P_RO_SAFTPurInvItem view inner CONSUMPTION
P_Ru_FinDocStructuralDivision2 view from CONSUMPTION
P_RU_FinStmAccountingDocument view from COMPOSITE
P_RU_VatSPLedgerImCD1 view from COMPOSITE
P_SalesContractProcessFlow31 view inner COMPOSITE Contract process flow level 3-1
P_SalesContractProcessFlow41 view inner COMPOSITE Contract process flow level 4-1
P_SalesContractProcessFlow50 view inner COMPOSITE Contract process flow level 5-0
P_SalesSchedgAgrmtProcFlow31 view inner CONSUMPTION
P_SalesSchedgAgrmtProcFlow32 view inner CONSUMPTION
P_SlsOrdProcFlow21 view inner CONSUMPTION
P_SlsOrdProcFlow31 view inner CONSUMPTION
P_SlsOrdProcFlow41 view inner CONSUMPTION
P_SlsQtanProcFlow31 view inner CONSUMPTION
P_SlsQtanProcFlow41 view inner CONSUMPTION
P_SOFAProcFlow21 view inner COMPOSITE
P_SOFAProcFlow31 view inner COMPOSITE
P_SOFAProcFlow41 view inner COMPOSITE
P_TR_StRpInputTaxItemLog view left_outer CONSUMPTION
P_TW_TaxItem view left_outer COMPOSITE
P_UpdatedOpenItem view inner CONSUMPTION
P_UpdatedResidualOpenItem view inner CONSUMPTION

Fields (34)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument,SourceAccountingDocument,SubsequentDocument 42
KEY CompanyCode CompanyCode 40
KEY DocumentReferenceID AlternativeReferenceDocument,DocumentReferenceID,ExternalDocumentID,ExternalDocumentReferenceID 10
KEY FiscalYear FiscalYear,SourceFiscalYear 43
_AccountingDocumentType _AccountingDocumentType 1
AccountingDocCreatedByUser AccountingDocCreatedByUser,CreatedByUser 7
AccountingDocumentCategory AccountingDocumentCategory 2
AccountingDocumentCreationDate AccountingDocumentCreationDate,CreationDate,OpenItemCreationDate 18
AccountingDocumentHeaderText AccountingDocumentHeaderText 21
AccountingDocumentType AccountingDocumentType 16
CompanyCodeCurrency CompanyCodeCurrency 8
CreationTime CreationTime,OpenItemCreationTime 17
Currency Currency,StatisticsCurrency,TransactionCurrency 8
DocumentDate BillingDate,DocumentDate,InvoiceDate 11
ExchangeRate ExchangeRate 3
ExchangeRateDate ExchangeRateDate 2
FiscalPeriod FiscalPeriod 9
IsReversal IsReversal 2
IsReversed IsReversed 2
LastChangeDate LastChangeDate 8
Ledger Ledger 1
LedgerGroup LedgerGroup 1
OriginalReferenceDocument OriginalReferenceDocument 6
ParkingDate ParkingDate 1
ParkingTime ParkingTime 1
PostingDate PaymentPostingDate,PostingDate 15
Reference1InDocumentHeader Reference1InDocumentHeader 4
Reference2InDocumentHeader Reference2InDocumentHeader 4
ReferenceDocumentType ReferenceDocumentType 2
ReversalReason ReversalReason 2
ReverseDocument ReverseDocument 2
ReverseDocumentFiscalYear ReverseDocumentFiscalYear 1
TaxReportingDate TaxReportingDate 4
TransactionCode TransactionCode 2
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Accounting Document'
//@Analytics: { dataCategory: #DIMENSION, dataExtraction.enabled: true }

@Analytics.dataCategory: #DIMENSION
@VDM.viewType: #BASIC
@AbapCatalog.sqlViewName: 'IFIACCDOC'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.representativeKey: 'AccountingDocument'
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@AbapCatalog.preserveKey:true
@Metadata.ignorePropagatedAnnotations: true 
@Metadata.allowExtensions:true
//--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

@AccessControl.privilegedAssociations: ['_AccountingDocumentTypeText','_BusinessTransactionTypeText','_LedgerText']
// ]--GENERATED


@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, 
                                     #CDS_MODELING_ASSOCIATION_TARGET, 
                                     #CDS_MODELING_DATA_SOURCE,
                                     #SQL_DATA_SOURCE]
                                     
@VDM.lifecycle.status: #DEPRECATED       
@VDM.lifecycle.successor: 'I_JournalEntry'                               
                                     
define view I_AccountingDocument
  as select from bkpf

  
  //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

  association [0..*] to I_AccountingDocumentTypeText      as _AccountingDocumentTypeText on   $projection.AccountingDocumentType = _AccountingDocumentTypeText.AccountingDocumentType
  association [0..*] to I_BusTransactionTypeText      as _BusinessTransactionTypeText on   $projection.BusinessTransactionType = _BusinessTransactionTypeText.BusinessTransactionType
  association [0..*] to I_LedgerText      as _LedgerText on   $projection.Ledger = _LedgerText.Ledger
  // ]--GENERATED

  association [0..*] to I_OperationalAcctgDocItem    as _OperationalAcctgDocItem    on  $projection.CompanyCode = _OperationalAcctgDocItem.CompanyCode and 
                                                                                        $projection.AccountingDocument = _OperationalAcctgDocItem.AccountingDocument and
                                                                                        $projection.FiscalYear = _OperationalAcctgDocItem.FiscalYear and
                                                                                        $projection.FiscalPeriod = _OperationalAcctgDocItem.FiscalPeriod and
                                                                                        $projection.AccountingDocumentCategory = _OperationalAcctgDocItem.AccountingDocumentCategory and
                                                                                        $projection.PostingDate = _OperationalAcctgDocItem.PostingDate and
                                                                                        $projection.DocumentDate = _OperationalAcctgDocItem.DocumentDate and
                                                                                        $projection.AccountingDocumentType = _OperationalAcctgDocItem.AccountingDocumentType
  association [1..1] to I_CompanyCode                as _CompanyCode                on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_FiscalYearForCompanyCode   as _FiscalYear                 on  $projection.FiscalYear  = _FiscalYear.FiscalYear
                                                                                    and $projection.CompanyCode = _FiscalYear.CompanyCode
  //association [0..1] to I_FiscalYear                 as _FiscalYear                 on  $projection.FiscalYear  = _FiscalYear.FiscalYear

  //                                                                                  and $projection.fiscalyearvariant = _FiscalYear.FiscalYearVariant 

                                                                                      // FiscalYearVariant not in BKPF, would require join with I_CompanyCode to get FiscalYearVariant                                                                                   

  association [0..1] to I_AccountingDocumentType     as _AccountingDocumentType     on  $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
  association [0..1] to I_User                       as _User                       on  $projection.AccountingDocCreatedByUser = _User.UserID
  association [0..1] to I_AccountingDocumentCategory as _AccountingDocumentCategory on  $projection.AccountingDocumentCategory = _AccountingDocumentCategory.AccountingDocumentCategory
  association [0..1] to I_BusinessTransactionType    as _BusinessTransactionType    on  $projection.BusinessTransactionType = _BusinessTransactionType.BusinessTransactionType
  association [0..1] to I_ReferenceDocumentType      as _ReferenceDocumentType      on  $projection.ReferenceDocumentType = _ReferenceDocumentType.ReferenceDocumentType
  association [0..1] to I_Ledger                     as _Ledger                     on  $projection.Ledger = _Ledger.Ledger
  association [0..1] to I_LedgerGroup                as _LedgerGroup                on  $projection.LedgerGroup = _LedgerGroup.LedgerGroup
  association [0..1] to I_Currency                   as _Currency                   on  $projection.Currency = _Currency.Currency
  association [0..1] to I_Currency                   as _CompanyCodeCurrency        on  $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
  association [0..1] to I_Currency                   as _AdditionalCurrency1        on  $projection.AdditionalCurrency1 = _AdditionalCurrency1.Currency
  association [0..1] to I_Currency                   as _AdditionalCurrency2        on  $projection.AdditionalCurrency2 = _AdditionalCurrency2.Currency
  association [0..1] to I_LogicalSystem              as _LogicalSystem              on  $projection.ReferenceDocumentLogicalSystem = _LogicalSystem.LogicalSystem

{
      //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_CompanyCodeStdVH',
                     element: 'CompanyCode' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_CompanyCode'
  key cast(bukrs as fis_bukrs preserving type)                                   as CompanyCode, // FieldGroup: _BASIC

      @ObjectModel.foreignKey.association: '_FiscalYear'
//      @Semantics.fiscal.year: true

  key cast(gjahr as fis_gjahr preserving type)                                   as FiscalYear, // FieldGroup: AccountingGroup

  key cast(belnr as farp_belnr_d preserving type)                                as AccountingDocument, // FieldGroup: AccountingGroup


      //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_AccountingDocumentTypeStdVH',
                     element: 'AccountingDocumentType' }
        }]
      @ObjectModel.text.association: '_AccountingDocumentTypeText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
      cast(blart as farp_blart preserving type)                                  as AccountingDocumentType, // FieldGroup: AccountingGroup

      cast(bldat as fis_bldat preserving type)                                   as DocumentDate, // FieldGroup: DocumentGroup

      cast(budat as fis_budat preserving type)                                   as PostingDate, // FieldGroup: BASIC                                    //  New DTEL  toDo

      @Semantics.fiscal.period: true
      cast( cast( concat( '0', monat ) as abap.numc( 3 ) ) as fins_fiscalperiod) as FiscalPeriod,
      --    monat as FiscalPeriod, // FieldGroup: AccountingGroup

      cast(cpudt as farp_cpudt preserving type)                                  as AccountingDocumentCreationDate, // FieldGroup: AccountingGroup

      cast(cputm as ttet_dt_cr_time preserving type)                             as CreationTime,
      cast(aedat as ttet_dt_chg_date preserving type)                            as LastChangeDate,
      cast(wwert as vdm_v_exchange_rate_date preserving type)                    as ExchangeRateDate,
      //    @ObjectModel.foreignKey.association: '_User'

      cast(usnam as fis_usnam preserving type)                                   as AccountingDocCreatedByUser,
      tcode                                                                      as TransactionCode,
      cast(bvorg as fac_bvorg preserving type)                                                   as IntercompanyTransaction,
      xblnr                                                                      as DocumentReferenceID, //FieldGroup: DocumentGroup

      cast(dbblg as fac_rjet_id preserving type)                                                 as RecurringAccountingDocument,
      stblg                                                                      as ReverseDocument,
      stjah                                                                      as ReverseDocumentFiscalYear,
      bktxt                                                                      as AccountingDocumentHeaderText,
      cast(kursf as ukurs_curr preserving type)                                                  as ExchangeRate,
      kzwrs                                                                      as GroupCurrency,
      @ObjectModel.foreignKey.association: '_AccountingDocumentCategory'
      cast(bstat as farp_bstat_d preserving type)                                as AccountingDocumentCategory, //FieldGroup: AccountingGroup

      //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_BusTransTypeStdVH',
                     element: 'BusinessTransactionType' }
        }]
      @ObjectModel.text.association: '_BusinessTransactionTypeText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_BusinessTransactionType'
      cast(glvor as fins_bttype preserving type)                                 as BusinessTransactionType,
      cast(grpid as fac_grpid preserving type)                                   as BatchInputSession,
      @ObjectModel.foreignKey.association: '_ReferenceDocumentType'
      cast(awtyp as fis_awtyp)                                                   as ReferenceDocumentType,
      cast(awkey as fac_awkey)                                                   as OriginalReferenceDocument,
      fikrs                                                                      as FinancialManagementArea,
      cast(awsys as fis_awsys)                                                   as ReferenceDocumentLogicalSystem, //?????????????I_LogicalSystem missing

      brnch                                                                      as Branch,
//      @Semantics.booleanIndicator 

      adisc                                                                      as IsDiscountDocument,
      cast(xref1_hd as fins_xref1_hd)                                            as Reference1InDocumentHeader,
      cast(xref2_hd as fins_xref2_hd)                                            as Reference2InDocumentHeader,
      reindat                                                                    as InvoiceReceiptDate,
      //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_LedgerStdVH',
                     element: 'Ledger' }
        }]
      @ObjectModel.text.association: '_LedgerText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_Ledger'
      cast(rldnr as fis_rldnr preserving type)                                   as Ledger,
      @ObjectModel.foreignKey.association: '_LedgerGroup'
      ldgrp                                                                      as LedgerGroup,
//    cast(xblnr_alt as fis_xblnr_alt_wo_exit preserving type)                   as AlternativeReferenceDocument,

      cast(xblnr_alt as fac_xblnr_alt preserving type)                           as AlternativeReferenceDocument,
      cast(xreversing as fins_xreversing)                                        as IsReversal,
      cast(xreversed as fins_xreversed)                                          as IsReversed,
      vatdate                                                                    as TaxReportingDate,
      stgrd                                                                      as ReversalReason,
      ppdat                                                                      as ParkingDate,
      pptme                                                                      as ParkingTime,

      @ObjectModel.foreignKey.association: '_Currency'
      @Semantics.currencyCode:true
      cast(waers as waers preserving type)                                       as Currency,
      @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
      @Semantics.currencyCode:true
      cast(hwaer as fis_hwaer preserving type)                                   as CompanyCodeCurrency, //FieldGroup: AccountingGroup

      @ObjectModel.foreignKey.association: '_AdditionalCurrency1'
      @Semantics.currencyCode:true
      cast(hwae2 as fis_hwae2 preserving type)                                   as AdditionalCurrency1, //FieldGroup: AccountingGroup                    //  New DTEL  toDo

      @ObjectModel.foreignKey.association: '_AdditionalCurrency2'
      @Semantics.currencyCode:true
      cast(hwae3 as fis_hwae3 preserving type)                                   as AdditionalCurrency2, //FieldGroup: AccountingGroup                    //  New Dtel  toDo

      
      
      xmwst as TaxIsCalculatedAutomatically,
      numpg as NmbrOfPages,

      _OperationalAcctgDocItem,
      _CompanyCode,
      _FiscalYear,
      _AccountingDocumentType,
      _AccountingDocumentCategory,
      _BusinessTransactionType,
      _ReferenceDocumentType,
      _Ledger,
      _LedgerGroup,
      _User,
      _Currency,
      _CompanyCodeCurrency,
      _AdditionalCurrency1,
      _AdditionalCurrency2,
      _LogicalSystem,
      //--[ GENERATED:012:29JlHNUf7jY4ioM8lnJMdG

      @Consumption.hidden: true
      _AccountingDocumentTypeText,
      @Consumption.hidden: true
      _BusinessTransactionTypeText,
      @Consumption.hidden: true
      _LedgerText
      // ]--GENERATED


}                          
  
 

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"BKPF"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTCATEGORY",
"I_ACCOUNTINGDOCUMENTTYPE",
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_BUSINESSTRANSACTIONTYPE",
"I_BUSTRANSACTIONTYPETEXT",
"I_COMPANYCODE",
"I_CURRENCY",
"I_FISCALYEARFORCOMPANYCODE",
"I_LEDGER",
"I_LEDGERGROUP",
"I_LEDGERTEXT",
"I_LOGICALSYSTEM",
"I_OPERATIONALACCTGDOCITEM",
"I_REFERENCEDOCUMENTTYPE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/