I_COMMODITYCODE

CDS View

Commodity Code

I_COMMODITYCODE is a CDS View in S/4HANA. Commodity Code. It contains 4 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
C_CommodityCodeByLanguage view from CONSUMPTION Commodity code for given language
I_CommodityCodeForKeyDate view from COMPOSITE Commodity Code for Key Date
I_ExciseTaxCmmdty view from COMPOSITE Commodity Code for Excise Tax

Fields (4)

KeyField CDS FieldsUsed in Views
KEY CommodityCode CommodityCode 1
KEY TrdClassfctnNmbrSchmCntnt TrdClassfctnNmbrSchmCntnt 2
KEY ValidityStartDate ValidityStartDate 3
ValidityEndDate ValidityEndDate 3
@EndUserText.label: 'Commodity Code'
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'ICMDTYCD'
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.privilegedAssociations:  [ '_CreatedByUser' , '_LastChangedByUser' ]
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'CommodityCode'

@ObjectModel.usageType.sizeCategory: 'L'
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MIXED

define view I_CommodityCode
  as select from I_TrdClassfctnNmbr as _TrdClassfctnNmbr
  association [0..*] to I_TrdClassfctnNmbrOfficialDesc as _OfficialDesc               on  $projection.TrdClassfctnNmbrSchmCntnt = _OfficialDesc.TrdClassfctnNmbrSchmCntnt
                                                                                      and $projection.CommodityCode             = _OfficialDesc.TrdClassfctnNmbr
                                                                                      and $projection.ValidityStartDate         = _OfficialDesc.ValidityStartDate
  association [0..*] to I_TrdClassfctnNmbrCnctntdDesc  as _CnctntdDesc                on  $projection.TrdClassfctnNmbrSchmCntnt = _CnctntdDesc.TrdClassfctnNmbrSchmCntnt
                                                                                      and $projection.CommodityCode             = _CnctntdDesc.TrdClassfctnNmbr
                                                                                      and $projection.ValidityStartDate         = _CnctntdDesc.ValidityStartDate
{
  key _TrdClassfctnNmbr.TrdClassfctnNmbrSchmCntnt,
  key cast ( TrdClassfctnNmbr as /sapsll/comco) as CommodityCode,
  key ValidityStartDate,
      @ObjectModel.text.association: '_OfficialDesc'
      TrdClassfctnNmbr                          as TrdClassfctnNmbrForOfclDesc,
      @ObjectModel.text.association: '_CnctntdDesc'
      TrdClassfctnNmbr                          as TrdClassfctnNmbrForCnctntdDesc,
      ValidityEndDate,
      SupplementaryUnit,
      SecondSupplementaryUnit,
      CustomsUnitOfMeasure,
      SecondCustomsUnitOfMeasure,
      UnitOfMeasureSystem,
      CreatedByUser,
      CreationDateTime,
      LastChangedByUser,
      LastChangeDateTime,

      _TrdClassfctnNmbrSchmCntnt,
      @ObjectModel.filter.enabled: false
      _OfficialDesc,
      @ObjectModel.filter.enabled: false
      _CnctntdDesc,
      _CreatedByUser,
      _LastChangedByUser,
      _SupplementaryUnit,
      _SecondSupplementaryUnit,
      _CustomsUnitOfMeasure,
      _SecondCustomsUnitOfMeasure
}
where
  _TrdClassfctnNmbrSchmCntnt.TrdClassfctnNmbrSchmType = '01'