P_FSITEMMAPPINGHEADERDEF

DDL: P_FSITEMMAPPINGHEADERDEF SQL: PFSITEMMAPHDRDEF Type: view COMPOSITE

P_FSITEMMAPPINGHEADERDEF is a Composite CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 30 fields.

Data Sources (9)

SourceAliasJoin Type
P_FSItemMappingHeaderDraft _DraftHeader left_outer
P_FSITEMCOUNT _FSItemCount left_outer
P_FSITEMCOUNT _FSItemCount left_outer
P_FSitemMappingItemCnt _MappingItem left_outer
P_FSITEMMAPPINGITEMCNTD _MappingItem left_outer
P_FSItemUnmappedGLAccountCnt _UnmappedGLAccount left_outer
P_FSITEMUNMAPPEDGLACCOUNTCNTD _UnmappedGLAccount left_outer
I_FSItemMappingRevision A0 from
P_FSItemMappingHeaderDraft A0 union_all

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PFSITEMMAPHDRDEF view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view

Fields (30)

KeyFieldSource TableSource FieldDescription
ConsolidationChartOfAccounts P_FSItemMappingHeaderDraft ConsolidationChartOfAccounts
ChartOfAccounts P_FSItemMappingHeaderDraft ChartOfAccounts
FSItemMappingID P_FSItemMappingHeaderDraft FSItemMappingID
FSItemMappingRevision P_FSItemMappingHeaderDraft FSItemMappingRevision
HasError
SystemMessageText
IsActiveEntity
HasActiveEntity
CreatedByUser P_FSItemMappingHeaderDraft CreatedByUser
CreationDateTime P_FSItemMappingHeaderDraft CreationDateTime
LastChangeByUser P_FSItemMappingHeaderDraft LastChangeByUser
LastChangeDateTime P_FSItemMappingHeaderDraft LastChangeDateTime
TotalNmbrOfMappedGLAccounts P_FSITEMMAPPINGITEMCNTD TotalNmbrOfMappedGLAccounts
TotalNmbrOfNotMappedGLAccounts P_FSITEMUNMAPPEDGLACCOUNTCNTD TotalNmbrOfNotMappedGLAccounts
ConsolidationChartOfAccounts P_FSItemMappingHeaderDraft ConsolidationChartOfAccounts
ChartOfAccounts P_FSItemMappingHeaderDraft ChartOfAccounts
FSItemMappingID P_FSItemMappingHeaderDraft FSItemMappingID
FSItemMappingRevision P_FSItemMappingHeaderDraft FSItemMappingRevision
HasError
SystemMessageText
IsActiveEntity
HasActiveEntity HasActiveEntity
HasDraftEntity
CreatedByUser CreatedByUser
CreationDateTime CreationDateTime
LastChangeByUser LastChangeByUser
LastChangeDateTime LastChangeDateTime
TotalNmbrOfMappedGLAccounts P_FSITEMMAPPINGITEMCNTD TotalNmbrOfMappedGLAccounts
TotalNmbrOfNotMappedGLAccounts P_FSITEMUNMAPPEDGLACCOUNTCNTD TotalNmbrOfNotMappedGLAccounts
TotalNmbrOfFinStmntItems P_FSITEMCOUNT TotalNmbrOfFinStmntItems
@AbapCatalog.sqlViewName: 'PFSITEMMAPHDRDEF'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED

@ObjectModel.usageType: {
  dataClass: #MIXED,
  serviceQuality: #D,
  sizeCategory: #XL
}

define view P_FSITEMMAPPINGHEADERDEF
  as select from    I_FSItemMappingRevision      as A0
    left outer join P_FSItemUnmappedGLAccountCnt as _UnmappedGLAccount on  A0.ConsolidationChartOfAccounts = _UnmappedGLAccount.ConsolidationChartOfAccounts
                                                                       and A0.ChartOfAccounts              = _UnmappedGLAccount.ChartOfAccounts
                                                                       and A0.FSItemMappingID              = _UnmappedGLAccount.FSItemMappingID
                                                                       and A0.FSItemMappingRevision        = _UnmappedGLAccount.FSItemMappingRevision
//    left outer join P_FSItemUnmappedFSItemCnt    as _UnmappedFSItem    on  A0.ConsolidationChartOfAccounts = _UnmappedFSItem.ConsolidationChartOfAccounts

//                                                                       and A0.ChartOfAccounts              = _UnmappedFSItem.ChartOfAccounts

//                                                                       and A0.FSItemMappingID              = _UnmappedFSItem.FSItemMappingID

//                                                                       and A0.FSItemMappingRevision        = _UnmappedFSItem.FSItemMappingRevision

//

    left outer join P_FSITEMCOUNT                as _FSItemCount       on  A0.ConsolidationChartOfAccounts = _FSItemCount.ConsolidationChartOfAccounts
    left outer join P_FSitemMappingItemCnt       as _MappingItem       on  A0.ConsolidationChartOfAccounts = _MappingItem.ConsolidationChartOfAccounts
                                                                       and A0.ChartOfAccounts              = _MappingItem.ChartOfAccounts
                                                                       and A0.FSItemMappingID              = _MappingItem.FSItemMappingID
                                                                       and A0.FSItemMappingRevision        = _MappingItem.FSItemMappingRevision
    left outer join P_FSItemMappingHeaderDraft   as _DraftHeader       on  A0.ConsolidationChartOfAccounts = _DraftHeader.ConsolidationChartOfAccounts
                                                                       and A0.ChartOfAccounts              = _DraftHeader.ChartOfAccounts
                                                                       and A0.FSItemMappingID              = _DraftHeader.FSItemMappingID
                                                                       and A0.FSItemMappingRevision        = _DraftHeader.FSItemMappingRevision
                                                                       and _DraftHeader.access_type        = '0'
  //  association [1..1] to I_FSItemMapping              as _Mapping       on  $projection.FSItemMappingID = _Mapping.FSItemMappingID

  //

  //  association [1..1] to I_FSItemMappingRevision      as _Revision      on  $projection.ConsolidationChartOfAccounts = _Revision.ConsolidationChartOfAccounts

  //                                                                       and $projection.FSItemMappingID              = _Revision.FSItemMappingID

  //                                                                       and $projection.ChartOfAccounts              = _Revision.ChartOfAccounts

  //                                                                       and $projection.FSItemMappingRevision        = _Revision.FSItemMappingRevision



{
  key cast(concat(
    concat(
     concat('~', A0.ConsolidationChartOfAccounts),
     concat('~', A0.ChartOfAccounts)),
    concat(
     concat('~', A0.FSItemMappingID),
     concat('~', A0.FSItemMappingRevision))) as char32) as FSItemMappingUUID,

      A0.ConsolidationChartOfAccounts,

      A0.ChartOfAccounts,

      A0.FSItemMappingID,

      A0.FSItemMappingRevision,



      cast('' as boole_d)                               as HasError,

      cast('' as char255)                               as SystemMessageText,

      cast('X' as boole_d)                              as IsActiveEntity,

      cast('' as boole_d)                               as HasActiveEntity,

      cast(case when _DraftHeader.FSItemMappingID is null then ''
                else 'X' end as boole_d)                as HasDraftEntity,
      //      cast('' as boole_d) as HasDraftEntity,


      A0.CreatedByUser,
      A0.CreationDateTime,
      A0.LastChangeByUser,
      A0.LastChangeDateTime,

      //      _Mapping._Text[1: Language = $session.system_language].FSItemMappingName,


      //      _Revision._Text[1: Language = $session.system_language].FSItemMappingRevisionText,


      //      @DefaultAggregation: #SUM

      _MappingItem.TotalNmbrOfMappedGLAccounts,

      //      @DefaultAggregation: #SUM

      _UnmappedGLAccount.TotalNmbrOfNotMappedGLAccounts,

      _FSItemCount.TotalNmbrOfFinStmntItems
      //      @DefaultAggregation: #SUM

//      _UnmappedFSItem.TotalNumberOfNotMappedFSItem


}

union all select from P_FSItemMappingHeaderDraft    as A0
  left outer join     P_FSITEMUNMAPPEDGLACCOUNTCNTD as _UnmappedGLAccount on  A0.ConsolidationChartOfAccounts = _UnmappedGLAccount.ConsolidationChartOfAccounts
                                                                          and A0.ChartOfAccounts              = _UnmappedGLAccount.ChartOfAccounts
                                                                          and A0.FSItemMappingID              = _UnmappedGLAccount.FSItemMappingID
                                                                          and A0.FSItemMappingRevision        = _UnmappedGLAccount.FSItemMappingRevision
                                                                          and _UnmappedGLAccount.access_type  = '0'
//  left outer join     P_FSITEMUNMAPPEDFSITEMCNTD    as _UnmappedFSItem    on  A0.ConsolidationChartOfAccounts = _UnmappedFSItem.consolidationchartofaccounts

//                                                                          and A0.ChartOfAccounts              = _UnmappedFSItem.chartofaccounts

//                                                                          and A0.FSItemMappingID              = _UnmappedFSItem.fsitemmappingid

//                                                                          and A0.FSItemMappingRevision        = _UnmappedFSItem.fsitemmappingrevision

//                                                                          and _UnmappedFSItem.access_type     = '0'


  left outer join P_FSITEMCOUNT                as _FSItemCount       on  A0.ConsolidationChartOfAccounts = _FSItemCount.ConsolidationChartOfAccounts
  left outer join     P_FSITEMMAPPINGITEMCNTD       as _MappingItem       on  A0.ConsolidationChartOfAccounts = _MappingItem.ConsolidationChartOfAccounts
                                                                          and A0.ChartOfAccounts              = _MappingItem.ChartOfAccounts
                                                                          and A0.FSItemMappingID              = _MappingItem.FSItemMappingID
                                                                          and A0.FSItemMappingRevision        = _MappingItem.FSItemMappingRevision
                                                                          and _MappingItem.access_type        = '0'
{
  key DraftUUID                               as FSItemMappingUUID,

      A0.ConsolidationChartOfAccounts,

      A0.ChartOfAccounts,

      A0.FSItemMappingID,

      A0.FSItemMappingRevision,


      cast('' as boole_d)                     as HasError,

      cast('' as char255)                     as SystemMessageText,

      cast('' as boole_d)                     as IsActiveEntity,

      HasActiveEntity                         as HasActiveEntity,

      cast('' as boole_d)                     as HasDraftEntity,

      CreatedByUser,
      CreationDateTime,
      LastChangeByUser,
      LastChangeDateTime,

      //      fsitemmappingname,


      //      fsitemmappingrevisiontext,


      //      @DefaultAggregation: #SUM

      _MappingItem.TotalNmbrOfMappedGLAccounts,

      //      @DefaultAggregation: #SUM

      _UnmappedGLAccount.TotalNmbrOfNotMappedGLAccounts,

      _FSItemCount.TotalNmbrOfFinStmntItems

      //      @DefaultAggregation: #SUM

//      _UnmappedFSItem.TotalNumberOfNotMappedFSItem


}
where
  A0.access_type = '0'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FSITEMMAPPINGREVISION",
"P_FSITEMCOUNT",
"P_FSITEMMAPPINGHEADERDRAFT",
"P_FSITEMMAPPINGITEMCNT",
"P_FSITEMMAPPINGITEMCNTD",
"P_FSITEMUNMAPPEDGLACCOUNTCNT",
"P_FSITEMUNMAPPEDGLACCOUNTCNTD"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/