P_ForeignCurrencySuspicious
P_ForeignCurrencySuspicious is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 13 fields with key fields AccountingDocument, AccountingDocumentItem, FiscalYear, CompanyCode. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_OperationalAcctgDocItem | I_OperationalAcctgDocItem | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_CompanyCode | bukrs |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_AccountingDocument | _AccountingDocument | $projection.CompanyCode = _AccountingDocument.CompanyCode and $projection.AccountingDocument = _AccountingDocument.AccountingDocument and $projection.FiscalYear = _AccountingDocument.FiscalYear |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFCSCASE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | CompanyCode | CompanyCode | ||
| InvoiceType | ReferenceDocumentType | |||
| InvoiceDocumentAmount | AmountInTransactionCurrency | |||
| TransactionCurrency | TransactionCurrency | |||
| Supplier | Supplier | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| SupplierCountry | _Supplier | Country | ||
| SupplierName | _Supplier | OrganizationBPName1 | ||
| SupplierAccountGroup | _Supplier | SupplierAccountGroup | ||
| _AccountingDocument | _AccountingDocument |
@AbapCatalog.sqlViewName: 'PFCSCASE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: {
serviceQuality: #C,
sizeCategory: #S,
dataClass: #MASTER
}
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ForeignCurrencySuspicious
with parameters
P_CompanyCode : bukrs
as select from I_OperationalAcctgDocItem
association [1..1] to I_AccountingDocument as _AccountingDocument
on $projection.CompanyCode = _AccountingDocument.CompanyCode
and $projection.AccountingDocument = _AccountingDocument.AccountingDocument
and $projection.FiscalYear = _AccountingDocument.FiscalYear
{
key AccountingDocument as AccountingDocument,
key AccountingDocumentItem as AccountingDocumentItem,
key FiscalYear as FiscalYear,
key CompanyCode as CompanyCode,
case
when ReferenceDocumentType = 'RMRP'
then left(OriginalReferenceDocument,10)
else ''
end as InvoiceNumber,
ReferenceDocumentType as InvoiceType,
AmountInTransactionCurrency as InvoiceDocumentAmount,
TransactionCurrency as TransactionCurrency,
Supplier as Supplier,
AccountingDocumentCategory as AccountingDocumentCategory,
_Supplier.Country as SupplierCountry,
_Supplier.OrganizationBPName1 as SupplierName,
_Supplier.SupplierAccountGroup as SupplierAccountGroup,
_AccountingDocument
}
where ClearingJournalEntry = ''
and FinancialAccountType = 'K'
and DebitCreditCode = 'H'
and AccountingDocumentCategory <> 'D'
and AccountingDocumentCategory <> 'M'
and CompanyCode = $parameters.P_CompanyCode
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONALACCTGDOCITEM",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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