P_ForeignCurrencySuspicious

DDL: P_FOREIGNCURRENCYSUSPICIOUS SQL: PFCSCASE Type: view COMPOSITE

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)

SourceAliasJoin Type
I_OperationalAcctgDocItem I_OperationalAcctgDocItem from

Parameters (1)

NameTypeDefault
P_CompanyCode bukrs

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_AccountingDocument _AccountingDocument $projection.CompanyCode = _AccountingDocument.CompanyCode and $projection.AccountingDocument = _AccountingDocument.AccountingDocument and $projection.FiscalYear = _AccountingDocument.FiscalYear

Annotations (10)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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":""
}
}*/