P_AnalyzeAccrualPosting

DDL: P_ANALYZEACCRUALPOSTING Type: view_entity BASIC

P_AnalyzeAccrualPosting is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (acdoca, finsc_ledger_rep) and exposes 90 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
acdoca acdoca from
finsc_ledger_rep finsc_ledger_rep inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] P_AccrSpcfcConfignSlalittype _AccrSpcfcConfignSlalittype $projection.SubLedgerAcctLineItemType = _AccrSpcfcConfignSlalittype.SubLedgerAcctLineItemType
[0..1] I_FinancialTransactionType _FinancialTransactionType $projection.FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #BASIC view
VDM.private true view

Fields (90)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger
KEY CompanyCode
KEY FiscalYear
KEY AccountingDocument
KEY LedgerGLLineItem
KEY Ledger
AccountingDocumentType
AccountingDocCreatedByUser
AmountInCompanyCodeCurrency
AmountInTransactionCurrency
BusinessTransactionType acdoca bttype Business Transaction Type
CompanyCodeCurrency
AmountInGlobalCurrency acdoca ksl GrpCurr
GlobalCurrency acdoca rkcur Ledger curr.
AmountInFreeDefinedCurrency1 acdoca osl Other Crcy Amnt
FreeDefinedCurrency1 acdoca rocur Free Defined Crcy 1
TransactionCurrency
SenderCompanyCode acdoca bukrs_sender Sender CoCode
FiscalPeriod
DocumentDate
AccountingDocumentCategory
ReferenceDocumentType
ReferenceDocument acdoca awref Reference Doc.
IsReversal acdoca xreversing Reversal doc.
IsReversed acdoca xreversed Reversed
ReversalReferenceDocument acdoca awref_rev Reversal Ref.
OriginSenderObject
AccrualObjectType acdoca acrobjtype Accrual Object Type
AccrualObjectLogicalSystem acdoca acrlogsys Logical Syst. AcrObj
AccrualObject
AccrualSubobject
AccrualItemType acdoca acritmtype Accrual Item Type
GLAccount
CostCenter
ProfitCenter
PostingKey
SubLedgerAcctLineItemType acdoca slalittype SLALineItemType
ReferenceDocumentItemGroup acdoca awitgrp Ref. Item Group
FiscalYearPeriod
FiscalYearVariant acdoca periv FYear Variant
FunctionalArea acdoca rfarea R FuncArea
LastChangeDateTime
CreationDateTime
CreationDate
AlternativeGLAccount acdoca lokkt Local Acct No.
CountryChartOfAccounts acdoca ktop2 Alternative COA
PurchasingDocument
PurchasingDocumentItem acdoca ebelp Item pur. doc.
Product
Plant acdoca werks Receiving Plant
TaxCode acdoca mwskz Tax Code
IsOpenItemManaged acdoca xopvw OI Management
ClearingDate acdoca augdt Clearing
ClearingAccountingDocument acdoca augbl Clrng doc.
ClearingDocFiscalYear acdoca auggj Clrg Fiscal Yr
AccountAssignmentNumber acdoca zekkn Account Assgmt No.
DocumentItemText acdoca sgtxt Text
AccountAssignment acdoca accas Account Assignment
AccountAssignmentType acdoca accasty Object Type
SalesOrder acdoca kdauf SD Document
SalesOrderItem acdoca kdpos Sales Ord. Item
CostOriginGroup acdoca hkgrp Origin Group
OrderID acdoca aufnr SettlementOrder
OrderCategory acdoca autyp Order category
Project
ProjectInternalID
WorkPackage
ProjectNetwork acdoca nplnr Network
RelatedNetworkActivity acdoca nplnr_vorgn Netwk activity
ServiceDocument acdoca service_doc_id Transaction ID
ServiceDocumentType acdoca service_doc_type Transaction Type
BusinessProcess acdoca prznr Sender BProc
CostObject acdoca kstrg Cost Objects
AccrualValueDate acdoca acrvaldat Accrual Value Date
ControllingArea acdoca kokrs Org. Value
AssignmentReference
FinancialAccountType
BusinessArea
Segment acdoca segment Segment number
Supplier
Customer
GLAccountType acdoca glaccount_type G/L Account Type
OffsettingAccount
ChartOfAccounts acdoca ktopl G/L Chart of Accounts
JrnlEntrShiftedFYConsecutiveID acdoca docnr_ld Ledger spec. DocNo
FinancialAccrualTransacType
FinancialTransactionType acdoca rmvct Transact. Type
FinancialTransactionTypeName
FinancialAccrTransacTypeName _AccrSpcfcConfignSlalittype FinancialAccrTransacTypeName
GLAccountLineItemIsAccrual

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_AnalyzeAccrualPosting.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW P_AnalyzeAccrualPosting AS
SELECT
  cast(acdoca.rldnr as fins_ledger_pers preserving type) AS SourceLedger,
  cast(acdoca.rbukrs as fis_bukrs preserving type) AS CompanyCode,
  cast(acdoca.gjahr as fis_gjahr preserving type) AS FiscalYear,
  cast(acdoca.belnr as fis_belnr preserving type) AS AccountingDocument,
  cast(acdoca.docln as fis_docln preserving type) AS LedgerGLLineItem,
  cast(finsc_ledger_rep.rldnr as fis_rldnr preserving type) AS Ledger,
  cast(acdoca.blart as fis_blart preserving type) AS AccountingDocumentType,
  cast(acdoca.usnam as fis_usnam preserving type) AS AccountingDocCreatedByUser,
  cast(acdoca.hsl as fis_hsl preserving type) AS AmountInCompanyCodeCurrency,
  cast(acdoca.wsl as fis_wsl preserving type) AS AmountInTransactionCurrency,
  acdoca.bttype AS BusinessTransactionType,
  cast(acdoca.rhcur as fis_hwaer preserving type) AS CompanyCodeCurrency,
  acdoca.ksl AS AmountInGlobalCurrency,
  acdoca.rkcur AS GlobalCurrency,
  acdoca.osl AS AmountInFreeDefinedCurrency1,
  acdoca.rocur AS FreeDefinedCurrency1,
  cast(acdoca.rwcur as fis_rwcur preserving type) AS TransactionCurrency,
  acdoca.bukrs_sender AS SenderCompanyCode,
  cast(acdoca.poper as fins_fiscalperiod preserving type) AS FiscalPeriod,
  cast(acdoca.bldat as fis_bldat preserving type) AS DocumentDate,
  cast(acdoca.bstat as fis_bstat preserving type) AS AccountingDocumentCategory,
  cast(acdoca.awtyp as fis_awtyp preserving type) AS ReferenceDocumentType,
  acdoca.awref AS ReferenceDocument,
  acdoca.xreversing AS IsReversal,
  acdoca.xreversed AS IsReversed,
  acdoca.awref_rev AS ReversalReferenceDocument,
  cast( acdoca.uspob as fis_uspob preserving type) AS OriginSenderObject,
  acdoca.acrobjtype AS AccrualObjectType,
  acdoca.acrlogsys AS AccrualObjectLogicalSystem,
  cast(acdoca.acrobj_id as fac_ace_postg_obj_id) AS AccrualObject,
  cast(acdoca.acrsobj_id as fac_ace_postg_ref_subkey) AS AccrualSubobject,
  acdoca.acritmtype AS AccrualItemType,
  cast(acdoca.racct as fis_racct preserving type) AS GLAccount,
  cast(acdoca.rcntr as fis_kostl) AS CostCenter,
  cast(acdoca.prctr as fis_prctr preserving type) AS ProfitCenter,
  cast(acdoca.bschl as fis_bschl preserving type) AS PostingKey,
  acdoca.slalittype AS SubLedgerAcctLineItemType,
  acdoca.awitgrp AS ReferenceDocumentItemGroup,
  cast(acdoca.fiscyearper as fis_jahrper_conv ) AS FiscalYearPeriod,
  acdoca.periv AS FiscalYearVariant,
  acdoca.rfarea AS FunctionalArea,
  cast( acdoca.timestamp as fis_chng_tstamp preserving type ) AS LastChangeDateTime,
  cast( acdoca.timestamp as fis_crea_tstamp preserving type ) AS CreationDateTime,
  cast( cast(substring( cast(acdoca.timestamp as abap.char(30)) , 1 , 8) as abap.dats(8)) as fis_cpdat ) AS CreationDate,
  acdoca.lokkt AS AlternativeGLAccount,
  acdoca.ktop2 AS CountryChartOfAccounts,
  cast(acdoca.ebeln as fis_ebeln) AS PurchasingDocument,
  acdoca.ebelp AS PurchasingDocumentItem,
  cast (acdoca.matnr as productnumber) AS Product,
  acdoca.werks AS Plant,
  acdoca.mwskz AS TaxCode,
  acdoca.xopvw AS IsOpenItemManaged,
  acdoca.augdt AS ClearingDate,
  acdoca.augbl AS ClearingAccountingDocument,
  acdoca.auggj AS ClearingDocFiscalYear,
  acdoca.zekkn AS AccountAssignmentNumber,
  acdoca.sgtxt AS DocumentItemText,
  acdoca.accas AS AccountAssignment,
  acdoca.accasty AS AccountAssignmentType,
  acdoca.kdauf AS SalesOrder,
  acdoca.kdpos AS SalesOrderItem,
  acdoca.hkgrp AS CostOriginGroup,
  acdoca.aufnr AS OrderID,
  acdoca.autyp AS OrderCategory,
  cast( acdoca.ps_pspid as fis_project ) AS Project,
  cast( acdoca.ps_prj_pnr as fis_projectint_no_conv ) AS ProjectInternalID,
  cast( acdoca.ps_posid as /cpd/plan_item_id ) AS WorkPackage,
  acdoca.nplnr AS ProjectNetwork,
  acdoca.nplnr_vorgn AS RelatedNetworkActivity,
  acdoca.service_doc_id AS ServiceDocument,
  acdoca.service_doc_type AS ServiceDocumentType,
  acdoca.prznr AS BusinessProcess,
  acdoca.kstrg AS CostObject,
  acdoca.acrvaldat AS AccrualValueDate,
  acdoca.kokrs AS ControllingArea,
  cast(acdoca.zuonr as fis_zuonr) AS AssignmentReference,
  cast(acdoca.koart as farp_koart preserving type) AS FinancialAccountType,
  cast(acdoca.rbusa as fis_rbusa preserving type) AS BusinessArea,
  acdoca.segment AS Segment,
  cast(acdoca.lifnr as md_supplier preserving type) AS Supplier,
  cast(acdoca.kunnr as kunnr preserving type) AS Customer,
  acdoca.glaccount_type AS GLAccountType,
  cast(acdoca.gkont as fis_gkont preserving type) AS OffsettingAccount,
  acdoca.ktopl AS ChartOfAccounts,
  acdoca.docnr_ld AS JrnlEntrShiftedFYConsecutiveID,
  cast (_AccrSpcfcConfignSlalittype.FinancialAccrualTransacType as fac_ace_postg_ttype ) AS FinancialAccrualTransacType,
  acdoca.rmvct AS FinancialTransactionType,
  _FinancialTransactionType._Text[1: Language = $session.system_language].FinancialTransactionTypeName AS FinancialTransactionTypeName,
  _AccrSpcfcConfignSlalittype.FinancialAccrTransacTypeName AS FinancialAccrTransacTypeName,
  cast(_AccrSpcfcConfignSlalittype.GLAccountLineItemIsAccrual as fac_ace_xaccr_ref) AS GLAccountLineItemIsAccrual
FROM acdoca
INNER JOIN finsc_ledger_rep ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_AccrSpcfcConfignSlalittype AS _AccrSpcfcConfignSlalittype ON SubLedgerAcctLineItemType = _AccrSpcfcConfignSlalittype.SubLedgerAcctLineItemType  -- association [0..1]
LEFT OUTER JOIN I_FinancialTransactionType AS _FinancialTransactionType ON FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType  -- association [0..1]
;