P_RU_ACCTGDOCREFERENCEID

CDS View

S/P Ledgers: Primary Document Selection

P_RU_ACCTGDOCREFERENCEID is a CDS View in S/4HANA. S/P Ledgers: Primary Document Selection. It contains 20 fields. 13 CDS views read from this table.

CDS Views using this table (13)

ViewTypeJoinVDMDescription
P_RU_GtdFromImCD1 view inner CONSUMPTION FI RU determine GTD from ImCD & Country
P_RU_ImprtSupplier1 view from CONSUMPTION S/P Ledgers: Import Supplier1
P_RU_ImprtSupplier1 view inner CONSUMPTION S/P Ledgers: Import Supplier1
P_RU_ImprtSupplier1 view union_all CONSUMPTION S/P Ledgers: Import Supplier1
P_RU_ImprtSupplier3 view inner CONSUMPTION S/P Ledgers: Import Supplier3
P_RU_ImprtSupplier4 view from CONSUMPTION S/P Ledgers: Import Supplier4
P_RU_ImprtSupplier4 view union_all CONSUMPTION S/P Ledgers: Import Supplier4
P_RU_MaterialRcptDateMM3 view from CONSUMPTION FI RU get Material Receipt Date: MM-3
P_RU_MaterialRcptDateMM4 view from CONSUMPTION FI RU get Material Receipt Date: MM-4
P_RU_RealReversedDocument view inner CONSUMPTION Reversed Document
P_RU_SuplrInvcLogsItem view inner CONSUMPTION Supplier Invoice: Accounting Document & Logistics Item
P_RU_VATInTransitBillingDoc view from CONSUMPTION S/P Ledgers: Primary Document Selection
P_RU_VATReportingRNPT1 view inner CONSUMPTION FI RU RNPT determination for VAT Reporting - 1

Fields (20)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 7
KEY CompanyCode CompanyCode 8
KEY FiscalYear FiscalYear 7
AccountingDocumentType AccountingDocumentType 1
DocumentDate DocumentDate 3
DocumentReferenceID DocumentReferenceID 4
IsReversal IsReversal 4
IsReversed IsReversed 4
OriginalReferenceDocument OriginalReferenceDocument 1
OriginalReferenceDocumentCntxt OriginalReferenceDocumentCntxt 1
OriginalReferenceDocumentNum OriginalReferenceDocumentNum 1
PostingDate PostingDate 4
ReferenceDocumentType ReferenceDocumentType 2
ReferenceIDDocumentNumber ReferenceIDDocumentNumber 2
ReferenceIDDocumentYear ReferenceIDDocumentYear 2
ReferenceIDType ReferenceIDType 2
ReverseDocument ReversalDocumentBKPF 1
ReverseDocumentFiscalYear ReversalDocumentFiscalYearBKPF 1
SenderLogicalSystem SenderLogicalSystem 1
TaxReportingDate TaxReportingDate 1
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRUACCDOCREFID'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_AcctgDocReferenceID
  as select from I_JournalEntry

{
  key CompanyCode,
  key AccountingDocument,
  key FiscalYear,
      AccountingDocumentType,
      DocumentDate,
      PostingDate,
      TaxReportingDate,
      BusinessTransactionType,
      AccountingDocumentCategory,
      LedgerGroup,
      ReverseDocument,
      ReverseDocumentFiscalYear,

      ReferenceDocumentType,                                                         //RMRP, ...

      OriginalReferenceDocument,
      substring(OriginalReferenceDocument,1,10)        as OriginalReferenceDocumentNum,
      substring(OriginalReferenceDocument,11,10)       as OriginalReferenceDocumentCntxt,

      DocumentReferenceID,
      substring(DocumentReferenceID,1,4)               as ReferenceIDType,           //GTD^, ...

      substring(DocumentReferenceID,5,10)              as ReferenceIDDocumentNumber,
      concat('20',substring(DocumentReferenceID,15,2)) as ReferenceIDDocumentYear,

      AccountingDocumentHeaderText,
      substring(AccountingDocumentHeaderText, 1, 4)    as HeaderTextType,            //RCU^, ...

      substring(AccountingDocumentHeaderText, 5, 10)   as HeaderTextDocumentNumber,
      substring(AccountingDocumentHeaderText, 15, 4)   as HeaderTextDocumentYear,

      IsReversal,
      IsReversed,
      ReversalReferenceDocument,
      ReversalReferenceDocumentCntxt,

      SenderLogicalSystem
}