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.
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 | External Name |
| KEY | BusinessContext | cfd_w_rep_bus | business_context | Business Context |
| Name | cfd_w_rep | name | Zone name | |
| Version | cfd_w_rep | version | XML Vers. | |
| DeviatingFieldName | cfd_w_rep_bus | deviating_field_name | Field Name | |
| deviating_field_nameendasTechnicalName | ||||
| LongLabelasFieldLabel | ||||
| InternalType | cfd_w_rep | type | Worklist Type | |
| typeendasType | ||||
| lengendasLength | ||||
| decimalsendasScale | ||||
| datatypeendasDataType | ||||
| Origin | cfd_w_rep | origin | Task Origin | |
| MasterLanguage | tadir | masterlang | Single-Character Flag | |
| Aggregation | cfd_w_rep | aggregation | Aggregation | |
| DataElementName | cfd_w_rep | data_element_name | Element Name | |
| ValueHelpKind | cfd_w_rep | value_help_kind | Value Help Type | |
| ValueHelpViewName | cfd_w_rep | value_help_view_name | Value Help View | |
| LeadingDimensionViewName | cfd_w_rep | leading_dimension_view_name | CDS View Name | |
| DisplayOption | cfd_w_rep | display_option | Display list value | |
| CodeListUppercaseOnly | cfd_w_rep | code_list_uppercase_only | Uppercase Code List | |
| CreatedAt | ||||
| CreatedBy | cfd_w_rep | created_by | Version Created By | |
| LastChangedAt | ||||
| LastChangedBy | cfd_w_rep | last_changed_by | Username | |
| LastChangedAtTimestamp | ||||
| AssociatedBusinessObject | cfd_w_rep | associated_business_object | Association Target | |
| CharacteristicName | cfd_w_rep_ch_ref | characteristic_name | Characteristic Name | |
| ClassType | cfd_w_rep_ch_ref | class_type | Class Type | |
| ClassificationObjectType | cfd_w_rep_ch_ref | object_type | Type | |
| DataSubjectIdType | cfd_w_rep | data_subject_id_type | Data Subject ID Type | |
| BadiImplForDataSubject | cfd_w_rep | badi_impl_for_data_subject | BAdI Implementation | |
| AssociatedBODescription | _AssociatedBO | BusinessObjectName | ||
| SemanticActionName | cfd_w_rep | semantic_action_name | Semantic Action | |
| SemanticObjectName | cfd_w_rep | semantic_object_name | Semantic Object | |
| EnhancementPrefix | cfd_w_rep | enhancement_prefix | Prefix | |
| NamePrefix | cfd_w_rep | name_prefix | Prefix | |
| ShortEnhancementPrefix | cfd_w_rep | short_enhancement_prefix | Short Prefix | |
| _CdsViewComponentIdentifiers | _CdsViewComponentIdentifiers | |||
| _BusinessContext | _BusinessContext | |||
| _Type | _Type | |||
| _Origin | _Origin | |||
| _MasterLanguageText | _MasterLanguageText | |||
| _CreateUser | _CreateUser | |||
| _ChangeUser | _ChangeUser | |||
| _AssociatedValueHelp | _AssociatedValueHelp | |||
| _AssociatedLeadingDimension | _AssociatedLeadingDimension | |||
| _ValueHelpBindings | _ValueHelpBindings | |||
| _UiTexts | _UiTexts |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_Cfd_Custom_Field_Versions.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: P_CFD_FIELD_VERS
CREATE VIEW P_Cfd_Custom_Field_Versions AS
SELECT
Field.external_name AS ExternalName,
businessContext.business_context AS BusinessContext,
Field.name AS Name,
Field.version AS Version,
businessContext.deviating_field_name AS DeviatingFieldName,
case when businessContext.deviating_field_name = '' then concat(concat(Field.external_name, '_'), businessContext.persistence_context_suffix) else businessContext.deviating_field_name end as TechnicalName AS deviating_field_nameendasTechnicalName,
coalesce ( _UiTextsInOriginalLanguage.FieldLabel, _DataElementTextFallback.LongLabel ) as FieldLabel AS LongLabelasFieldLabel,
Field.type AS InternalType,
case when Field.type = #CFD_FIELD_TYPE.ASC_TO_STD then 'ASC_TO_CBO' else Field.type end as Type AS typeendasType,
case when Field.data_element_name = '' then Field.length else _DataElement.leng end as Length AS lengendasLength,
case when Field.data_element_name = '' then Field.scale else _DataElement.decimals end as Scale AS decimalsendasScale,
case when Field.data_element_name = '' then '' else _DataElement.datatype end as DataType AS datatypeendasDataType,
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,
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
FROM cfd_w_rep AS Field
INNER JOIN cfd_w_rep_bus AS businessContext ON /* join condition not captured in parsed metadata */
INNER JOIN tadir ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN cfd_w_rep_ch_ref AS characteristic ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_Cfd_User_Name AS _CreateUser ON _CreateUser.name = Field.created_by -- association [1]
LEFT OUTER JOIN P_Cfd_User_Name AS _ChangeUser ON _ChangeUser.name = Field.last_changed_by -- association [1]
LEFT OUTER JOIN P_Cfd_Business_Context AS _BusinessContext ON BusinessContext = _BusinessContext.BusinessContext -- association [1]
LEFT OUTER JOIN P_Cfd_Field_Type AS _Type ON type = _Type.Code -- association [1]
LEFT OUTER JOIN p_cfd_ui_text AS _UiTexts ON _UiTexts.ExternalName = ExternalName AND _UiTexts.BusinessContext = BusinessContext -- association [*]
LEFT OUTER JOIN p_cfd_ui_text AS _UiTextsInOriginalLanguage ON _UiTextsInOriginalLanguage.ExternalName = ExternalName AND _UiTextsInOriginalLanguage.BusinessContext = BusinessContext AND _UiTextsInOriginalLanguage.Language = MasterLanguage AND _UiTextsInOriginalLanguage.ComponentIdentifier = '' AND _UiTextsInOriginalLanguage.EnhancementObjectType = 'DATAELEM' -- association [1]
LEFT OUTER JOIN P_Cfd_Data_Element_Text AS _DataElementTextFallback ON DataElementName = _DataElementTextFallback.DataElement AND _DataElementTextFallback.MasterLanguage = _DataElementTextFallback.Language -- association [1]
LEFT OUTER JOIN I_LanguageText AS _MasterLanguageText ON MasterLanguage = _MasterLanguageText.LanguageCode -- association [*]
LEFT OUTER JOIN P_Cfd_Field_Origin AS _Origin ON Origin = _Origin.Code -- association [1]
LEFT OUTER JOIN dd04l AS _DataElement ON DataElementName = _DataElement.rollname AND _DataElement.as4local = 'A' AND _DataElement.as4vers = '0000' -- association [1]
LEFT OUTER JOIN P_CFD_ASSOCIABLE_BO AS _AssociatedBO ON AssociatedBusinessObject = _AssociatedBO.BusinessObjectID -- association [1]
LEFT OUTER JOIN P_Cfd_Associable_Cds_View AS _AssociatedValueHelp ON ValueHelpViewName = _AssociatedValueHelp.ViewName -- association [0..1]
LEFT OUTER JOIN P_Cfd_Associable_Cds_View AS _AssociatedLeadingDimension ON LeadingDimensionViewName = _AssociatedLeadingDimension.ViewName -- association [0..1]
LEFT OUTER JOIN P_CFD_VH_COMPONENT_NAME AS _CdsViewComponentIdentifiers ON ExternalName = _CdsViewComponentIdentifiers.FieldExternalName -- association [0..*]
LEFT OUTER JOIN P_Cfd_Value_Help_Bindings AS _ValueHelpBindings ON ExternalName = _ValueHelpBindings.ExternalName -- association [0..*]
;
Learn More
- CDS View Annotations — A Complete Guide
- 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 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA