I_ProdAllocCharcText is a Composite CDS View that provides data about "Product allocation characteristic text" in SAP S/4HANA. It reads from 1 data source (I_ProdAllocCharcCtlgPathTP) and exposes 2 fields with key fields ProdAllocCharcCtlgPathIntID, Language. Part of development package PROD_ALLOC_CHARC_CATALOG.
@EndUserText.label: 'Product allocation characteristic text'
@VDM.viewType: #COMPOSITE@VDM.lifecycle.contract.type: #SAP_INTERNAL_API@VDM.private: false@AccessControl.authorizationCheck: #NOT_REQUIRED//or #NOT_REQUIRED #CHECK
@ObjectModel.usageType.sizeCategory: #L@ObjectModel.usageType.serviceQuality: #C@ObjectModel.usageType.dataClass:#MIXED@ObjectModel.dataCategory: #TEXT@Analytics.technicalName: 'IPAOCHARCTXT'
@ObjectModel.representativeKey: 'ProdAllocCharcCtlgPathIntID'
defineviewentity I_ProdAllocCharcText
asselectfrom I_ProdAllocCharcCtlgPathTP as PATH
leftouter to many join I_Language as LANG on LANG.Language isnotnullleftouter to one join I_PartnerFunctionText as PFTEXT on PFTEXT.PartnerFunction = PATH.ProdAllocCharcCtlgPathSel
and PFTEXT.Language = LANG.Language
leftouter to one join I_DataElementLabelText as DETEXT on DETEXT.ABAPDataElement = PATH.ABAPDataElement
and DETEXT.Language = LANG.Language
leftouter to one join I_ProdAllocCharcCtlgPathTP as PARENT_PATH on PARENT_PATH.ProdAllocCharcCtlgPathIntID = PATH.ProdAllocCharcCtlgParPathIntID
leftouter to one join I_DataElementLabelText as PARENT_DETEXT on PARENT_DETEXT.ABAPDataElement = PARENT_PATH.ABAPDataElement
and PARENT_DETEXT.Language = LANG.Language
leftouter to one join I_AllocCharcCtlgPathTTP as TEXT on TEXT.ProdAllocCharcCtlgPathUUID = PATH.ProdAllocCharcCtlgPathUUID
and TEXT.Language = LANG.Language
leftouter to one join I_ProdAllocCharcCtlgPathRef as PATHREF on PATHREF.ProdAllocCharcCtlgPathUUID = PATH.ProdAllocCharcCtlgPathUUID
and PATHREF.ProdAllocCharcCatalogIsMain = 'X'
leftouter to one join I_ProdAllocCharcCtlgPathTP as BASEPATH on BASEPATH.ProdAllocCharcCtlgPathUUID = PATHREF.BaseCharcCatalogPathUUID
leftouter to one join I_PartnerFunctionText as BASEPATH_PFTEXT on BASEPATH_PFTEXT.PartnerFunction = BASEPATH.ProdAllocCharcCtlgPathSel
and BASEPATH_PFTEXT.Language = LANG.Language
leftouter to one join I_AllocCharcCtlgPathTTP as BASEPATH_TEXT on BASEPATH_TEXT.ProdAllocCharcCtlgPathUUID = PATHREF.BaseCharcCatalogPathUUID
and BASEPATH_TEXT.Language = LANG.Language
leftouter to one join I_DataElementLabelText as BASEPATH_DETEXT on BASEPATH_DETEXT.ABAPDataElement = BASEPATH.ABAPDataElement
and BASEPATH_DETEXT.Language = LANG.Language
leftouter to one join I_ProdAllocCharcCtlgPathTP as BASEPATH_PARENT_PATH on BASEPATH_PARENT_PATH.ProdAllocCharcCtlgPathIntID = PATH.ProdAllocCharcCtlgParPathIntID
leftouter to one join I_DataElementLabelText as BASEPATH_PARENT_DETEXT on BASEPATH_PARENT_DETEXT.ABAPDataElement = BASEPATH_PARENT_PATH.ABAPDataElement
and BASEPATH_PARENT_DETEXT.Language = LANG.Language
leftouter to one join P_CharcCtlgClfnCForDateDesc(P_KeyDate: $session.system_date) as CLFN_CHAR_TEXT on CLFN_CHAR_TEXT.CharcInternalID = PATH.CharcInternalID
{
key PATH.ProdAllocCharcCtlgPathIntID as ProdAllocCharcCtlgPathIntID,
@Semantics.language: truekey LANG.Language as Language,
@Semantics.text: truecase//Characteristic with text table instance (normal characteristics with/without alias, value groupor mixed characteristic)
when PATH.ProdAllocCharcCatalogPathType = '02' and//IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
TEXT.ProdAllocCharcCtlgPathDesc isnot initial
then TEXT.ProdAllocCharcCtlgPathDesc
//Value group characteristic without a text:
// - the ID (path) of the value groupis returned
when PATH.ProdAllocCharcCatalogPathType = '02' and//IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
PATH.ProdAllocCharcCatalogCharcType = '02' and//IF_PACHARCCATALOGCHARCTYPE_C=>SC_CHARC_VALUE_GROUP
( TEXT.ProdAllocCharcCtlgPathDesc isnullor
TEXT.ProdAllocCharcCtlgPathDesc is initial )
then PATH.ProdAllocCharcCatalogPath
//Mixed catalog characteristics without a text and without a data element
// - the main base characteristic text is returned
when PATH.ProdAllocCharcCatalogPathType = '02' and//IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
PATH.ProdAllocCharcCatalogType = '99' and//IF_PRODALLOCCHARCCATALOGTYPE_C=>SC_MIXED
PATH.ABAPDataElement is initial
thencase// Base characteristic with text table instance (normal characteristics with/without alias, value groupor mixed characteristic)
when BASEPATH_TEXT.ProdAllocCharcCtlgPathDesc isnot initial
then BASEPATH_TEXT.ProdAllocCharcCtlgPathDesc
// Base value group characteristic without a text:
// - the ID (path) of the value groupis returned
when BASEPATH.ProdAllocCharcCatalogPathType = '02' and//IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
BASEPATH.ProdAllocCharcCatalogCharcType = '02' //IF_PACHARCCATALOGCHARCTYPE_C=>SC_CHARC_VALUE_GROUP
then BASEPATH.ProdAllocCharcCatalogPath
//Base path partner functions in general
when BASEPATH.ProdAllocCharcCtlgPathSelName = 'PARTNERFUNCTION'
thencasewhen BASEPATH_PFTEXT.PartnerFunctionName <> ''
then concat_with_space( BASEPATH_PFTEXT.PartnerFunctionName, concat_with_space( '-', BASEPATH_DETEXT.ABAPDataElementDescription, 1 ), 1 )
else BASEPATH_DETEXT.ABAPDataElementDescription
end// STO ship to party
when BASEPATH_PARENT_PATH.ProdAllocCharcCatalogType = '02' and//IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
BASEPATH_PARENT_PATH.ProdAllocCharcCtlgPathSelName = '' and
BASEPATH_PARENT_PATH.ProdAllocCharcCtlgPathSel = '' and
BASEPATH_PARENT_PATH.ProdAllocCharcCatalogPath = concat( '\\_STOCKTRANSPORTORDERITEM' , '\\_STOCKTRANSPORTSHIPPING\\_SHIPTOPARTY' )
then
concat_with_space(BASEPATH_PARENT_DETEXT.ABAPDataElementDescription, concat_with_space( '-', BASEPATH_DETEXT.ABAPDataElementDescription, 1), 1)
else BASEPATH_DETEXT.ABAPDataElementDescription
end//Partner functions in general
when PATH.ProdAllocCharcCtlgPathSelName = 'PARTNERFUNCTION' thencasewhen PFTEXT.PartnerFunctionName <> ''
then concat_with_space( PFTEXT.PartnerFunctionName, concat_with_space( '-', DETEXT.ABAPDataElementDescription, 1 ), 1 )
else DETEXT.ABAPDataElementDescription
end// STO ship to party
when PARENT_PATH.ProdAllocCharcCatalogType = '02' //IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
and PARENT_PATH.ProdAllocCharcCtlgPathSelName = ''
and PARENT_PATH.ProdAllocCharcCtlgPathSel = ''
and PARENT_PATH.ProdAllocCharcCatalogPath = concat( '\\_STOCKTRANSPORTORDERITEM' , '\\_STOCKTRANSPORTSHIPPING\\_SHIPTOPARTY' ) then
concat_with_space(PARENT_DETEXT.ABAPDataElementDescription, concat_with_space( '-', DETEXT.ABAPDataElementDescription, 1), 1)
// Classification Characteristics
when PATH.ProdAllocCharcCatalogPathType = '02' //IF_PACHARCCATALOGPATHTYPE_C=>SC_CHARCACTERISTIC
and PATH.ClfnCharacteristicUseType <>'' then//IF_CLFNCHARACTERISTICUSETYPE_C=>SC_DOMAINVALUES-noclassification
CLFN_CHAR_TEXT.CharcDescription
else DETEXT.ABAPDataElementDescription
endas ProdAllocCharcCtlgPathDesc
}