P_ARProcessFlowBillingDoc
Billing Doc details for AR Process Flow
P_ARProcessFlowBillingDoc is a Consumption CDS View that provides data about "Billing Doc details for AR Process Flow" in SAP S/4HANA. It reads from 3 data sources (I_SDDocumentPartner, I_SDDocumentPartner, I_BillingDocument) and exposes 39 fields with key field BillingDocument. It has 3 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_SDDocumentPartner | _BillTo | left_outer |
| I_SDDocumentPartner | _ShipTo | left_outer |
| I_BillingDocument | I_BillingDocument | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_UserContactCard | _UserContactCard | _UserContactCard.ContactCardID = $projection.CreatedByUser |
| [0..1] | I_Customer | _ShipToParty | $projection.ShipToParty = _ShipToParty.Customer |
| [0..1] | I_Customer | _BillToParty | $projection.BillToParty = _BillToParty.Customer |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Billing Doc details for AR Process Flow | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| AccessControl.personalData.blocking | #REQUIRED | view |
Fields (39)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillingDocument | I_BillingDocument | BillingDocument | SD Document |
| BillingDocumentType | I_BillingDocument | BillingDocumentType | Billing Type | |
| BillingDocumentTypeName | ||||
| SoldToParty | I_BillingDocument | SoldToParty | Sold-to Party | |
| CustomerName | ||||
| ShipToParty | I_SDDocumentPartner | Customer | Sold-to Party | |
| ShipToPartyName | _ShipToParty | CustomerName | Name of Customer | |
| PayerParty | I_BillingDocument | PayerParty | Payer | |
| PayerPartyName | ||||
| BillToParty | I_SDDocumentPartner | Customer | Sold-to Party | |
| BillToPartyName | _BillToParty | CustomerName | Name of Customer | |
| TaxAmount | I_BillingDocument | TotalTaxAmount | Tax Amount | |
| TotalGrossAmount | ||||
| TotalNetAmount | I_BillingDocument | TotalNetAmount | Total Net Amount | |
| TransactionCurrency | I_BillingDocument | TransactionCurrency | Transaction Currency | |
| BillingDocumentDate | I_BillingDocument | BillingDocumentDate | Billing Date | |
| OverallSDProcessStatus | I_BillingDocument | OverallSDProcessStatus | ||
| OverallSDProcessStatusDesc | ||||
| SalesOrganization | I_BillingDocument | SalesOrganization | Sales Organization | |
| SalesOrganizationName | ||||
| DistributionChannel | I_BillingDocument | DistributionChannel | RefDistCh-Cust/Mat. | |
| DistributionChannelName | ||||
| Division | I_BillingDocument | Division | Internal Division ID | |
| DivisionName | ||||
| Divisionastxt_vtrberasSalesArea | ||||
| DivisionName1astxt_vtrberasSalesAreaDesc | ||||
| CustomerPaymentTerms | I_BillingDocument | CustomerPaymentTerms | Pyt Terms | |
| CustomerPaymentTermsName | ||||
| CreatedByUser | I_BillingDocument | CreatedByUser | User Name | |
| FullName | _UserContactCard | FullName | Name | |
| CreationDate | I_BillingDocument | CreationDate | Time Stamp | |
| CreationTime | I_BillingDocument | CreationTime | Time of Change | |
| _Item | I_BillingDocument | _Item | ||
| _SoldToParty | I_BillingDocument | _SoldToParty | ||
| _PayerParty | I_BillingDocument | _PayerParty | ||
| _ShipToParty | _ShipToParty | |||
| _BillToParty | _BillToParty | |||
| _TransactionCurrency | I_BillingDocument | _TransactionCurrency | ||
| _UserContactCard | _UserContactCard |
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_ARProcessFlowBillingDoc.
-- 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_ARProcessFlowBillingDoc AS
SELECT
I_BillingDocument.BillingDocument AS BillingDocument,
I_BillingDocument.BillingDocumentType AS BillingDocumentType,
I_BillingDocument._BillingDocumentType._Text[1:Language = $session.system_language].BillingDocumentTypeName AS BillingDocumentTypeName,
I_BillingDocument.SoldToParty AS SoldToParty,
I_BillingDocument._SoldToParty.CustomerName AS CustomerName,
_ShipTo.Customer AS ShipToParty,
_ShipToParty.CustomerName AS ShipToPartyName,
I_BillingDocument.PayerParty AS PayerParty,
I_BillingDocument._PayerParty.CustomerName AS PayerPartyName,
_BillTo.Customer AS BillToParty,
_BillToParty.CustomerName AS BillToPartyName,
I_BillingDocument.TotalTaxAmount AS TaxAmount,
(I_BillingDocument.TotalTaxAmount + I_BillingDocument.TotalNetAmount) AS TotalGrossAmount,
I_BillingDocument.TotalNetAmount AS TotalNetAmount,
I_BillingDocument.TransactionCurrency AS TransactionCurrency,
I_BillingDocument.BillingDocumentDate AS BillingDocumentDate,
I_BillingDocument.OverallSDProcessStatus AS OverallSDProcessStatus,
I_BillingDocument._OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc AS OverallSDProcessStatusDesc,
I_BillingDocument.SalesOrganization AS SalesOrganization,
I_BillingDocument._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
I_BillingDocument.DistributionChannel AS DistributionChannel,
I_BillingDocument._DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName AS DistributionChannelName,
I_BillingDocument.Division AS Division,
I_BillingDocument._Division._Text[1:Language = $session.system_language].DivisionName AS DivisionName,
cast( concat( concat( concat( concat( I_BillingDocument.SalesOrganization, '/'), I_BillingDocument.DistributionChannel), '/'), I_BillingDocument.Division) as txt_vtrber ) as SalesArea AS Divisionastxt_vtrberasSalesArea,
cast( concat_with_space( concat( concat_with_space( concat( I_BillingDocument._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName, ','), cast(I_BillingDocument._DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName as vtxtk), 1), ','), I_BillingDocument._Division._Text[1:Language = $session.system_language].DivisionName, 1) as txt_vtrber ) as SalesAreaDesc AS DivisionName1astxt_vtrberasSalesAreaDesc,
I_BillingDocument.CustomerPaymentTerms AS CustomerPaymentTerms,
I_BillingDocument._CustomerPaymentTerms._Text[1:Language = $session.system_language].CustomerPaymentTermsName AS CustomerPaymentTermsName,
I_BillingDocument.CreatedByUser AS CreatedByUser,
_UserContactCard.FullName AS FullName,
I_BillingDocument.CreationDate AS CreationDate,
I_BillingDocument.CreationTime AS CreationTime,
I_BillingDocument._Item AS _Item,
I_BillingDocument._SoldToParty AS _SoldToParty,
I_BillingDocument._PayerParty AS _PayerParty,
I_BillingDocument._TransactionCurrency AS _TransactionCurrency
FROM I_BillingDocument
LEFT OUTER JOIN I_SDDocumentPartner AS _ShipTo ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SDDocumentPartner AS _BillTo ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON _UserContactCard.ContactCardID = CreatedByUser -- association [1..1]
LEFT OUTER JOIN I_Customer AS _ShipToParty ON ShipToParty = _ShipToParty.Customer -- association [0..1]
LEFT OUTER JOIN I_Customer AS _BillToParty ON BillToParty = _BillToParty.Customer -- 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