P_UnrealizedCrcyDiffFilter

DDL: P_UNREALIZEDCRCYDIFFFILTER SQL: PUNCRCYDIFFFTR Type: view COMPOSITE

P_UnrealizedCrcyDiffFilter is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_CshJrnlEntrForUnrlzdCrcyDiff, P_CashFlowItemGLAccountComb, I_Ledger) and exposes 68 fields with key fields OriginSystem, OriginApplication, OriginDocument, OriginTransaction, OriginTransactionQualifier.

Data Sources (3)

SourceAliasJoin Type
I_CshJrnlEntrForUnrlzdCrcyDiff flow from
P_CashFlowItemGLAccountComb gl inner
I_Ledger ledger inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PUNCRCYDIFFFTR view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.compiler.compareFilter true view

Fields (68)

KeyFieldSource TableSource FieldDescription
KEY OriginSystem
KEY OriginApplication
KEY OriginDocument
KEY OriginTransaction
KEY OriginTransactionQualifier
KEY CashFlow
KEY ValidFrom
KEY ValidTo
KEY CashFlowScopeForAccounting P_CashFlowItemGLAccountComb CashFlowScopeForAccounting
KEY CashFlowID
CashFlowSnapshotValue
IsValid
CreatedByUser
CreationDateTime
LastChangedByUser
LastChangeDateTime
CashTransactionOwner
CompanyCode I_CshJrnlEntrForUnrlzdCrcyDiff CompanyCode
TransactionDate
CertaintyLevel
TransactionCurrency I_CshJrnlEntrForUnrlzdCrcyDiff TransactionCurrency
AmountInTransactionCurrency
CompanyCodeCurrency
AmountInCompanyCodeCurrency
BankAccountCurrency
CashReleaseStatus
AccountingDocument
AccountingDocumentItem
FiscalYear I_CshJrnlEntrForUnrlzdCrcyDiff FiscalYear
PostingFiscalPeriod
AccountingDocumentType I_CshJrnlEntrForUnrlzdCrcyDiff AccountingDocumentType
PaymentMethod
GLAccount I_CshJrnlEntrForUnrlzdCrcyDiff GLAccount
FinancialAccountType I_CshJrnlEntrForUnrlzdCrcyDiff FinancialAccountType
DocumentItemText I_CshJrnlEntrForUnrlzdCrcyDiff DocumentItemText
PostingDate
CashPlanningGroup I_CshJrnlEntrForUnrlzdCrcyDiff CashPlanningGroup
PlanningLevel I_CshJrnlEntrForUnrlzdCrcyDiff PlanningLevel
HouseBank I_CshJrnlEntrForUnrlzdCrcyDiff HouseBank
HouseBankAccount I_CshJrnlEntrForUnrlzdCrcyDiff HouseBankAccount
BankAccountInternalID I_CshJrnlEntrForUnrlzdCrcyDiff BankAccountInternalID
Customer I_CshJrnlEntrForUnrlzdCrcyDiff Customer
Supplier I_CshJrnlEntrForUnrlzdCrcyDiff Supplier
BusinessPartner
Material I_CshJrnlEntrForUnrlzdCrcyDiff Material
BusinessArea I_CshJrnlEntrForUnrlzdCrcyDiff BusinessArea
ProfitCenter I_CshJrnlEntrForUnrlzdCrcyDiff ProfitCenter
WBSElementInternalID WBSElementInternalID
PartnerCompany I_CshJrnlEntrForUnrlzdCrcyDiff PartnerCompany
CostCenter I_CshJrnlEntrForUnrlzdCrcyDiff CostCenter
Segment I_CshJrnlEntrForUnrlzdCrcyDiff Segment
LiquidityItem I_CshJrnlEntrForUnrlzdCrcyDiff LiquidityItem
SourceCompanyCode
Fund I_CshJrnlEntrForUnrlzdCrcyDiff Fund
GrantID I_CshJrnlEntrForUnrlzdCrcyDiff GrantID
FinancialInstrumentProductType
FinancialTransactionType
SecurityClass
SecurityAccount
AssetContract
Portfolio
ExpirationDate
NetDueDate
OriginTransactionValue
OriginFlowID
OriginDocumentValue
BankStatementShortID
BankStatementItem
@AbapCatalog.sqlViewName: 'PUNCRCYDIFFFTR'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.compiler.compareFilter:true
define view P_UnrealizedCrcyDiffFilter
  as select from I_CshJrnlEntrForUnrlzdCrcyDiff as flow
    inner join   I_Ledger                       as ledger on  flow.Ledger            = ledger.Ledger
                                                          and ledger.IsLeadingLedger = 'X'
    inner join   P_CashFlowItemGLAccountComb    as gl     on  flow.CompanyCode = gl.CompanyCode
                                                          and flow.GLAccount   = gl.GLAccount

{
  key     cast('' as logsys )                                                                                                           as OriginSystem,
  key     cast('FCV' as fqm_origin_application )                                                                                        as OriginApplication,
  key     cast(concat(flow.AccountingDocument,concat(flow.CompanyCode,flow.FiscalYear)) as fqm_origin_doc_id )                          as OriginDocument,
  key     cast(concat(flow.CompanyCode,concat('-',concat(flow.FiscalYear,concat('-',flow.AccountingDocument)))) as fqm_origin_trans_id) as OriginTransaction,
  key     cast('' as fqm_origin_trans_qualifier)                                                                                        as OriginTransactionQualifier,
  key     cast(flow.LedgerGLLineItem as fqm_origin_flow_id)                                                                             as CashFlow,
  key     cast('19000101000001' as timestampl)                                                                                          as ValidFrom,
  key     cast('99991231235959' as timestampl)                                                                                          as ValidTo,
  key     gl.CashFlowScopeForAccounting,
  key     cast('' as fqm_flow_id)                                                                                                       as CashFlowID,

          // general fields

          cast('19000101000001.0000000' as abap.char(27))                                                                               as CashFlowSnapshotValue,
          cast('X' as boolean)                                                                                                          as IsValid,
          cast(flow.AccountingDocCreatedByUser as fclm_bam_created_by)                                                                  as CreatedByUser,
          cast('19000101000001' as timestamp)                                                                                           as CreationDateTime,
          cast('' as fclm_bam_lastchgby)                                                                                                as LastChangedByUser,
          cast('19000101000001' as timestamp)                                                                                           as LastChangeDateTime,
          cast('FCV' as fqm_owner)                                                                                                      as CashTransactionOwner,
          flow.CompanyCode,
          cast(case when flow.TransactionDate = '' then '00000000' else flow.TransactionDate end as valut )                             as TransactionDate,
          cast('ACTUAL' as fqm_certainty_level)                                                                                         as CertaintyLevel,
          @Semantics.currencyCode: true
          flow.TransactionCurrency,
          @Semantics.amount.currencyCode: 'TransactionCurrency'
          @DefaultAggregation: #SUM
          cast(flow.AmountInTransactionCurrency as fclm_cp_trans_amount preserving type )                                               as AmountInTransactionCurrency,
          @Semantics.currencyCode: true
          cast(flow.CompanyCodeCurrency as fclm_cp_local_waers preserving type )                                                        as CompanyCodeCurrency,
          @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
          @DefaultAggregation: #SUM
          cast(flow.AmountInCompanyCodeCurrency as fclm_cp_local_amount preserving type )                                               as AmountInCompanyCodeCurrency,
          cast(flow.BankAccountCurrency as fclm_bank_acct_currency preserving type )                                                    as BankAccountCurrency,
          cast('' as fqm_release_status)                                                                                                as CashReleaseStatus,

          // accouting fields

          cast(flow.AccountingDocument as fis_belnr preserving type )                                                                   as AccountingDocument,
          cast(substring(cast(flow.LedgerGLLineItem as abap.char( 6 )),4,3) as fclm_cp_buzei  )                                         as AccountingDocumentItem,
          flow.FiscalYear,
          cast(cast(flow.FiscalPeriod as abap.char( 2 )  ) as monat)                                                                    as PostingFiscalPeriod,
          flow.AccountingDocumentType,
          cast('' as fqm_payment_method)                                                                                                as PaymentMethod,
          flow.GLAccount,
          flow.FinancialAccountType,
          flow.DocumentItemText,
          cast(case when flow.PostingDate = '' then '00000000' else flow.PostingDate end as budat )                                     as PostingDate,
          flow.CashPlanningGroup,
          flow.PlanningLevel,

          // bank fields

          flow.HouseBank,
          flow.HouseBankAccount,
          flow.BankAccountInternalID,

          // account assignment

          flow.Customer,
          flow.Supplier,
          cast('' as bu_partner)                                                                                                        as BusinessPartner,
          flow.Material,
          flow.BusinessArea,
          flow.ProfitCenter,
          WBSElementInternalID,
          flow.PartnerCompany,
          flow.CostCenter,
          flow.Segment,
          flow.LiquidityItem,
          cast('' as bukrs)                                                                                                             as SourceCompanyCode,
          flow.Fund,
          flow.GrantID,

          // trm fields

          cast('' as vvsart)                                                                                                            as FinancialInstrumentProductType,
          cast('' as tb_sfhaart)                                                                                                        as FinancialTransactionType,
          cast('' as vvranlw)                                                                                                           as SecurityClass,
          cast('' as rldepo)                                                                                                            as SecurityAccount,
          cast('' as vertnr )                                                                                                           as AssetContract,
          cast('' as rportb)                                                                                                            as Portfolio,
          cast('99991231' as datum)                                                                                                     as ExpirationDate,
          cast('99991231' as datum)                                                                                                     as NetDueDate,

          //Calculated fields

          cast(concat(flow.CompanyCode,concat('-',concat(flow.FiscalYear,concat('-',flow.AccountingDocument)))) as fqm_origin_trans_id) as OriginTransactionValue,
          cast(flow.LedgerGLLineItem as fqm_origin_flow_id)                                                                             as OriginFlowID,

          cast(flow.AccountingDocument as fclm_cp_doc_id )                                                                              as OriginDocumentValue,
          '00000000'                                                                                                                    as BankStatementShortID,

          '00000'                                                                                                                       as BankStatementItem

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CSHJRNLENTRFORUNRLZDCRCYDIFF",
"I_LEDGER",
"P_CASHFLOWITEMGLACCOUNTCOMB"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/