P_DMVCEdgeSemanticTag

DDL: P_DMVCEDGESEMANTICTAG SQL: PDMVCEDGESEMTAG Type: view COMPOSITE

P_DMVCEdgeSemanticTag is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItemSemTag, P_DMVCGLAccLineItemEdge) and exposes 24 fields with key fields MaterialValueChainNodeFrom, MaterialValueChainNodeTo, CompanyCode, AccountingDocument, LedgerGLLineItem.

Data Sources (2)

SourceAliasJoin Type
I_GLAccountLineItemSemTag _SemTag inner
P_DMVCGLAccLineItemEdge P_DMVCGLAccLineItemEdge from

Parameters (4)

NameTypeDefault
P_DateFrom calendardate
P_DateTo calendardate
P_CurrencyType fins_curtype
P_Ledger fins_ledger

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PDMVCEDGESEMTAG view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY MaterialValueChainNodeFrom MaterialValueChainNodeFrom
KEY MaterialValueChainNodeTo MaterialValueChainNodeTo
KEY CompanyCode I_GLAccountLineItemSemTag CompanyCode
KEY AccountingDocument I_GLAccountLineItemSemTag AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItemSemTag LedgerGLLineItem
KEY GLAccountHierarchy I_GLAccountLineItemSemTag GLAccountHierarchy
KEY SemanticTag I_GLAccountLineItemSemTag SemanticTag
KEY ValidityStartDate I_GLAccountLineItemSemTag ValidityStartDate
KEY ValidityEndDate I_GLAccountLineItemSemTag ValidityEndDate
SemanticTagName
Currency _Edge Currency
Ledger Ledger
FinancialAccountType FinancialAccountType
BusinessArea BusinessArea
FunctionalArea I_GLAccountLineItemSemTag FunctionalArea
Segment Segment
GLAccountAuthorizationGroup
SupplierAuthznGrp
CustomerAuthznGrp
AcctgDocTypeAuthorizationGroup
ProfitCenter ProfitCenter
ControllingArea ControllingArea
GLAccount GLAccount
ProfitCtrResponsibleUser
@AbapCatalog.sqlViewName: 'PDMVCEDGESEMTAG'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
@VDM.private:true
define view P_DMVCEdgeSemanticTag
  with parameters
    P_DateFrom     : calendardate,
    P_DateTo       : calendardate,
    P_CurrencyType : fins_curtype,
    P_Ledger       : fins_ledger
  as select from P_DMVCGLAccLineItemEdge(P_DateFrom     : $parameters.P_DateFrom, 
                                         P_DateTo       : $parameters.P_DateTo, 
                                         P_CurrencyType : $parameters.P_CurrencyType, 
                                         P_Ledger       : $parameters.P_Ledger) as _Edge

    inner join   I_GLAccountLineItemSemTag  as _SemTag  on _SemTag.AccountingDocument = _Edge.AccountingDocument
                                                       and _SemTag.CompanyCode        = _Edge.CompanyCode
                                                       and _SemTag.LedgerGLLineItem   = _Edge.LedgerGLLineItem
                                                       and _SemTag.Ledger             = $parameters.P_Ledger
{

  key MaterialValueChainNodeFrom,
  key MaterialValueChainNodeTo,
  key _SemTag.CompanyCode,
  key _SemTag.AccountingDocument,
  key _SemTag.LedgerGLLineItem,
  key _SemTag.GLAccountHierarchy,
  @ObjectModel.text.element: 'SemanticTagName'
  key _SemTag.SemanticTag,
  key _SemTag.ValidityStartDate,
  key _SemTag.ValidityEndDate,

      @Semantics.amount.currencyCode : 'Currency'
      cast( currency_conversion(
                amount => _SemTag.AmountInCompanyCodeCurrency,
                source_currency => _SemTag.CompanyCodeCurrency,
                target_currency => _Edge.Currency,
                exchange_rate_date => $parameters.P_DateTo,
                exchange_rate_type => 'M'
            ) as  fins_vhcur12 )                                        as Amount,

      @Semantics.text: true
      _SemTag._SemanticTag._Text[ Language = $session.system_language ].SemanticTagName,

      @Semantics.currencyCode: true
      _Edge.Currency,

// DLC    

      Ledger,
      FinancialAccountType,
      BusinessArea,
      _SemTag.FunctionalArea                                            as FunctionalArea,
      Segment,
      _SemTag._GLAccountInCompanyCode.AuthorizationGroup                as GLAccountAuthorizationGroup,
      _SemTag._Supplier.AuthorizationGroup                              as SupplierAuthznGrp,
      _SemTag._Customer.AuthorizationGroup                              as CustomerAuthznGrp,
      _SemTag._AccountingDocumentType.AuthorizationGroup                as AcctgDocTypeAuthorizationGroup, 
      ProfitCenter,
      ControllingArea,
      GLAccount,
      _SemTag._CurrentProfitCenter.ProfitCtrResponsibleUser             as ProfitCtrResponsibleUser
      
}
where
      _SemTag.PostingDate >= $parameters.P_DateFrom
  and _SemTag.PostingDate <= $parameters.P_DateTo
  and _SemTag.Ledger      = $parameters.P_Ledger
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_CUSTOMER",
"I_GLACCOUNTINCOMPANYCODE",
"I_GLACCOUNTLINEITEMSEMTAG",
"I_PROFITCENTER",
"I_SEMANTICTAG",
"I_SEMANTICTAGTEXT",
"I_SUPPLIER",
"P_DMVCGLACCLINEITEMEDGE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/