Skip to Content
0
Former Member
Aug 21, 2012 at 10:06 AM

Field properties: the field NOTE11 is not in the feeder catalog

1105 Views

Hi,

I want to add one custom field in the EHP5 ESS Personal Profile page in the bank data section fo country GB. From the component configuration 'HRESS_CC_PER_DTL_BANK_GB' I found that the feeder class name is CL_HRESS_PER_DETAIL_BANK. I enhanced the GET_DEFINITION method but could not modify the GET_DATA method as it tells that it needs to be enhanced in the class CL_HRESS_PER_DETAIL. I enhanced the GET_DATA method in that class as well to add the custome field. But when I go to the component configuration to add the custom field I get the error:

Field properties: the field NOTE11 is not in the feeder catalog

All my code is given below.Just wondering as the GET_DATA enhancement is not in the feeder class specified in component config, the error comes.

Class:CL_HRESS_PER_DETAIL_BANK

Method:IF_FPM_GUIBB_FORM~GET_DEFINITION

CONSTANTS: c_note01 TYPE char6 VALUE 'NOTE11', "Field 1
c_x TYPE char01 VALUE 'X', "Set
c_vis TYPE char02 VALUE '02', "Visible
c_dis TYPE char02 VALUE 'IN', "Display
c_str TYPE char16 VALUE 'LS_CUSTOM_FIELDS'. "Structure
TYPES:
BEGIN OF s_custom_fields,
note01 TYPE string, "Field 1

END OF s_custom_fields .
*Data Declarations
DATA lt_component_tbl TYPE abap_component_tab. "Comp table
DATA ls_custom_fields TYPE s_custom_fields. "Com fields
DATA ls_new_component TYPE abap_componentdescr. "description
DATA lo_new_component TYPE REF TO cl_abap_typedescr. "type descrip
DATA lo_new_component2 TYPE REF TO cl_abap_structdescr."Stru desc
*Field sysmbols
FIELD-SYMBOLS <ls_new_field_descr> TYPE fpmgb_s_formfield_descr."Newfl
FIELD-SYMBOLS <fs_wa_mand_field> TYPE fpmgb_s_formfield_descr."stru
*Add lines to table
APPEND INITIAL LINE TO et_field_description ASSIGNING
<ls_new_field_descr>.
*Filling values to the added line
<ls_new_field_descr>-name = c_note01. "field 1
<ls_new_field_descr>-label_by_ddic = c_x. "set x
<ls_new_field_descr>-visibility = c_vis. "Visibility
<ls_new_field_descr>-default_display_type = c_dis. "Display
*Clearing values
IF <ls_new_field_descr> IS ASSIGNED.
UNASSIGN <ls_new_field_descr>.
ENDIF.

" Get table of all fields, visible in GUIBB
CALL METHOD eo_field_catalog->get_components
RECEIVING
p_result = lt_component_tbl. "Comp table

" Describe data in LS_CUSTOM_FILED
CALL METHOD cl_abap_structdescr=>describe_by_data
EXPORTING
p_data = ls_custom_fields "Cust table
RECEIVING
p_descr_ref = lo_new_component. "New comp
*Casting
lo_new_component2 ?= lo_new_component.

" Add custom fields to field catalog
ls_new_component-name = c_str. "Structure Name
ls_new_component-type = lo_new_component2. "Component
ls_new_component-as_include = c_x. "Set
ls_new_component-suffix = space. "Suffix
APPEND ls_new_component TO lt_component_tbl. "table of component
*Catch Exception
TRY.* Field Catlog Create
CALL METHOD cl_abap_structdescr=>create
EXPORTING
p_components = lt_component_tbl "Component table Create
RECEIVING
p_result = eo_field_catalog. "Catlog
CATCH cx_sy_struct_creation. "Exception
ENDTRY.

Class: CL_HRESS_PER_DETAIL

Method: IF_FPM_GUIBB_FORM~GET_DATA

DATA: v_otr_text TYPE string VALUE 'ZEHRWDNP/NOTE11', "OTR text
v_designation TYPE string. "Real Text

CONSTANTS: c_note01 TYPE char6 VALUE 'NOTE11'. "Field 1

* Call Method for OTR text convert
CALL METHOD cl_bsp_get_text_by_alias=>get_text
EXPORTING
language = sy-langu "language
alias = v_otr_text " Alias
RECEIVING
alias_text = v_designation. "Text
*Component Assignment
ASSIGN COMPONENT c_note01 OF STRUCTURE cs_data TO <lv_datasharing>.
IF <lv_datasharing> IS ASSIGNED.
<lv_datasharing> = v_designation. "Text
ev_data_changed = abap_true. "set
ENDIF.

Please help.

Regards

Arindam