I_PRAManualAccountingDocHdr

DDL: I_PRAMANUALACCOUNTINGDOCHDR Type: view BASIC Package: OIU_VDM_CDS

Manual Revenue Accounting document hdr

I_PRAManualAccountingDocHdr is a Basic CDS View that provides data about "Manual Revenue Accounting document hdr" in SAP S/4HANA. It reads from 1 data source (/pra/acc_mdoc_hd) and exposes 23 fields with key fields CompanyCode, PRAAccountingPeriod, AccountingDocument. It has 5 associations to related views. Part of development package OIU_VDM_CDS.

SAP Help Documentation

CategoryCDS Views for Production and Revenue Accounting (PRA)
Purpose
This CDS view records changes in values in a company code arising from accounting transactions. Manual records consist of one or more line items (postings), each of which represents an individual transaction posted to an account. When posting an accounting document, the SAP system updates the transaction figures in the accounts to which the document is posted.

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: /PRA/RADM:BUKRS-,/PRA/RADM:ACTVT-03 (Mapping role for I_PRAManualAccountingDocHdr )

View on SAP Help Portal →

Data Sources (1)

SourceAliasJoin Type
/pra/acc_mdoc_hd /pra/acc_mdoc_hd from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_PRAApplicationOrigin _Origin $projection.PRAAcctgDocApplication = _Origin.Origin
[0..1] I_PRAAccountingDocumentType _AccountingDocumentType $projection.PRAAcctgDocApplication = _AccountingDocumentType.Origin and $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
[0..1] I_PRAAccountingDocStatus _AccountingDocumentStatus $projection.AccountingDocumentStatus = _AccountingDocumentStatus.AccountingDocumentStatus
[0..1] I_Indicator _AccountingDocumentIsReversed $projection.AccountingDocumentIsReversed = _AccountingDocumentIsReversed.IndicatorValue

Annotations (10)

NameValueLevelField
EndUserText.label Manual Revenue Accounting document hdr view
AbapCatalog.sqlViewName IPRAMNLRAD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Value
KEY PRAAccountingPeriod Acct Period
KEY AccountingDocument doc_no Posted Doc. No.
AccountingDocumentType doc_type VAT Document Type
OriginReferenceDocument ref_key Source Reference Key
PRAAcctgDocApplication system_src Application
AccountingDocumentStatus doc_status VL Doc Status
AccountingDocumentIsReversed rvrs_doc_fl Reverse Flag
AccountingDocumentCrossCoRef xcc_key Cross Comp Key
NumberOfItems total_rec_cnt Total Lines
NumberOfRejectedItems rej_rec_cnt Total Reject Lines
PostingDate post_dt Posting Date
DocumentDate doc_dt Document Date
DocumentDescription document_desc Doc Description
CreatedByUser oiu_cruser Created By
CreationDateTime oiu_timestamp Timestamp
LastChangedByUser change_user User Name
ChangedDateTime change_timestamp Time Stamp
Associations_CompanyCode
_Origin _Origin
_AccountingDocumentType _AccountingDocumentType
_AccountingDocumentStatus _AccountingDocumentStatus
_AccountingDocumentIsReversed _AccountingDocumentIsReversed

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 I_PRAManualAccountingDocHdr.
-- 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 I_PRAManualAccountingDocHdr AS
SELECT
  cast ( bukrs as fis_bukrs preserving type ) AS CompanyCode,
  cast (acct_period as oiu_vdm_acct_period ) AS PRAAccountingPeriod,
  doc_no AS AccountingDocument,
  doc_type AS AccountingDocumentType,
  ref_key AS OriginReferenceDocument,
  system_src AS PRAAcctgDocApplication,
  doc_status AS AccountingDocumentStatus,
  rvrs_doc_fl AS AccountingDocumentIsReversed,
  xcc_key AS AccountingDocumentCrossCoRef,
  total_rec_cnt AS NumberOfItems,
  rej_rec_cnt AS NumberOfRejectedItems,
  post_dt AS PostingDate,
  doc_dt AS DocumentDate,
  document_desc AS DocumentDescription,
  oiu_cruser AS CreatedByUser,
  oiu_timestamp AS CreationDateTime,
  change_user AS LastChangedByUser,
  change_timestamp AS ChangedDateTime
FROM /pra/acc_mdoc_hd
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_PRAApplicationOrigin AS _Origin ON PRAAcctgDocApplication = _Origin.Origin  -- association [0..1]
LEFT OUTER JOIN I_PRAAccountingDocumentType AS _AccountingDocumentType ON PRAAcctgDocApplication = _AccountingDocumentType.Origin AND AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType  -- association [0..1]
LEFT OUTER JOIN I_PRAAccountingDocStatus AS _AccountingDocumentStatus ON AccountingDocumentStatus = _AccountingDocumentStatus.AccountingDocumentStatus  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _AccountingDocumentIsReversed ON AccountingDocumentIsReversed = _AccountingDocumentIsReversed.IndicatorValue  -- association [0..1]
;