P_SubscrpnProdSpec

DDL: P_SUBSCRPNPRODSPEC SQL: PSPRODSPEC Type: view BASIC

P_SubscrpnProdSpec is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (mara, t134, crms4c_som_prcat, crms4d_som_spsd) and exposes 16 fields with key field SubscrpnProdSpecUUID.

Data Sources (4)

SourceAliasJoin Type
mara Product inner
t134 ProductType inner
crms4c_som_prcat SubscriptionProductPurpose left_outer
crms4d_som_spsd SubscrpnProdSpec from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PSPRODSPEC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #BASIC view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY SubscrpnProdSpecUUID crms4d_som_spsd subscrpnprodspecuuid
CreatedByUser crms4d_som_spsd createdbyuser
CreationDateTime crms4d_som_spsd creationdatetime
LastChangedByUser crms4d_som_spsd lastchangedbyuser
LastChangeDateTime crms4d_som_spsd lastchangedatetime
Product crms4d_som_spsd product
ProductType mara mtart
ProductGroup mara matkl
AuthorizationGroup mara begru
ProductUUID mara scm_matid_guid16
ProductIsConfigurable mara kzkfg
BaseUnit mara meins
CABillgCycle mara som_cycle
SubscrpnProdBillgCycDetn mara som_cycle_rule
ContractAutoRenewalType mara som_ctr_autorenewal
SubscrpnProdTechRsceIsActive crms4d_som_spsd subscrpnprodtechrsceisactive
@AbapCatalog.sqlViewName: 'PSPRODSPEC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Subscription Product Specification'

@ClientHandling.algorithm: #SESSION_VARIABLE

//@ObjectModel.representativeKey: 'Product'


@VDM.private: true
@VDM.viewType: #BASIC

define view P_SubscrpnProdSpec
  as select from    crms4d_som_spsd  as SubscrpnProdSpec
    inner join      mara             as Product                    on SubscrpnProdSpec.product = Product.matnr
    inner join      t134             as ProductType                on Product.mtart = ProductType.mtart
    left outer join crms4c_som_prcat as SubscriptionProductPurpose on Product.mtart = SubscriptionProductPurpose.producttype
{
  key SubscrpnProdSpec.subscrpnprodspecuuid         as SubscrpnProdSpecUUID,
      SubscrpnProdSpec.createdbyuser                as CreatedByUser,
      SubscrpnProdSpec.creationdatetime             as CreationDateTime,
      SubscrpnProdSpec.lastchangedbyuser            as LastChangedByUser,
      SubscrpnProdSpec.lastchangedatetime           as LastChangeDateTime,
      SubscrpnProdSpec.product                      as Product,
      Product.mtart                                 as ProductType,
      Product.matkl                                 as ProductGroup,
      Product.begru                                 as AuthorizationGroup,
      Product.scm_matid_guid16                      as ProductUUID,

      case SubscrpnProdSpec.subscrpnprodtechrsceisactive
       when 'X' then SubscrpnProdSpec.subscrpnprodtechrsceschema
       when '' then Product.som_tc_schema
       else Product.som_tc_schema
      end                                           as SubscrpnProdTechRsceSchema,

      Product.kzkfg                                 as ProductIsConfigurable,
      Product.meins                                 as BaseUnit,
      Product.som_cycle                             as CABillgCycle,
      Product.som_cycle_rule                        as SubscrpnProdBillgCycDetn,
      case SubscriptionProductPurpose.prod_class
       when 'B' then SubscriptionProductPurpose.prod_class
       when 'P' then SubscriptionProductPurpose.prod_class
       when 'A' then SubscriptionProductPurpose.prod_class
       else ''
      end                                           as SubscriptionProductPurpose,
      Product.som_ctr_autorenewal                   as ContractAutoRenewalType,
      SubscrpnProdSpec.subscrpnprodtechrsceisactive as SubscrpnProdTechRsceIsActive

}
where
  ProductType.prod_type_code = '3';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"CRMS4C_SOM_PRCAT",
"CRMS4D_SOM_SPSD",
"MARA",
"T134"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/