P_AccrualLineItem

DDL: P_ACCRUALLINEITEM SQL: PACELINEITM Type: view BASIC

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

Data Sources (2)

SourceAliasJoin Type
acdoca acdoca from
finsc_ledger_rep finsc_ledger_rep inner

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_GLAccountInCompanyCode _GLAccountInCompanyCode $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and $projection.GLAccount = _GLAccountInCompanyCode.GLAccount
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_AccountingDocumentType _AccountingDocumentType $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
[0..1] P_AccrSpcfcConfignSlalittype _AccrSpcfcConfignSlalittype $projection.SubLedgerAcctLineItemType = _AccrSpcfcConfignSlalittype.SubLedgerAcctLineItemType
[0..1] I_CurrentProfitCenter _CurrentProfitCenter $projection.ControllingArea = _CurrentProfitCenter.ControllingArea and $projection.ProfitCenter = _CurrentProfitCenter.ProfitCenter
[0..1] I_LedgerCompanyCodeCrcyRoles _CurrencyRoles $projection.CompanyCode = _CurrencyRoles.CompanyCode and $projection.SourceLedger = _CurrencyRoles.Ledger
[0..1] I_LedgerText _LedgerText _LedgerText.Ledger = $projection.SourceLedger and _LedgerText.Language = $session.system_language

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PACELINEITM view
Analytics.dataExtraction.enabled false view
VDM.viewType #BASIC view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view

Fields (101)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger
KEY CompanyCode
KEY FiscalYear
KEY AccountingDocument
KEY LedgerGLLineItem
KEY Ledger
AccountingDocumentType Rep. rec. doc. type
AccountingDocCreatedByUser User Name
PostingDate Posting Date
AmountInCompanyCodeCurrency Local Crcy Amt
AmountInTransactionCurrency OrigTrnsCrcyAmt
BusinessTransactionType bttype Business Transaction Type
CompanyCodeCurrency Local Currency
AmountInGlobalCurrency ksl GrpCurr
GlobalCurrency rkcur Ledger curr.
AmountInFreeDefinedCurrency1 osl Other Crcy Amnt
FreeDefinedCurrency1 rocur Free Defined Crcy 1
GlobalCurrencyRole _CurrencyRoles GlobalCurrencyRole
FreeDefinedCurrency1Role _CurrencyRoles FreeDefinedCurrency1Role
GlobalCurrencyRoleName
FreeDefinedCurrency1RoleName
CreationDate UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
TransactionCurrency Transaction Currency
SenderCompanyCode bukrs_sender Sender CoCode
FiscalPeriod Posting periods
DocumentDate Journal Entry Date
AccountingDocumentCategory Document Status
ReferenceDocumentType Reference Document Type
ReferenceDocument awref Reference Doc.
IsReversal xreversing Reversal doc.
IsReversed xreversed Reversed
ReversalReferenceDocument awref_rev Reversal Ref.
OriginSenderObject Source Object
AccrualObjectType acrobjtype Accrual Object Type
AccrualObjectLogicalSystem acrlogsys Logical Syst. AcrObj
AccrualObject Accrual Object
AccrualSubobject Accrual Subobject
AccrualItemType acritmtype Accrual Item Type
GLAccount GL Account From
CostCenter Cost Center
ProfitCenter Profit Centers
PostingKey Posting Key
SubLedgerAcctLineItemType slalittype SLALineItemType
ReferenceDocumentItemGroup awitgrp Ref. Item Group
FinancialAccrualTransacType
FinancialAccrTransacTypeName _AccrSpcfcConfignSlalittype FinancialAccrTransacTypeName
GLAccountLineItemIsAccrual
FiscalYearPeriod Period/Year
FiscalYearVariant periv FYear Variant
FunctionalArea rfarea R FuncArea
LastChangeDateTime UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
CreationDateTime UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
AlternativeGLAccount lokkt Local Acct No.
CountryChartOfAccounts ktop2 Alternative COA
PurchasingDocument Source PurchDoc
PurchasingDocumentItem ebelp Item pur. doc.
Product Vehicle Model
Plant werks Receiving Plant
TaxCode mwskz Tax Code
IsOpenItemManaged xopvw OI Management
ClearingDate augdt Clearing
ClearingAccountingDocument augbl Clrng doc.
ClearingDocFiscalYear auggj Clrg Fiscal Yr
AccountAssignmentNumber zekkn Account Assgmt No.
DocumentItemText sgtxt Text
AccountAssignment accas Account Assignment
AccountAssignmentType accasty Object Type
SalesOrder kdauf SD Document
SalesOrderItem kdpos Sales Ord. Item
SalesDocument SD Document
SalesDocumentItem Sales Ord. Item
CostOriginGroup hkgrp Origin Group
OrderID aufnr SettlementOrder
OrderCategory autyp Order category
WBSElementInternalID WBS Element
Project Project def.
ProjectInternalID Project def.
WorkPackage WBS Element
ProjectNetwork nplnr Network
RelatedNetworkActivity nplnr_vorgn Netwk activity
ServiceDocument service_doc_id Transaction ID
ServiceDocumentType service_doc_type Transaction Type
BusinessProcess prznr Sender BProc
CostObject kstrg Cost Objects
AccrualValueDate acrvaldat Accrual Value Date
ControllingArea kokrs Org. Value
FinancialAccountType Account type
BusinessArea Business Area
Segment segment Segment number
Supplier Vendor no.
Customer Stock customer
GLAccountType glaccount_type G/L Account Type
OffsettingAccount Offsetting Acct
ProfitCtrResponsibleUser _CurrentProfitCenter ProfitCtrResponsibleUser User Responsible
GLAccountAuthorizationGroup _GLAccountInCompanyCode AuthorizationGroup AuthorizGroup
SupplierFinsAuthorizationGrp _Supplier AuthorizationGroup AuthorizGroup
CustomerFinsAuthorizationGrp _Customer AuthorizationGroup AuthorizGroup
SupplierAccountGroup
CustomerAccountGroup _Customer CustomerAccountGroup Account group
AcctgDocTypeAuthorizationGroup _AccountingDocumentType AuthorizationGroup AuthorizGroup
LedgerName _LedgerText LedgerName Ledger Name

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_AccrualLineItem.
-- 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.
-- SQL view name: PACELINEITM

CREATE VIEW P_AccrualLineItem 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(blart as fis_blart preserving type) AS AccountingDocumentType,
  cast(usnam as fis_usnam preserving type) AS AccountingDocCreatedByUser,
  cast(budat as fis_budat preserving type) AS PostingDate,
  cast(hsl as fis_hsl preserving type) AS AmountInCompanyCodeCurrency,
  cast(wsl as fis_wsl preserving type) AS AmountInTransactionCurrency,
  bttype AS BusinessTransactionType,
  cast(rhcur as fis_hwaer preserving type) AS CompanyCodeCurrency,
  ksl AS AmountInGlobalCurrency,
  rkcur AS GlobalCurrency,
  osl AS AmountInFreeDefinedCurrency1,
  rocur AS FreeDefinedCurrency1,
  _CurrencyRoles.GlobalCurrencyRole AS GlobalCurrencyRole,
  _CurrencyRoles.FreeDefinedCurrency1Role AS FreeDefinedCurrency1Role,
  cast( _CurrencyRoles._GlobalCurrencyRole._Text[1: Language = $session.system_language].CurrencyRoleName as fis_gc_currole_name) AS GlobalCurrencyRoleName,
  cast( _CurrencyRoles._FreeDefinedCurrency1Role._Text[1: Language = $session.system_language].CurrencyRoleName as fis_fdc1_currole_name ) AS FreeDefinedCurrency1RoleName,
  cast( cast(substring( cast(timestamp as abap.char(30)) , 1 , 8) as abap.dats(8)) as fis_cpdat ) AS CreationDate,
  cast(rwcur as fis_rwcur preserving type) AS TransactionCurrency,
  bukrs_sender AS SenderCompanyCode,
  cast(poper as fins_fiscalperiod preserving type) AS FiscalPeriod,
  cast(bldat as fis_bldat preserving type) AS DocumentDate,
  cast(bstat as fis_bstat preserving type) AS AccountingDocumentCategory,
  cast(awtyp as fis_awtyp preserving type) AS ReferenceDocumentType,
  awref AS ReferenceDocument,
  xreversing AS IsReversal,
  xreversed AS IsReversed,
  awref_rev AS ReversalReferenceDocument,
  cast( uspob as fis_uspob preserving type) AS OriginSenderObject,
  acrobjtype AS AccrualObjectType,
  acrlogsys AS AccrualObjectLogicalSystem,
  cast(acrobj_id as fac_ace_postg_obj_id) AS AccrualObject,
  cast(acrsobj_id as fac_ace_postg_ref_subkey) AS AccrualSubobject,
  acritmtype AS AccrualItemType,
  cast(racct as fis_racct preserving type) AS GLAccount,
  cast(rcntr as fis_kostl preserving type) AS CostCenter,
  cast(prctr as fis_prctr preserving type) AS ProfitCenter,
  cast(bschl as fis_bschl preserving type) AS PostingKey,
  slalittype AS SubLedgerAcctLineItemType,
  awitgrp AS ReferenceDocumentItemGroup,
  cast (_AccrSpcfcConfignSlalittype.FinancialAccrualTransacType as fac_ace_postg_ttype ) AS FinancialAccrualTransacType,
  _AccrSpcfcConfignSlalittype.FinancialAccrTransacTypeName AS FinancialAccrTransacTypeName,
  cast(_AccrSpcfcConfignSlalittype.GLAccountLineItemIsAccrual as fac_ace_xaccr_ref) AS GLAccountLineItemIsAccrual,
  cast(fiscyearper as fis_jahrper_conv ) AS FiscalYearPeriod,
  periv AS FiscalYearVariant,
  rfarea AS FunctionalArea,
  cast( timestamp as fis_chng_tstamp preserving type ) AS LastChangeDateTime,
  cast( timestamp as fis_crea_tstamp preserving type ) AS CreationDateTime,
  lokkt AS AlternativeGLAccount,
  ktop2 AS CountryChartOfAccounts,
  cast(ebeln as fis_ebeln) AS PurchasingDocument,
  ebelp AS PurchasingDocumentItem,
  cast (matnr as productnumber) AS Product,
  werks AS Plant,
  mwskz AS TaxCode,
  xopvw AS IsOpenItemManaged,
  augdt AS ClearingDate,
  augbl AS ClearingAccountingDocument,
  auggj AS ClearingDocFiscalYear,
  zekkn AS AccountAssignmentNumber,
  sgtxt AS DocumentItemText,
  accas AS AccountAssignment,
  accasty AS AccountAssignmentType,
  kdauf AS SalesOrder,
  kdpos AS SalesOrderItem,
  cast(kdauf as vbeln_va preserving type) AS SalesDocument,
  cast(kdpos as posnr_va preserving type) AS SalesDocumentItem,
  hkgrp AS CostOriginGroup,
  aufnr AS OrderID,
  autyp AS OrderCategory,
  cast( ps_psp_pnr as fis_wbsint_no_conv ) AS WBSElementInternalID,
  cast( ps_pspid as fis_project ) AS Project,
  cast( ps_prj_pnr as fis_projectint_no_conv ) AS ProjectInternalID,
  cast( ps_posid as /cpd/plan_item_id ) AS WorkPackage,
  nplnr AS ProjectNetwork,
  nplnr_vorgn AS RelatedNetworkActivity,
  service_doc_id AS ServiceDocument,
  service_doc_type AS ServiceDocumentType,
  prznr AS BusinessProcess,
  kstrg AS CostObject,
  acrvaldat AS AccrualValueDate,
  kokrs AS ControllingArea,
  cast(koart as farp_koart preserving type) AS FinancialAccountType,
  cast(rbusa as fis_rbusa preserving type) AS BusinessArea,
  Segment,
  cast(lifnr as md_supplier preserving type) AS Supplier,
  cast(kunnr as kunnr preserving type) AS Customer,
  glaccount_type AS GLAccountType,
  cast(gkont as fis_gkont preserving type) AS OffsettingAccount,
  _CurrentProfitCenter.ProfitCtrResponsibleUser AS ProfitCtrResponsibleUser,
  _GLAccountInCompanyCode.AuthorizationGroup AS GLAccountAuthorizationGroup,
  _Supplier.AuthorizationGroup AS SupplierFinsAuthorizationGrp,
  _Customer.AuthorizationGroup AS CustomerFinsAuthorizationGrp,
  _Supplier._SupplierAccountGroup.SupplierAccountGroup AS SupplierAccountGroup,
  _Customer.CustomerAccountGroup AS CustomerAccountGroup,
  _AccountingDocumentType.AuthorizationGroup AS AcctgDocTypeAuthorizationGroup,
  _LedgerText.LedgerName AS LedgerName
FROM acdoca
INNER JOIN finsc_ledger_rep ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON CompanyCode = _GLAccountInCompanyCode.CompanyCode AND GLAccount = _GLAccountInCompanyCode.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocumentType ON AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType  -- association [0..1]
LEFT OUTER JOIN P_AccrSpcfcConfignSlalittype AS _AccrSpcfcConfignSlalittype ON SubLedgerAcctLineItemType = _AccrSpcfcConfignSlalittype.SubLedgerAcctLineItemType  -- association [0..1]
LEFT OUTER JOIN I_CurrentProfitCenter AS _CurrentProfitCenter ON ControllingArea = _CurrentProfitCenter.ControllingArea AND ProfitCenter = _CurrentProfitCenter.ProfitCenter  -- association [0..1]
LEFT OUTER JOIN I_LedgerCompanyCodeCrcyRoles AS _CurrencyRoles ON CompanyCode = _CurrencyRoles.CompanyCode AND SourceLedger = _CurrencyRoles.Ledger  -- association [0..1]
LEFT OUTER JOIN I_LedgerText AS _LedgerText ON _LedgerText.Ledger = SourceLedger AND _LedgerText.Language = $session.system_language  -- association [0..1]
;