P_PH_CASCashItem
CAS Cash Item
P_PH_CASCashItem is a Composite CDS View that provides data about "CAS Cash Item" in SAP S/4HANA. It reads from 2 data sources (I_AccountingDocument, I_OperationalAcctgDocItem) and exposes 43 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. Part of development package GLO_FIN_IS_PH.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountingDocument | _PaymentDocumentHeader | inner |
| I_OperationalAcctgDocItem | _PaymentDocumentItem | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPHCASCASHITM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (43)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_OperationalAcctgDocItem | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | I_OperationalAcctgDocItem | AccountingDocument | Journal Entry |
| KEY | FiscalYear | I_OperationalAcctgDocItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocumentItem | I_OperationalAcctgDocItem | AccountingDocumentItem | Posting View Item |
| OriginalReferenceDocument | ||||
| ReferenceDocumentFiscalYear | ||||
| ExternalDocumentID | I_AccountingDocument | DocumentReferenceID | Reference | |
| ExchangeRate | I_AccountingDocument | ExchangeRate | Exchange rate | |
| BusinessPlace | I_OperationalAcctgDocItem | BusinessPlace | Business place | |
| DocumentDate | I_OperationalAcctgDocItem | DocumentDate | Journal Entry Date | |
| PostingDate | I_OperationalAcctgDocItem | PostingDate | Posting Date for GR | |
| AccountingDocumentType | I_OperationalAcctgDocItem | AccountingDocumentType | Journal Entry Type | |
| ClearingAccountingDocument | I_OperationalAcctgDocItem | ClearingJournalEntry | Clrng doc. | |
| ClearingDocFiscalYear | I_OperationalAcctgDocItem | ClearingJournalEntryFiscalYear | Fiscal Year of Clearing Journal Entry | |
| ClearingDate | I_OperationalAcctgDocItem | ClearingDate | Clearing Date | |
| GLAccount | I_OperationalAcctgDocItem | GLAccount | General Ledger | |
| ChartOfAccounts | I_OperationalAcctgDocItem | ChartOfAccounts | Node Class | |
| DebitCreditCodeendasDebitCreditCode | ||||
| IsUsedInPaymentTransaction | I_OperationalAcctgDocItem | IsUsedInPaymentTransaction | Is Used In Payment Transaction | |
| DocumentItemTextendasDocumentItemText | ||||
| InvoiceReference | I_OperationalAcctgDocItem | InvoiceReference | Invoice Reference | |
| InvoiceReferenceFiscalYear | I_OperationalAcctgDocItem | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | |
| DocumentReferenceID | I_AccountingDocument | DocumentReferenceID | Reference | |
| Customer | I_OperationalAcctgDocItem | Customer | Sold-to Party | |
| Supplier | I_OperationalAcctgDocItem | Supplier | Supplier | |
| BPCustomerNameendasCustomerName | ||||
| BPSupplierNameendasSupplierName | ||||
| CountryendasCustomerCountry | ||||
| CountryendasSupplierCountry | ||||
| PostalCode1endasCustomerAddress | ||||
| PostalCode1endasSupplierAddress | ||||
| TaxNumber1endasCustomerTaxNumber1 | ||||
| TaxNumber1endasSupplierTaxNumber1 | ||||
| TaxNumber3endasCustomerTaxNumber3 | ||||
| TaxNumber3endasSupplierTaxNumber3 | ||||
| TransactionCurrency | I_OperationalAcctgDocItem | TransactionCurrency | Transaction Currency | |
| AmountInTransactionCurrency | ||||
| CompanyCodeCurrency | I_OperationalAcctgDocItem | CompanyCodeCurrency | Local Currency | |
| AmountInCompanyCodeCurrency | ||||
| AdditionalCurrency1 | I_OperationalAcctgDocItem | AdditionalCurrency1 | Local curr. 2 | |
| AmountInAdditionalCurrency1 | ||||
| AdditionalCurrency2 | I_OperationalAcctgDocItem | AdditionalCurrency2 | Local curr. 3 | |
| AmountInAdditionalCurrency2 |
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_PH_CASCashItem.
-- 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: PPHCASCASHITM
CREATE VIEW P_PH_CASCashItem AS
SELECT
_PaymentDocumentItem.CompanyCode AS CompanyCode,
_PaymentDocumentItem.AccountingDocument AS AccountingDocument,
_PaymentDocumentItem.FiscalYear AS FiscalYear,
_PaymentDocumentItem.AccountingDocumentItem AS AccountingDocumentItem,
'' AS OriginalReferenceDocument,
'0000' AS ReferenceDocumentFiscalYear,
_PaymentDocumentHeader.DocumentReferenceID AS ExternalDocumentID,
_PaymentDocumentHeader.ExchangeRate AS ExchangeRate,
_PaymentDocumentItem.BusinessPlace AS BusinessPlace,
_PaymentDocumentItem.DocumentDate AS DocumentDate,
_PaymentDocumentItem.PostingDate AS PostingDate,
_PaymentDocumentItem.AccountingDocumentType AS AccountingDocumentType,
_PaymentDocumentItem.ClearingJournalEntry AS ClearingAccountingDocument,
_PaymentDocumentItem.ClearingJournalEntryFiscalYear AS ClearingDocFiscalYear,
_PaymentDocumentItem.ClearingDate AS ClearingDate,
_PaymentDocumentItem.GLAccount AS GLAccount,
_PaymentDocumentItem.ChartOfAccounts AS ChartOfAccounts,
case when _PaymentDocumentItem.IsNegativePosting = 'X' then case _PaymentDocumentItem.DebitCreditCode when 'S' then 'H' when 'H' then 'S' end else _PaymentDocumentItem.DebitCreditCode end as DebitCreditCode AS DebitCreditCodeendasDebitCreditCode,
_PaymentDocumentItem.IsUsedInPaymentTransaction AS IsUsedInPaymentTransaction,
case _PaymentDocumentItem.DocumentItemText when '' then _PaymentDocumentHeader.AccountingDocumentHeaderText else _PaymentDocumentItem.DocumentItemText end as DocumentItemText AS DocumentItemTextendasDocumentItemText,
_PaymentDocumentItem.InvoiceReference AS InvoiceReference,
_PaymentDocumentItem.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
_PaymentDocumentHeader.DocumentReferenceID AS DocumentReferenceID,
_PaymentDocumentItem.Customer AS Customer,
_PaymentDocumentItem.Supplier AS Supplier,
case _PaymentDocumentItem._Customer.IsOneTimeAccount when 'X' then concat_with_space(concat_with_space(concat_with_space(_PaymentDocumentItem._JournalEntryItemOneTimeData.OneTimeAccountBPSalutationText,_PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName1 , 1) , _PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName2 , 1) , _PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName3 , 1) else _PaymentDocumentItem._Customer.BPCustomerName end as CustomerName AS BPCustomerNameendasCustomerName,
case _PaymentDocumentItem._Supplier.IsOneTimeAccount when 'X' then concat_with_space(concat_with_space(concat_with_space(_PaymentDocumentItem._JournalEntryItemOneTimeData.OneTimeAccountBPSalutationText,_PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName1 , 1) , _PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName2 , 1) , _PaymentDocumentItem._JournalEntryItemOneTimeData.BusinessPartnerName3 , 1) else _PaymentDocumentItem._Supplier.BPSupplierName end as SupplierName AS BPSupplierNameendasSupplierName,
case _PaymentDocumentItem._Customer.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.Country else _PaymentDocumentItem._Customer._AddressDefaultRepresentation.Country end as CustomerCountry AS CountryendasCustomerCountry,
case _PaymentDocumentItem._Supplier.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.Country else _PaymentDocumentItem._Supplier._AddressDefaultRepresentation.Country end as SupplierCountry AS CountryendasSupplierCountry,
case _PaymentDocumentItem._Customer.IsOneTimeAccount when 'X' then concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.StreetAddressName, ','), concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.CityName, ','), concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.Country, ','), _PaymentDocumentItem._JournalEntryItemOneTimeData.PostalCode))) else concat_with_space(_PaymentDocumentItem._Customer._AddressDefaultRepresentation.HouseNumber, concat( concat( concat( concat_with_space( concat_with_space( concat_with_space( concat_with_space(_PaymentDocumentItem._Customer._AddressDefaultRepresentation.StreetPrefixName1, _PaymentDocumentItem._Customer._AddressDefaultRepresentation.StreetPrefixName2, 1), _PaymentDocumentItem._Customer._AddressDefaultRepresentation.StreetName, 1), _PaymentDocumentItem._Customer._AddressDefaultRepresentation.StreetSuffixName1, 1), _PaymentDocumentItem._Customer._AddressDefaultRepresentation. StreetSuffixName2, 1), ','), concat(_PaymentDocumentItem._Customer._AddressDefaultRepresentation.CityName, ',')), concat(concat(_PaymentDocumentItem._Customer._AddressDefaultRepresentation.Country, ','), _PaymentDocumentItem._Customer._AddressDefaultRepresentation.PostalCode)), 1) end as CustomerAddress AS PostalCode1endasCustomerAddress,
case _PaymentDocumentItem._Supplier.IsOneTimeAccount when 'X' then concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.StreetAddressName, ','), concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.CityName, ','), concat(concat(_PaymentDocumentItem._JournalEntryItemOneTimeData.Country, ','), _PaymentDocumentItem._JournalEntryItemOneTimeData.PostalCode))) else concat_with_space(_PaymentDocumentItem._Supplier._AddressDefaultRepresentation.HouseNumber, concat( concat( concat( concat_with_space( concat_with_space( concat_with_space( concat_with_space(_PaymentDocumentItem._Supplier._AddressDefaultRepresentation.StreetPrefixName1, _PaymentDocumentItem._Supplier._AddressDefaultRepresentation.StreetPrefixName2, 1), _PaymentDocumentItem._Supplier._AddressDefaultRepresentation.StreetName, 1), _PaymentDocumentItem._Supplier._AddressDefaultRepresentation.StreetSuffixName1, 1), _PaymentDocumentItem._Supplier._AddressDefaultRepresentation. StreetSuffixName2, 1), ','), concat(_PaymentDocumentItem._Supplier._AddressDefaultRepresentation.CityName, ',')), concat(concat(_PaymentDocumentItem._Supplier._AddressDefaultRepresentation.Country, ','), _PaymentDocumentItem._Supplier._AddressDefaultRepresentation.PostalCode)), 1) end as SupplierAddress AS PostalCode1endasSupplierAddress,
case _PaymentDocumentItem._Customer.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.TaxID1 else _PaymentDocumentItem._Customer.TaxNumber1 end as CustomerTaxNumber1 AS TaxNumber1endasCustomerTaxNumber1,
case _PaymentDocumentItem._Supplier.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.TaxID1 else _PaymentDocumentItem._Supplier.TaxNumber1 end as SupplierTaxNumber1 AS TaxNumber1endasSupplierTaxNumber1,
case _PaymentDocumentItem._Customer.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.TaxID3 else _PaymentDocumentItem._Customer.TaxNumber3 end as CustomerTaxNumber3 AS TaxNumber3endasCustomerTaxNumber3,
case _PaymentDocumentItem._Supplier.IsOneTimeAccount when 'X' then _PaymentDocumentItem._JournalEntryItemOneTimeData.TaxID3 else _PaymentDocumentItem._Supplier.TaxNumber3 end as SupplierTaxNumber3 AS TaxNumber3endasSupplierTaxNumber3,
_PaymentDocumentItem.TransactionCurrency AS TransactionCurrency,
abs(_PaymentDocumentItem.AmountInTransactionCurrency) AS AmountInTransactionCurrency,
_PaymentDocumentItem.CompanyCodeCurrency AS CompanyCodeCurrency,
abs(_PaymentDocumentItem.AmountInCompanyCodeCurrency) AS AmountInCompanyCodeCurrency,
_PaymentDocumentItem.AdditionalCurrency1 AS AdditionalCurrency1,
abs(_PaymentDocumentItem.AmountInAdditionalCurrency1) AS AmountInAdditionalCurrency1,
_PaymentDocumentItem.AdditionalCurrency2 AS AdditionalCurrency2,
abs(_PaymentDocumentItem.AmountInAdditionalCurrency2) AS AmountInAdditionalCurrency2
FROM I_OperationalAcctgDocItem AS _PaymentDocumentItem
INNER JOIN I_AccountingDocument AS _PaymentDocumentHeader ON /* join condition not captured in parsed metadata */
;
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