I_CommoditySubAccountTP
Commodity Subaccount Transactional View
I_CommoditySubAccountTP is a Transactional CDS View that provides data about "Commodity Subaccount Transactional View" in SAP S/4HANA. It reads from 2 data sources (I_CmmdtyDrvtvOrdTrdExecRecent, I_CommoditySubAccount) and exposes 22 fields with key field CommoditySubAccountUUID. It has 1 association to related views. Part of development package FS_CMM_COMMODITY_SUBACCOUNT.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CmmdtyDrvtvOrdTrdExecRecent | ExecRecent | left_outer |
| I_CommoditySubAccount | I_CommoditySubAccount | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | E_CommoditySubAccount | _Extension | $projection.CommoditySubAccountUUID = _Extension.CommoditySubAccountUUID |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ICMMDTYSUBACCTTP | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Commodity Subaccount Transactional View | view | |
| VDM.viewType | #TRANSACTIONAL | view | |
| ObjectModel.transactionalProcessingEnabled | true | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.writeActivePersistence | CMMFSA_D_SUBACCT | view | |
| ObjectModel.createEnabled | true | view | |
| ObjectModel.updateEnabled | EXTERNAL_CALCULATION | view | |
| ObjectModel.deleteEnabled | EXTERNAL_CALCULATION | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.modelCategory | #BUSINESS_OBJECT | view |
Fields (22)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CommoditySubAccountUUID | I_CommoditySubAccount | CommoditySubAccountUUID | |
| CommoditySubAccount | I_CommoditySubAccount | CommoditySubAccount | ||
| CommoditySubAccountName | I_CommoditySubAccount | CommoditySubAccountName | ||
| CmmdtySubAccountStatus | I_CommoditySubAccount | CmmdtySubAccountStatus | ||
| CmmdtySubAccountStatusReason | I_CommoditySubAccount | CmmdtySubAccountStatusReason | ||
| CompanyCode | I_CommoditySubAccount | CompanyCode | ||
| FuturesAccount | I_CommoditySubAccount | FuturesAccount | ||
| Commodity | I_CommoditySubAccount | Commodity | ||
| MarketIdentifierCode | I_CommoditySubAccount | MarketIdentifierCode | ||
| DerivativeContrSpecification | I_CommoditySubAccount | DerivativeContrSpecification | ||
| ReferenceBrokerAccount | I_CommoditySubAccount | ReferenceBrokerAccount | ||
| Portfolio | I_CommoditySubAccount | Portfolio | ||
| ProfitCenter | I_CommoditySubAccount | ProfitCenter | ||
| Counterparty | I_CommoditySubAccount | Counterparty | ||
| CommodityDerivativeBroker | I_CommoditySubAccount | CommodityDerivativeBroker | ||
| CmmdtySubAcctClearingAccount | I_CommoditySubAccount | CmmdtySubAcctClearingAccount | ||
| CommoditySubAccountClearingKey | I_CommoditySubAccount | CommoditySubAccountClearingKey | ||
| CmmdtySubAccountIsBlocked | I_CommoditySubAccount | CmmdtySubAccountIsBlocked | ||
| CreatedByUser | I_CommoditySubAccount | CreatedByUser | ||
| CreationDateTime | I_CommoditySubAccount | CreationDateTime | ||
| LastChangedByUser | I_CommoditySubAccount | LastChangedByUser | ||
| LastChangeDateTime | I_CommoditySubAccount | LastChangeDateTime |
@AbapCatalog.sqlViewName : 'ICMMDTYSUBACCTTP'
@AbapCatalog.compiler.compareFilter : true
@AbapCatalog.preserveKey : true
@AccessControl.authorizationCheck : #CHECK
@EndUserText.label : 'Commodity Subaccount Transactional View'
@VDM.viewType : #TRANSACTIONAL
-- Business Object Model for Commodity Subaccount
@ObjectModel: {
transactionalProcessingEnabled : true,
compositionRoot : true,
writeActivePersistence : 'CMMFSA_D_SUBACCT',
createEnabled : true,
updateEnabled : 'EXTERNAL_CALCULATION',
deleteEnabled : 'EXTERNAL_CALCULATION',
usageType: {
serviceQuality : #B,
sizeCategory : #M,
dataClass : #MIXED
},
modelCategory : #BUSINESS_OBJECT,
semanticKey : ['COMMODITYSUBACCOUNT'],
alternativeKey: [{
id : 'COMMODITYSUBACCOUNT',
uniqueness : #UNIQUE_IF_NOT_INITIAL,
element : ['COMMODITYSUBACCOUNT']
}]
}
-- Transactional view for Commodity Subaccount
define view I_CommoditySubAccountTP
as select from I_CommoditySubAccount
-- To get Recent Change Time Interval
left outer join I_CmmdtyDrvtvOrdTrdExecRecent as ExecRecent on ExecRecent.SemanticObjectName = 'CommoditySubAccount'
-- Extension View for Free Characteristics
association [1..1] to E_CommoditySubAccount as _Extension on $projection.CommoditySubAccountUUID = _Extension.CommoditySubAccountUUID
{
key I_CommoditySubAccount.CommoditySubAccountUUID,
@ObjectModel.readOnly: true
I_CommoditySubAccount.CommoditySubAccount,
@ObjectModel.mandatory: true
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.CommoditySubAccountName,
@ObjectModel.readOnly: true
I_CommoditySubAccount.CmmdtySubAccountStatus,
@ObjectModel.readOnly: true
I_CommoditySubAccount.CmmdtySubAccountStatusReason,
@ObjectModel.mandatory: true
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.CompanyCode,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.FuturesAccount,
@ObjectModel.mandatory: true
I_CommoditySubAccount.Commodity,
@ObjectModel.mandatory: true
I_CommoditySubAccount.MarketIdentifierCode,
@ObjectModel.mandatory: true
I_CommoditySubAccount.DerivativeContrSpecification,
I_CommoditySubAccount.ReferenceBrokerAccount,
@ObjectModel.readOnly: true
I_CommoditySubAccount.Portfolio,
I_CommoditySubAccount.ProfitCenter,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.Counterparty,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.CommodityDerivativeBroker,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.CmmdtySubAcctClearingAccount,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
I_CommoditySubAccount.CommoditySubAccountClearingKey,
I_CommoditySubAccount.CmmdtySubAccountIsBlocked,
@ObjectModel.readOnly: true
I_CommoditySubAccount.CreatedByUser,
@ObjectModel.readOnly: true
I_CommoditySubAccount.CreationDateTime,
@ObjectModel.readOnly: true
I_CommoditySubAccount.LastChangedByUser,
@ObjectModel.readOnly: true
I_CommoditySubAccount.LastChangeDateTime,
@ObjectModel.readOnly: true
case
when ExecRecent.CmmdtyDrvtvOrdTrdExecRecentTme >=
tstmp_seconds_between( I_CommoditySubAccount.LastChangeDateTime,
// Current System Time Stamp
dats_tims_to_tstmp(
// Current System Date
tstmp_to_dats( tstmp_current_utctimestamp(),
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ),
// Current System Time
tstmp_to_tims( tstmp_current_utctimestamp(),
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ),
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) ,
'NULL' )
then '3' // Default Color
else '0' // Higlighted green
end as CmmdtyDrvtvOrdTrdExecIsRecent
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA