P_Cfd_Custom_Field_Versions
Custom Fields - All Versions
P_Cfd_Custom_Field_Versions is a CDS View that provides data about "Custom Fields - All Versions" in SAP S/4HANA. It reads from 4 data sources (cfd_w_rep_bus, cfd_w_rep_ch_ref, cfd_w_rep, tadir) and exposes 49 fields with key fields ExternalName, BusinessContext. It has 15 associations to related views. Part of development package S_CFD_REPOSITORY_HANDLER.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| cfd_w_rep_bus | businessContext | inner |
| cfd_w_rep_ch_ref | characteristic | left_outer |
| cfd_w_rep | Field | from |
| tadir | tadir | inner |
Associations (15)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1] | P_Cfd_User_Name | _CreateUser | _CreateUser.name = Field.created_by |
| [1] | P_Cfd_User_Name | _ChangeUser | _ChangeUser.name = Field.last_changed_by |
| [1] | P_Cfd_Business_Context | _BusinessContext | $projection.BusinessContext = _BusinessContext.BusinessContext |
| [1] | P_Cfd_Field_Type | _Type | $projection.type = _Type.Code |
| [*] | p_cfd_ui_text | _UiTexts | _UiTexts.ExternalName = $projection.ExternalName and _UiTexts.BusinessContext = $projection.BusinessContext |
| [1] | p_cfd_ui_text | _UiTextsInOriginalLanguage | _UiTextsInOriginalLanguage.ExternalName = $projection.ExternalName and _UiTextsInOriginalLanguage.BusinessContext = $projection.BusinessContext and _UiTextsInOriginalLanguage.Language = $projection.MasterLanguage and _UiTextsInOriginalLanguage.ComponentIdentifier = '' and _UiTextsInOriginalLanguage.EnhancementObjectType = 'DATAELEM' |
| [1] | P_Cfd_Data_Element_Text | _DataElementTextFallback | $projection.DataElementName = _DataElementTextFallback.DataElement and _DataElementTextFallback.MasterLanguage = _DataElementTextFallback.Language |
| [*] | I_LanguageText | _MasterLanguageText | $projection.MasterLanguage = _MasterLanguageText.LanguageCode |
| [1] | P_Cfd_Field_Origin | _Origin | $projection.Origin = _Origin.Code |
| [1] | dd04l | _DataElement | $projection.DataElementName = _DataElement.rollname and _DataElement.as4local = 'A' and _DataElement.as4vers = '0000' |
| [1] | P_CFD_ASSOCIABLE_BO | _AssociatedBO | $projection.AssociatedBusinessObject = _AssociatedBO.BusinessObjectID |
| [0..1] | P_Cfd_Associable_Cds_View | _AssociatedValueHelp | $projection.ValueHelpViewName = _AssociatedValueHelp.ViewName |
| [0..1] | P_Cfd_Associable_Cds_View | _AssociatedLeadingDimension | $projection.LeadingDimensionViewName = _AssociatedLeadingDimension.ViewName |
| [0..*] | P_CFD_VH_COMPONENT_NAME | _CdsViewComponentIdentifiers | $projection.ExternalName = _CdsViewComponentIdentifiers.FieldExternalName |
| [0..*] | P_Cfd_Value_Help_Bindings | _ValueHelpBindings | $projection.ExternalName = _ValueHelpBindings.ExternalName |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | P_CFD_FIELD_VERS | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| EndUserText.label | Custom Fields - All Versions | view |
Fields (49)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ExternalName | cfd_w_rep | external_name | |
| KEY | BusinessContext | cfd_w_rep_bus | business_context | |
| Name | cfd_w_rep | name | ||
| Version | cfd_w_rep | version | ||
| DeviatingFieldName | cfd_w_rep_bus | deviating_field_name | ||
| deviating_field_nameendasTechnicalName | ||||
| LongLabelasFieldLabel | ||||
| InternalType | cfd_w_rep | type | ||
| typeendasType | ||||
| lengendasLength | ||||
| decimalsendasScale | ||||
| datatypeendasDataType | ||||
| Origin | cfd_w_rep | origin | ||
| MasterLanguage | tadir | masterlang | ||
| Aggregation | cfd_w_rep | aggregation | ||
| DataElementName | cfd_w_rep | data_element_name | ||
| ValueHelpKind | cfd_w_rep | value_help_kind | ||
| ValueHelpViewName | cfd_w_rep | value_help_view_name | ||
| LeadingDimensionViewName | cfd_w_rep | leading_dimension_view_name | ||
| DisplayOption | cfd_w_rep | display_option | ||
| CodeListUppercaseOnly | cfd_w_rep | code_list_uppercase_only | ||
| CreatedAt | ||||
| CreatedBy | cfd_w_rep | created_by | ||
| LastChangedAt | ||||
| LastChangedBy | cfd_w_rep | last_changed_by | ||
| LastChangedAtTimestamp | ||||
| AssociatedBusinessObject | cfd_w_rep | associated_business_object | ||
| CharacteristicName | cfd_w_rep_ch_ref | characteristic_name | ||
| ClassType | cfd_w_rep_ch_ref | class_type | ||
| ClassificationObjectType | cfd_w_rep_ch_ref | object_type | ||
| DataSubjectIdType | cfd_w_rep | data_subject_id_type | ||
| BadiImplForDataSubject | cfd_w_rep | badi_impl_for_data_subject | ||
| AssociatedBODescription | _AssociatedBO | BusinessObjectName | ||
| SemanticActionName | cfd_w_rep | semantic_action_name | ||
| SemanticObjectName | cfd_w_rep | semantic_object_name | ||
| EnhancementPrefix | cfd_w_rep | enhancement_prefix | ||
| NamePrefix | cfd_w_rep | name_prefix | ||
| ShortEnhancementPrefix | cfd_w_rep | short_enhancement_prefix | ||
| _CdsViewComponentIdentifiers | _CdsViewComponentIdentifiers | |||
| _BusinessContext | _BusinessContext | |||
| _Type | _Type | |||
| _Origin | _Origin | |||
| _MasterLanguageText | _MasterLanguageText | |||
| _CreateUser | _CreateUser | |||
| _ChangeUser | _ChangeUser | |||
| _AssociatedValueHelp | _AssociatedValueHelp | |||
| _AssociatedLeadingDimension | _AssociatedLeadingDimension | |||
| _ValueHelpBindings | _ValueHelpBindings | |||
| _UiTexts | _UiTexts |
@AbapCatalog.sqlViewName: 'P_CFD_FIELD_VERS'
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'Custom Fields - All Versions'
define view P_Cfd_Custom_Field_Versions
as select from cfd_w_rep as Field
inner join cfd_w_rep_bus as businessContext on Field.name = businessContext.name
and Field.version = businessContext.version
inner join tadir on tadir.pgmid = 'R3TR'
and tadir.object = 'CFDF'
and tadir.obj_name = Field.name
left outer join cfd_w_rep_ch_ref as characteristic on Field.name = characteristic.name
and Field.version = characteristic.version
association [1] to P_Cfd_User_Name as _CreateUser on _CreateUser.name = Field.created_by
association [1] to P_Cfd_User_Name as _ChangeUser on _ChangeUser.name = Field.last_changed_by
association [1] to P_Cfd_Business_Context as _BusinessContext on $projection.BusinessContext = _BusinessContext.BusinessContext
association [1] to P_Cfd_Field_Type as _Type on $projection.type = _Type.Code
association [*] to p_cfd_ui_text as _UiTexts on _UiTexts.ExternalName = $projection.ExternalName
and _UiTexts.BusinessContext = $projection.BusinessContext
association [1] to p_cfd_ui_text as _UiTextsInOriginalLanguage on _UiTextsInOriginalLanguage.ExternalName = $projection.ExternalName
and _UiTextsInOriginalLanguage.BusinessContext = $projection.BusinessContext
and _UiTextsInOriginalLanguage.Language = $projection.MasterLanguage
and _UiTextsInOriginalLanguage.ComponentIdentifier = ''
and _UiTextsInOriginalLanguage.EnhancementObjectType = 'DATAELEM'
association [1] to P_Cfd_Data_Element_Text as _DataElementTextFallback on $projection.DataElementName = _DataElementTextFallback.DataElement
and _DataElementTextFallback.MasterLanguage = _DataElementTextFallback.Language
association [*] to I_LanguageText as _MasterLanguageText on $projection.MasterLanguage = _MasterLanguageText.LanguageCode
association [1] to P_Cfd_Field_Origin as _Origin on $projection.Origin = _Origin.Code
association [1] to dd04l as _DataElement on $projection.DataElementName = _DataElement.rollname
and _DataElement.as4local = 'A'
and _DataElement.as4vers = '0000'
association [1] to P_CFD_ASSOCIABLE_BO as _AssociatedBO on $projection.AssociatedBusinessObject = _AssociatedBO.BusinessObjectID
association [0..1] to P_Cfd_Associable_Cds_View as _AssociatedValueHelp on $projection.ValueHelpViewName = _AssociatedValueHelp.ViewName
association [0..1] to P_Cfd_Associable_Cds_View as _AssociatedLeadingDimension on $projection.LeadingDimensionViewName = _AssociatedLeadingDimension.ViewName
association [0..*] to P_CFD_VH_COMPONENT_NAME as _CdsViewComponentIdentifiers on $projection.ExternalName = _CdsViewComponentIdentifiers.FieldExternalName
association [0..*] to P_Cfd_Value_Help_Bindings as _ValueHelpBindings on $projection.ExternalName = _ValueHelpBindings.ExternalName
{
// key fields
key Field.external_name as ExternalName,
key businessContext.business_context as BusinessContext,
// internal help fields
Field.name as Name,
Field.version as Version,
businessContext.deviating_field_name as DeviatingFieldName,
// detail fields
case
when businessContext.deviating_field_name = ''
then concat(concat(Field.external_name, '_'), businessContext.persistence_context_suffix)
else businessContext.deviating_field_name
end as TechnicalName,
coalesce (
_UiTextsInOriginalLanguage.FieldLabel,
_DataElementTextFallback.LongLabel ) as FieldLabel,
Field.type as InternalType,
case
when Field.type = #CFD_FIELD_TYPE.ASC_TO_STD
then 'ASC_TO_CBO'
else
Field.type
end as Type,
case when Field.data_element_name = ''
then Field.length
else _DataElement.leng
end as Length,
case when Field.data_element_name = ''
then Field.scale
else _DataElement.decimals
end as Scale,
case when Field.data_element_name = ''
then ''
else _DataElement.datatype
end as DataType,
Field.origin as Origin,
tadir.masterlang as MasterLanguage,
Field.aggregation as Aggregation,
Field.data_element_name as DataElementName,
Field.value_help_kind as ValueHelpKind,
Field.value_help_view_name as ValueHelpViewName,
Field.leading_dimension_view_name as LeadingDimensionViewName,
Field.display_option as DisplayOption,
Field.code_list_uppercase_only as CodeListUppercaseOnly,
// system administrative data
concat(Field.created_on, Field.created_at) as CreatedAt,
Field.created_by as CreatedBy,
concat(Field.last_changed_on, Field.last_changed_at) as LastChangedAt,
Field.last_changed_by as LastChangedBy,
dats_tims_to_tstmp(Field.last_changed_on, Field.last_changed_at, 'UTC', $session.client, 'NULL') as LastChangedAtTimestamp,
Field.associated_business_object as AssociatedBusinessObject,
characteristic.characteristic_name as CharacteristicName,
characteristic.class_type as ClassType,
characteristic.object_type as ClassificationObjectType,
Field.data_subject_id_type as DataSubjectIdType,
Field.badi_impl_for_data_subject as BadiImplForDataSubject,
_AssociatedBO.BusinessObjectName as AssociatedBODescription,
Field.semantic_action_name as SemanticActionName,
Field.semantic_object_name as SemanticObjectName,
Field.enhancement_prefix as EnhancementPrefix,
Field.name_prefix as NamePrefix,
Field.short_enhancement_prefix as ShortEnhancementPrefix,
// // fuzzy search
// businessContext.deviating_field_name as DeviatingFieldName,
// _LabelInMasterLanguage,
// _DataElementText,
// _DataElementTextFallback,
// associations
_CdsViewComponentIdentifiers,
_BusinessContext,
_Type,
_Origin,
_MasterLanguageText,
_CreateUser,
_ChangeUser,
_AssociatedValueHelp,
_AssociatedLeadingDimension,
_ValueHelpBindings,
_UiTexts
}
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