P_ProductDescriptionWD

DDL: P_PRODUCTDESCRIPTIONWD SQL: PPRDDESCRWD Type: view COMPOSITE

P_ProductDescriptionWD is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_ProductDescription, I_DraftAdministrativeData, P_ProductDescriptionD, P_ProductDescriptionD, P_ProductD) and exposes 19 fields with key fields DraftKey, ActiveProduct, ActiveProductLanguage, ActiveProduct, Activeproductlanguage.

Data Sources (5)

SourceAliasJoin Type
I_ProductDescription ActiveDocument from
I_DraftAdministrativeData DraftAdministrativeData inner
P_ProductDescriptionD DraftDocument left_outer
P_ProductDescriptionD DraftDocument union_all
P_ProductD DraftRootDocument inner

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PPRDDESCRWD view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientDependent true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY DraftKey
KEY ActiveProduct I_ProductDescription Product
KEY ActiveProductLanguage I_ProductDescription Language
ParentDraftKey
Product I_ProductDescription Product
Language I_ProductDescription Language
ProductDescription I_ProductDescription ProductDescription
IsActiveEntity
HasActiveEntity
DraftkeyasDraftKey
KEY ActiveProduct P_ProductDescriptionD ActiveProduct
KEY Activeproductlanguage P_ProductDescriptionD Activeproductlanguage
ParentDraftKey P_ProductDescriptionD Parentdraftkey
product P_ProductDescriptionD product
language P_ProductDescriptionD language
IsActiveEntity
HasActiveEntity P_ProductDescriptionD HasActiveEntity
HasDraftEntity
DraftAdministrativeDataUUID
@AbapCatalog.sqlViewName: 'PPRDDESCRWD'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
//@EndUserText.label: 'Product Description Union (draft)'

@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_ProductDescriptionWD
  as select from    I_ProductDescription  as ActiveDocument
    left outer join P_ProductDescriptionD as DraftDocument on  DraftDocument.ActiveProduct         = ActiveDocument.Product
                                                           and DraftDocument.Activeproductlanguage = ActiveDocument.Language
{
  key cast ( hextobin('00000000000000000000000000000000') as sysuuid_x )                as DraftKey,
  key ActiveDocument.Product                                                            as ActiveProduct,
  key ActiveDocument.Language                                                           as ActiveProductLanguage,
      cast ( hextobin('00000000000000000000000000000000') as sysuuid_x )                as ParentDraftKey,
      ActiveDocument.Product,
      ActiveDocument.Language,
      ActiveDocument.ProductDescription,
      cast( 'X' as boole_d )                                                            as IsActiveEntity,
      cast( ' ' as boole_d )                                                            as HasActiveEntity,
      cast(
      case
        when DraftDocument.Draftkey is null
        then ' '
        else 'X'
      end  as boole_d)                                                                  as HasDraftEntity,
      cast(DraftDocument.Parentdraftkey as sysuuid_x )                                  as DraftAdministrativeDataUUID
}

union all

select from  P_ProductDescriptionD     as DraftDocument
  inner join P_ProductD                as DraftRootDocument       on DraftRootDocument.Draftkey = DraftDocument.Parentdraftkey
  inner join I_DraftAdministrativeData as DraftAdministrativeData on DraftAdministrativeData.DraftUUID = DraftDocument.Parentdraftkey
{
  key DraftDocument.Draftkey                                                        as DraftKey,
  key DraftDocument.ActiveProduct                                                   as ActiveProduct,
  key DraftDocument.Activeproductlanguage                                           as Activeproductlanguage,
      DraftDocument.Parentdraftkey                                                  as ParentDraftKey,
      DraftDocument.product,
      DraftDocument.language,
      DraftDocument.productdescription,
      cast( ' ' as boole_d )                                                        as IsActiveEntity,
      DraftDocument.HasActiveEntity                                                 as HasActiveEntity,
      cast( ' ' as boole_d )                                                        as HasDraftEntity,
      cast(DraftDocument.Parentdraftkey as sysuuid_x )                              as DraftAdministrativeDataUUID
}
where
     DraftAdministrativeData.CreatedByUser   = $session.user
  or DraftAdministrativeData.InProcessByUser = $session.user    
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DRAFTADMINISTRATIVEDATA",
"I_PRODUCTDESCRIPTION",
"P_PRODUCTD",
"P_PRODUCTDESCRIPTIOND"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/