I_PRAAccountingDocumentHeader
PRA Accounting Document Header
I_PRAAccountingDocumentHeader (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
PRA Accounting Document Header · Cross Applications
I_PRAAccountingDocumentHeader is a Basic CDS View (Cube) that provides data about "PRA Accounting Document Header" in SAP S/4HANA. It reads from 1 data source (/pra/acc_doc_hdr) and exposes 24 fields with key fields CompanyCode, FiscalPeriod, AccountingDocument. It has 5 associations to related views.
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Cross Applications |
| Application Component | IS-OIL-PRA |
| Capabilities | Data Provider for Analytical Queries, Data Source in SQL Select, Data Source for Defining CDS Entities, Data Source for Data Extraction |
| Package | Cross Applications for SAP S/4HANA Cloud Private Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| /pra/acc_doc_hdr | /pra/acc_doc_hdr | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_PRAApplicationOrigin | _Origin | $projection.Origin = _Origin.Origin |
| [0..1] | I_PRAAccountingDocumentType | _AccountingDocumentType | $projection.Origin = _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 (14)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | PRA Accounting Document Header | view | |
| Analytics.dataCategory | #CUBE | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Analytics.dataExtraction.enabled | true | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | IPVACCTGDOCHDR | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_CUBE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.sapObjectNodeType.name | PRARevenueAccountingDocument | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | Company Code | ||
| KEY | FiscalPeriod | Fiscal Period | ||
| KEY | AccountingDocument | doc_no | Revenue Accounting Document Number | |
| DocumentDescription | document_desc | Document Description | ||
| Origin | system_src | Application | ||
| AccountingDocumentType | doc_type | VAT Document Type | ||
| OriginReferenceDocument | ref_key | Source Reference Document (VL,CI,SS,FT) | ||
| AccountingDocumentStatus | doc_status | Accounting Document Status | ||
| AccountingDocumentIsReversed | rvrs_doc_fl | Accounting Reverse Flag | ||
| AccountingDocumentCrossCoRef | xcc_key | Cross Company key for Accounting Document Header | ||
| PostingDate | post_dt | Accounting Document Posting Date | ||
| DocumentDate | doc_dt | Document Date | ||
| CreatedByUser | Created By | |||
| CreationDateTime | Created On Timestamp | |||
| LastChangedByUser | Changed By | |||
| ChangedDateTime | Changed On Timestamp | |||
| NumberOfItems | Number of Items | |||
| NumberOfRejectedItems | Number of Rejected Items | |||
| NumberOfDocuments | Number of Documents | |||
| _CompanyCode | _CompanyCode | |||
| _AccountingDocumentType | _AccountingDocumentType | |||
| _AccountingDocumentStatus | _AccountingDocumentStatus | |||
| _Origin | _Origin | |||
| _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_PRAAccountingDocumentHeader.
-- 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: IPVACCTGDOCHDR
CREATE VIEW I_PRAAccountingDocumentHeader AS
SELECT
cast ( bukrs as fis_bukrs ) AS CompanyCode,
cast (acct_period as oiu_vdm_fis_period preserving type) AS FiscalPeriod,
doc_no AS AccountingDocument,
document_desc AS DocumentDescription,
system_src AS Origin,
doc_type AS AccountingDocumentType,
ref_key AS OriginReferenceDocument,
doc_status AS AccountingDocumentStatus,
rvrs_doc_fl AS AccountingDocumentIsReversed,
xcc_key AS AccountingDocumentCrossCoRef,
post_dt AS PostingDate,
doc_dt AS DocumentDate,
cast( oiu_cruser as fclm_bam_created_by ) AS CreatedByUser,
cast( oiu_timestamp as oiu_vdm_created_on_ts ) AS CreationDateTime,
cast( change_user as fclm_bam_changed_by ) AS LastChangedByUser,
cast( change_timestamp as oiu_vdm_changed_on_ts ) AS ChangedDateTime,
cast( total_rec_cnt as oiu_vdm_no_of_items ) AS NumberOfItems,
cast( rej_rec_cnt as oiu_vdm_no_of_rejected_items ) AS NumberOfRejectedItems,
cast( 1 as oiu_vdm_no_of_docs) AS NumberOfDocuments
FROM /pra/acc_doc_hdr
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_PRAApplicationOrigin AS _Origin ON Origin = _Origin.Origin -- association [0..1]
LEFT OUTER JOIN I_PRAAccountingDocumentType AS _AccountingDocumentType ON Origin = _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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA