C_CommoditySubAccountTP

DDL: C_COMMODITYSUBACCOUNTTP SQL: CCMMDTYSUBACCTTP Type: view CONSUMPTION

Commodity Subaccount

C_CommoditySubAccountTP is a Consumption CDS View that provides data about "Commodity Subaccount" in SAP S/4HANA. It reads from 6 data sources and exposes 26 fields. It has 8 associations to related views.

Data Sources (6)

SourceAliasJoin Type
I_CmmdtySubAcctStatusText CmmdtySubAcctStatusText left_outer
I_CompanyCode CompanyCode left_outer
I_CmmdtyDrvtvOrderUserDetails CreatedByUser left_outer
I_CmmdtyDrvtvOrderUserDetails LastChangedByUser left_outer
I_CommoditySubAccountTP SubAccount from
I_CmmdtySubAcctFootPrint SubAcctFootPrint left_outer

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_CmmdtyCoCodePrftCtrVH _CompanyCodeProfitCenter $projection.CompanyCode = _CompanyCodeProfitCenter.CompanyCode and $projection.ProfitCenter = _CompanyCodeProfitCenter.ProfitCenter --
[0..1] I_CmmdtyFutrAcctPrtfloVH _FutureAccountPortfolio $projection.CompanyCode = _FutureAccountPortfolio.CompanyCode and $projection.FuturesAccount = _FutureAccountPortfolio.FuturesAccount and $projection.Portfolio = _FutureAccountPortfolio.Portfolio --
[0..1] I_CmmdtyDrvtvContrMicPhys _DcsMicCommodity $projection.DerivativeContrSpecification = _DcsMicCommodity.DerivativeContrSpecification and $projection.MarketIdentifierCode = _DcsMicCommodity.MarketIdentifierCode and $projection.Commodity = _DcsMicCommodity.Commodity --
[0..1] I_CmmdtyOrdReqCounterpartyVH _CounterpartyVH $projection.Counterparty = _CounterpartyVH.BusinessPartner --
[0..1] I_CmmdtySubAcctBrokerVH _CmmdtySubAcctBrokerVH $projection.CommodityDerivativeBroker = _CmmdtySubAcctBrokerVH.BusinessPartner --
[0..1] I_CmmdtySubAcctClrgAcctVH _CmmdtySubAcctClrgAcctVH $projection.CommodityDerivativeBroker = _CmmdtySubAcctClrgAcctVH.CommodityDerivativeBroker and $projection.CmmdtySubAcctClearingAccount = _CmmdtySubAcctClrgAcctVH.CmmdtySubAcctClearingAccount
[0..*] C_HierRuntimeRprstnDplLeafNode _ProfitCenterHierLeafNode $projection.ProfitCenter = _ProfitCenterHierLeafNode.UnivHierarchyBusinessEntity and $projection.ControllingArea = _ProfitCenterHierLeafNode.HierarchyNodeClass and _ProfitCenterHierLeafNode.ValidityStartDate <= $session.system_date and _ProfitCenterHierLeafNode.ValidityEndDate >= $session.system_date and _ProfitCenterHierLeafNode.HierarchyType = '0106' -- Extension View for Free Characteristics
[1..1] E_CommoditySubAccount _Extension $projection.CommoditySubAccountUUID = _Extension.CommoditySubAccountUUID

Annotations (24)

NameValueLevelField
AbapCatalog.sqlViewName CCMMDTYSUBACCTTP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Commodity Subaccount view
VDM.viewType #CONSUMPTION view
Search.searchable true view
Metadata.allowExtensions true view
ClientHandling.type #CLIENT_DEPENDENT view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.compositionRoot true view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled EXTERNAL_CALCULATION view
ObjectModel.deleteEnabled EXTERNAL_CALCULATION view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
UI.presentationVariant.sortOrder.by CommoditySubAccount view
UI.presentationVariant.sortOrder.direction #DESC view
UI.headerInfo.title.value CommoditySubAccountName view
UI.headerInfo.description.value CompanyCode view
UI.lineItem.criticality CmmdtyDrvtvOrdTrdExecIsRecent view

Fields (26)

KeyFieldSource TableSource FieldDescription
CommoditySubAccountasCommoditySubAccount
CompanyCodeasCompanyCode
CompanyCodeNameasCompanyCodeName
FuturesAccountasFuturesAccount
FuturesAccountNameasFuturesAccountName
CommodityasCommodity
CommodityNameasCommodityName
PortfolioasPortfolio
PortfolioNameasPortfolioName
ControllingArea I_CompanyCode ControllingArea
ProfitCenterasProfitCenter
ProfitCenterNameasProfitCenterName
ProfitCenterHierarchy
ProfitCenterHierarchyNode
CounterpartyasCounterparty
CreationDateTimeasCreationDateTime
CreatedByUserasCreatedByUser
LastChangeDateTimeasLastChangeDateTime
LastChangedByUserasLastChangedByUser
Associations_CompanyCodeProfitCenter
_FutureAccountPortfolio _FutureAccountPortfolio
_DcsMicCommodity _DcsMicCommodity
_CounterpartyVH _CounterpartyVH
_CmmdtySubAcctBrokerVH _CmmdtySubAcctBrokerVH
_CmmdtySubAcctClrgAcctVH _CmmdtySubAcctClrgAcctVH
_ProfitCenterHierLeafNode _ProfitCenterHierLeafNode
@AbapCatalog.sqlViewName                : 'CCMMDTYSUBACCTTP'
@AbapCatalog.compiler.compareFilter     : true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck       : #CHECK
@AccessControl.personalData.blocking    : #REQUIRED
@EndUserText.label                      : 'Commodity Subaccount'
@VDM.viewType                           : #CONSUMPTION
@Search.searchable                      : true
@Metadata.allowExtensions               : true
@ClientHandling: {
   type                                 : #CLIENT_DEPENDENT,
   algorithm                            : #SESSION_VARIABLE
}

-- Business Object Model for Commodity Subaccount
@ObjectModel: {
    compositionRoot                     : true,
    transactionalProcessingDelegated    : true,
    createEnabled                       : true,
    updateEnabled                       : 'EXTERNAL_CALCULATION',
    deleteEnabled                       : 'EXTERNAL_CALCULATION',
    semanticKey                         : ['CommoditySubAccount'],
    usageType: {
        serviceQuality                  : #D,
        sizeCategory                    : #XL,
        dataClass                       : #MIXED
    }
}

-- Display Selection Filter Variant for Inactive/Active/Invalidated Status of Sub Account in Overview Page
@UI.selectionVariant: [
    { qualifier: 'Inactive',    text: 'Inactive',    filter: 'CmmdtySubAccountStatus EQ "01"' },
    { qualifier: 'Active',      text: 'Active',      filter: 'CmmdtySubAccountStatus EQ "02"' },
    { qualifier: 'Invalidated', text: 'Invalidated', filter: 'CmmdtySubAccountStatus EQ "03"' } ]

-- Sort Sub Account ID In Descending Order in Overview Page
@UI.presentationVariant:{
    groupBy         : [  'CommoditySubAccount' ],
    requestAtLeast  : [ 'CommoditySubAccount','CmmdtyDrvtvOrdTrdExecIsRecent' ],
    sortOrder:{
        by: 'CommoditySubAccount',
        direction: #DESC
    }}

-- Header Title for Sub Account ID & Company Code in details page
@UI.headerInfo : { title: {
        value: 'CommoditySubAccountName'
    },
     description: {
        value: 'CompanyCode'
    }
}

@UI.lineItem.criticality: 'CmmdtyDrvtvOrdTrdExecIsRecent'

-- Consumption View for Commodity Subaccount
define view C_CommoditySubAccountTP
  as select from    I_CommoditySubAccountTP       as SubAccount

  -- To get text for Company Code Name
    left outer join I_CompanyCode                 as CompanyCode             on SubAccount.CompanyCode = CompanyCode.CompanyCode

  -- To get text for Commodity Subaccount Status
    left outer join I_CmmdtySubAcctStatusText     as CmmdtySubAcctStatusText on  SubAccount.CmmdtySubAccountStatus = CmmdtySubAcctStatusText.CmmdtySubAccountStatus
                                                                             and CmmdtySubAcctStatusText.Language  = $session.system_language

  -- To get Subaccount FootPrint details
    left outer join I_CmmdtySubAcctFootPrint      as SubAcctFootPrint        on SubAcctFootPrint.CommoditySubAccount = SubAccount.CommoditySubAccount

  -- To get Created by user full name
    left outer join I_CmmdtyDrvtvOrderUserDetails as CreatedByUser           on SubAccount.CreatedByUser = CreatedByUser.UserID

  -- To get Last changed by user full name
    left outer join I_CmmdtyDrvtvOrderUserDetails as LastChangedByUser       on SubAccount.LastChangedByUser = LastChangedByUser.UserID

  -- Association to get search help value for Company Code & Profit Center
  association [0..1] to I_CmmdtyCoCodePrftCtrVH        as _CompanyCodeProfitCenter  on  $projection.CompanyCode  = _CompanyCodeProfitCenter.CompanyCode
                                                                                    and $projection.ProfitCenter = _CompanyCodeProfitCenter.ProfitCenter

  -- Association to get search help value for Company Code & Future Account
  association [0..1] to I_CmmdtyFutrAcctPrtfloVH       as _FutureAccountPortfolio   on  $projection.CompanyCode    = _FutureAccountPortfolio.CompanyCode
                                                                                    and $projection.FuturesAccount = _FutureAccountPortfolio.FuturesAccount
                                                                                    and $projection.Portfolio      = _FutureAccountPortfolio.Portfolio

  -- Association to get search help value for Commodity, DCS ID & Market Identifier Code ( MIC )
  association [0..1] to I_CmmdtyDrvtvContrMicPhys      as _DcsMicCommodity          on  $projection.DerivativeContrSpecification = _DcsMicCommodity.DerivativeContrSpecification
                                                                                    and $projection.MarketIdentifierCode         = _DcsMicCommodity.MarketIdentifierCode
                                                                                    and $projection.Commodity                    = _DcsMicCommodity.Commodity

  -- Association to get Counter Party F4 Values
  association [0..1] to I_CmmdtyOrdReqCounterpartyVH   as _CounterpartyVH           on  $projection.Counterparty = _CounterpartyVH.BusinessPartner

  -- Association to get text for Broker Text
  association [0..1] to I_CmmdtySubAcctBrokerVH        as _CmmdtySubAcctBrokerVH    on  $projection.CommodityDerivativeBroker = _CmmdtySubAcctBrokerVH.BusinessPartner

  -- Association to get Value Help for Clearing Accounts
  association [0..1] to I_CmmdtySubAcctClrgAcctVH      as _CmmdtySubAcctClrgAcctVH  on  $projection.CommodityDerivativeBroker    = _CmmdtySubAcctClrgAcctVH.CommodityDerivativeBroker
                                                                                    and $projection.CmmdtySubAcctClearingAccount = _CmmdtySubAcctClrgAcctVH.CmmdtySubAcctClearingAccount

  association [0..*] to C_HierRuntimeRprstnDplLeafNode as _ProfitCenterHierLeafNode on  $projection.ProfitCenter                    = _ProfitCenterHierLeafNode.UnivHierarchyBusinessEntity
                                                                                    and $projection.ControllingArea                 = _ProfitCenterHierLeafNode.HierarchyNodeClass
                                                                                    and _ProfitCenterHierLeafNode.ValidityStartDate <= $session.system_date
                                                                                    and _ProfitCenterHierLeafNode.ValidityEndDate   >= $session.system_date
                                                                                    and _ProfitCenterHierLeafNode.HierarchyType     = '0106'

  -- Extension View for Free Characteristics
  association [1..1] to E_CommoditySubAccount          as _Extension                on  $projection.CommoditySubAccountUUID = _Extension.CommoditySubAccountUUID
{

      @UI.facet: [

      -- UI Header & Item Facets
         {
           purpose:    #HEADER,
           type:       #FIELDGROUP_REFERENCE,
           importance: #HIGH,
           position:   10,
           targetQualifier: 'HeaderInformation'
         },
         {
           purpose:    #HEADER,
           type:       #DATAPOINT_REFERENCE,
           importance: #HIGH,
           position:   20 ,
           targetQualifier: 'CmmdtySubAccountStatusText'
         },
         {
           purpose:    #HEADER,
           type:       #FIELDGROUP_REFERENCE,
           label:      'Invalidation Reason:',
           importance: #HIGH,
           position:   30 ,
           targetQualifier: 'CmmdtySubAccountStatusReason'
         },
         {
           purpose:    #STANDARD,
           id    :     'DetailInformation',
           importance: #HIGH,
           type       : #COLLECTION
         },
         {
           purpose:    #STANDARD,
           label :     'General Information',
           type:       #IDENTIFICATION_REFERENCE,
           importance: #HIGH,
           parentId    : 'DetailInformation',
           position  :   10,
           targetQualifier: 'GeneralInformation'
         },
         {
           purpose:    #STANDARD,
           label :     'Administrative Data',
           type:       #FIELDGROUP_REFERENCE,
           importance: #HIGH,
           parentId    : 'DetailInformation',
           position:   20,
           targetQualifier: 'AdminData'
         }
       ]

      -- BOPF Action buttons for Overview Page
      @UI.lineItem: [
          { type: #FOR_ACTION, position: 10, dataAction: 'BOPF:ACTIVATE_SUB_ACC',
            label: 'Activate', exclude : true } ,
           { type: #FOR_ACTION, position: 20, dataAction: 'BOPF:EDIT_SUB_ACC',
            label: 'Edit', exclude : true },
           { type: #FOR_ACTION, position: 30, dataAction: 'BOPF:DELETE_SUB_ACC',
            label: 'Delete' } //, exclude : true }

           ]

      -------------------------------------------------------------------------------
      -- Commodity Subaccount UUID
      @UI.hidden : true
  key SubAccount.CommoditySubAccountUUID                                                as CommoditySubAccountUUID,

      ----------------------Header Information---------------------------------------

      -- Commodity Subaccount ID
      @UI.lineItem.position: 10
      @UI.fieldGroup: [{
          qualifier   : 'HeaderInformation',
          position    :  10,
          importance  : #HIGH,
          groupLabel  : '{@i18n>HeaderInformation}'
      }]
      @UI.identification.position: 10
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 1.0
      @Search.ranking : #HIGH
      SubAccount.CommoditySubAccount                                                    as CommoditySubAccount,

      ----------------------General Information--------------------------------------

      -- Commodity Subaccount Name
      @UI.lineItem.position: 20
      @UI.identification.position: 20
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 0.8
      @Search.ranking : #HIGH
      SubAccount.CommoditySubAccountName                                                as CommoditySubAccountName,

      -- Company Code
      @UI.lineItem.position: 40
      @UI.identification.position: 30
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 1.0
      @Search.ranking : #HIGH
      @Consumption.valueHelp: '_CompanyCodeProfitCenter'
      @ObjectModel.text.element: 'CompanyCodeName'
      SubAccount.CompanyCode                                                            as CompanyCode,

      --  Company Code Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      CompanyCode.CompanyCodeName                                                       as CompanyCodeName,

      -- Future Account
      @UI.lineItem.position: 30
      @UI.fieldGroup: [{
          qualifier   : 'HeaderInformation',
          position    : 20,
          importance  : #HIGH
      }]
      @UI.identification.position: 40
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 1.0
      @Search.ranking : #HIGH
      @Semantics.text: true
      @ObjectModel.text.element: 'FuturesAccountName'
      @Consumption.valueHelp: '_FutureAccountPortfolio'
      SubAccount.FuturesAccount                                                         as FuturesAccount,

      --  Futures Account Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _FutureAccountPortfolio.FuturesAccountName                                        as FuturesAccountName,

      -- Commodity Subaccount Status Text
      @UI.identification.position: 50
      @ObjectModel.readOnly: true
      @UI.dataPoint: { targetValueElement: 'CmmdtySubAccountStatusText'  }
      cast(CmmdtySubAcctStatusText.CmmdtySubAccountStatusText as
      cmmfsa_subacctstatustext preserving type)                                         as CmmdtySubAccountStatusText,

      -- Commodity Subaccount Status
      @ObjectModel.readOnly: true
      @UI.hidden : true
      SubAccount.CmmdtySubAccountStatus                                                 as CmmdtySubAccountStatus,

      -- Commodity Subaccount Invalidation Reason
      @UI.fieldGroup: [{
          qualifier   : 'CmmdtySubAccountStatusReason',
          position    : 10,
          importance  : #HIGH,
          groupLabel  : '{@i18n>InvalidationReason}'
      }]
      @UI.multiLineText: true
      @Search.defaultSearchElement : false
      SubAccount.CmmdtySubAccountStatusReason                                           as CmmdtySubAccountStatusReason,

      -- Derivative Contract Specifications ( DCS ID )
      @UI.identification.position: 60
      @Consumption.valueHelp: '_DcsMicCommodity'
      @ObjectModel.text.element: 'DerivativeContrSpecName'
      SubAccount.DerivativeContrSpecification                                           as DerivativeContrSpecification,

      --  Derivative Contract Specification Name ( DCS Name)
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _DcsMicCommodity.DerivativeContrSpecName                                          as DerivativeContrSpecName,

      -- Market Identifier Code ( MIC )
      @UI.identification.position: 70
      @Consumption.valueHelp: '_DcsMicCommodity'
      @ObjectModel.text.element: 'MarketIdentifierCodeName'
      SubAccount.MarketIdentifierCode                                                   as MarketIdentifierCode,

      --  Market Identifier Code Name ( MIC Name)
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _DcsMicCommodity.MarketIdentifierCodeName                                         as MarketIdentifierCodeName,

      -- Commodity
      @UI.lineItem.position: 50
      @UI.identification.position: 80
      @UI.selectionField.position: 10
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 1.0
      @Search.ranking : #HIGH
      @Consumption.valueHelp: '_DcsMicCommodity'
      @ObjectModel.text.element: 'CommodityName'
      SubAccount.Commodity                                                              as Commodity,

      --  Commodity Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _DcsMicCommodity.CommodityName                                                    as CommodityName,

      -- Portfolio
      @Consumption.valueHelp: '_FutureAccountPortfolio'
      @ObjectModel.text.element: 'PortfolioName'
      @UI.identification.position: 90
      SubAccount.Portfolio                                                              as Portfolio,

      --  Portfolio Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _FutureAccountPortfolio.PortfolioName                                             as PortfolioName,

      @ObjectModel.readOnly: true
      @UI.hidden : true
      CompanyCode.ControllingArea,

      -- Profit Center
      @UI.lineItem.position: 60
      @UI.selectionField.position: 20
      @Consumption.valueHelp: '_CompanyCodeProfitCenter'
      @UI.identification.position: 100
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 0.8
      @Search.ranking : #HIGH
      @ObjectModel.text.element: 'ProfitCenterName'
      SubAccount.ProfitCenter                                                           as ProfitCenter,

      --  Profit Center Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _CompanyCodeProfitCenter.ProfitCenterName                                         as ProfitCenterName,

      @Consumption.valueHelpDefinition: [{ entity:{ name: 'I_ProfitCenterHierarchyVH', element: 'ProfitCenterHierarchy' } }]
      @Consumption.filter.selectionType: #SINGLE
      @ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
      @ObjectModel.readOnly: true
      cast('' as fis_prctr_hryid_42)                                                    as ProfitCenterHierarchy,

      @Consumption.filter.hidden: true
      @ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
      @ObjectModel.readOnly: true
      cast('' as fis_prctr_hrynid_50)                                                   as ProfitCenterHierarchyNode,

      -- Counterparty
      @UI.hidden : true
      @Consumption.filter.hidden: true
      @Consumption.valueHelp: '_CounterpartyVH'
      @ObjectModel.text.element: 'CounterpartyFullName'
      @Semantics.text: true
      SubAccount.Counterparty                                                           as Counterparty,

      --  Counterparty Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      @Consumption.filter.hidden: true
      _CounterpartyVH.BusinessPartnerFullName                                           as CounterpartyFullName,

      -- Broker
      @Consumption.semanticObject: 'BusinessPartner'
      @UI.identification.semanticObjectAction: 'show'
      @UI.identification.position: 120
      @Search.defaultSearchElement : true
      @Search.fuzzinessThreshold : 0.8
      @Search.ranking : #HIGH
      @Semantics.text: true
      @ObjectModel.foreignKey.association: '_CmmdtySubAcctBrokerVH'
      @Consumption.valueHelp: '_CmmdtySubAcctBrokerVH'
      @ObjectModel.text.element: 'BusinessPartnerFullName'
      SubAccount.CommodityDerivativeBroker                                              as CommodityDerivativeBroker,

      --  Broker Name
      @ObjectModel.readOnly: true
      @UI.hidden : true
      _CmmdtySubAcctBrokerVH.BusinessPartnerFullName                                    as BusinessPartnerFullName,

      -- Reference Broker Account
      @UI.identification.position: 130
      @Semantics.text: true
      SubAccount.ReferenceBrokerAccount                                                 as ReferenceBrokerAccount,

      -- Clearing Account
      @UI.identification.position: 140
      @Semantics.text: true
      @ObjectModel.foreignKey.association: '_CmmdtySubAcctClrgAcctVH'
      @Consumption.valueHelp: '_CmmdtySubAcctClrgAcctVH'
      SubAccount.CmmdtySubAcctClearingAccount                                           as CmmdtySubAcctClearingAccount,

      -- Clearing Key
      @UI.identification.position: 150
      SubAccount.CommoditySubAccountClearingKey                                         as CommoditySubAccountClearingKey,

      -- Subaccount IsBlocked?
      @UI.identification.position: 160
      SubAccount.CmmdtySubAccountIsBlocked                                              as CmmdtySubAccountIsBlocked,

      -- Off footprint/on footprint flag
      @UI.identification.position: 170
      @ObjectModel.readOnly: true
      SubAcctFootPrint.CmmdtySubAccountIsOffFootPrint                                   as CmmdtySubAccountIsOffFootPrint,

      ----------------------Administrative Information-------------------------------------

      -- Creation Date & Time
      @Consumption.filter.hidden: true
      @UI.fieldGroup: [{
          qualifier   : 'AdminData',
          position    : 10,
          importance  : #HIGH,
          groupLabel  : '{@i18n>AdministrativeData}'
      }]
      SubAccount.CreationDateTime                                                       as CreationDateTime,

      @ObjectModel.readOnly: true
      @Consumption.filter : {
        selectionType : #INTERVAL,
        multipleSelections : false
      }
      @UI.fieldGroup: [{
         qualifier   : 'AdminData',
         hidden      : true
      }]

      cast( tstmp_to_dats(   SubAccount.CreationDateTime,
                            abap_system_timezone( $session.client,'NULL' ),
                            $session.client,
                            'NULL'
      ) as  cmmfdof_createdon preserving type)                                          as CreationDateDecimalValue,

      -- Created By Username
      @UI.hidden : true
      @ObjectModel.readOnly: true
      cast(CreatedByUser.FullName as cmmfsa_createdbyusername preserving type )         as CreatedByUserName,
      -- Created By Userid
      @UI.fieldGroup: [{
          qualifier   : 'AdminData',
           position    : 20,
           importance  : #HIGH
       }]
      @ObjectModel.text.element: 'CreatedByUserName'
      SubAccount.CreatedByUser                                                          as CreatedByUser,

      -- Last Change Date & Time
      @Consumption.filter.hidden: true
      @UI.fieldGroup: [{
          qualifier   : 'AdminData',
          position    : 30,
          importance  : #HIGH
      }]
      SubAccount.LastChangeDateTime                                                     as LastChangeDateTime,

      -- Last Changed Date
      @ObjectModel.readOnly: true
      @Consumption.filter : {
        selectionType : #INTERVAL,
        multipleSelections : false
      }
      @UI.fieldGroup: [{
          qualifier   : 'AdminData',
          hidden      : true
      }]
      cast( tstmp_to_dats( SubAccount.LastChangeDateTime ,
            abap_system_timezone( $session.client,'NULL' ),
            $session.client,
           'NULL' )
            as cmmfdof_lastchangedon preserving type)                                   as LastChangeDate,

      -- Flag for Recent Changes done
      @UI.hidden : true
      @Consumption.filter.hidden: true
      @ObjectModel.readOnly: true
      SubAccount.CmmdtyDrvtvOrdTrdExecIsRecent                                          as CmmdtyDrvtvOrdTrdExecIsRecent,

      -- Last Changed By Username
      @UI.hidden : true
      @ObjectModel.readOnly: true
      cast(LastChangedByUser.FullName as cmmfsa_lastchangedbyusername preserving type ) as LastChangedByUserName,

      -- Last Changed By Userid
      @UI.fieldGroup: [{
          qualifier   : 'AdminData',
          position    : 40,
          importance  : #HIGH
      }]
      @ObjectModel.text.element: 'LastChangedByUserName'
      SubAccount.LastChangedByUser                                                      as LastChangedByUser,

      -----------------------------------------------------------------------------------------------------------------------
      -------------------------Associations----------------------------------------------------------------------------------
      -----------------------------------------------------------------------------------------------------------------------

      @Consumption.filter.hidden: true
      _CompanyCodeProfitCenter,

      @Consumption.filter.hidden: true
      _FutureAccountPortfolio,

      @Consumption.filter.hidden: true
      _DcsMicCommodity,

      @Consumption.filter.hidden: true
      _CounterpartyVH,

      @Consumption.filter.hidden: true
      _CmmdtySubAcctBrokerVH,

      @Consumption.filter.hidden: true
      _CmmdtySubAcctClrgAcctVH,

      @Consumption.filter.hidden: true
      @ObjectModel.filter.enabled: false
      _ProfitCenterHierLeafNode
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CMMDTYCOCODEPRFTCTRVH",
"I_CMMDTYDRVTVCONTRMICPHYS",
"I_CMMDTYDRVTVORDERUSERDETAILS",
"I_CMMDTYFUTRACCTPRTFLOVH",
"I_CMMDTYORDREQCOUNTERPARTYVH",
"I_CMMDTYSUBACCTBROKERVH",
"I_CMMDTYSUBACCTFOOTPRINT",
"I_CMMDTYSUBACCTSTATUSTEXT",
"I_COMMODITYSUBACCOUNTTP",
"I_COMPANYCODE"
],
"ASSOCIATED":
[
"C_HIERRUNTIMERPRSTNDPLLEAFNODE",
"E_COMMODITYSUBACCOUNT",
"I_CMMDTYCOCODEPRFTCTRVH",
"I_CMMDTYDRVTVCONTRMICPHYS",
"I_CMMDTYFUTRACCTPRTFLOVH",
"I_CMMDTYORDREQCOUNTERPARTYVH",
"I_CMMDTYSUBACCTBROKERVH",
"I_CMMDTYSUBACCTCLRGACCTVH"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/