on 04-06-2016 7:54 AM
Dear Experts,
facing issue with custom field description. We have created couple of custom field and showing key and key-description next to that .
Issue is when I press F4, key description is not automatically copied to key-description field, I need to press enter or perform some action .
Same is working at Standard field, when I select any field from F4 key and description automatic copied .
Any catch why this is happening ?
Regards,
Varun
I have had this issue.
I got around it by creating an exit on the search help and populating the description in the results table of the search help before it's passed back to the screen. Worked perfectly.
You could try this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As long as you know what search help is being used:
It might be worth checking up how your text field is set up.
I had to set up my text tables very carefully to get everything to work properly.
1. Check table for actual field set up.
2. Text table containing only key fields from check table, language ,and description
3. Foreign key on text table fields to link to check table and to define text table as a text table you your check table
4. Domain of actual field needs your check table in the 'value range' field
This way you do not have to add your description field to the data model or any feeder classes. It will pull through as available in the uibb automatically and pull in the description automatically in the process as with standard fields. You may have to regenerate data structures before going to ui configuration.
I wrote some documentation with screenshots on this once. Let me know if you would like me to find it and send it to you.
this is for material data model
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
Please check below steps:
METHOD /plmu/if_frw_g_field_def~change_field_definition.
"Get the current UI structure's field list
DATA(lt_fields) = co_catalogue->get_included_view( ).
DATA: lo_field_description TYPE REF TO cl_abap_datadescr,
lv_type TYPE YKEY_TXT. "Data Element for Description field
DATA: lt_components TYPE cl_abap_structdescr=>component_table.
"Get data type of custom field for description
lo_field_description ?= cl_abap_datadescr=>describe_by_data(
p_data = lv_type
).
"Add field to UI data structure
INSERT
VALUE #(
name = 'Y_KEY__TXT'
type = lo_field_description
)
INTO TABLE lt_fields.
"Add UI field to description structure
INSERT
VALUE /plmu/s_frw_g_field_descr_appl(
name = 'Y_KEY__TXT'
)
INTO TABLE CT_DEFINITION.
MOVE-CORRESPONDING lt_fields TO lt_components.
co_catalogue = cl_abap_structdescr=>create(
p_components = lt_components
).
"Call super class method
CALL METHOD super->/plmu/if_frw_g_field_def~change_field_definition
IMPORTING
et_special_groups = et_special_groups
CHANGING
co_catalogue = co_catalogue
ct_definition = ct_definition.
ENDMETHOD.
METHOD /plmu/if_frw_g_after_get_data~after_get_data.
ASSERT it_selected_fields IS SUPPLIED. "Should always be passed in as of 7.31+
DATA: lv_key TYPE YKEY, "Custom field Key
lv_key_txt TYPE YKEY_TXT. "Custom field description
CALL METHOD super->/plmu/if_frw_g_after_get_data~after_get_data
EXPORTING
iv_first_time = iv_first_time
io_event = io_event
it_selected_fields = it_selected_fields
IMPORTING
et_message = et_message
ev_field_usage_changed = ev_field_usage_changed
ev_action_usage_changed = ev_action_usage_changed
CHANGING
ct_field_usage = ct_field_usage
ct_action_usage = ct_action_usage.
mo_context->get_attribute(
EXPORTING
iv_name = 'Y_KEY' " Custom field
IMPORTING
ev_value = lv_key
).
"Based on lv_key fetch the lv_key_txt value and set the value on UI
*lv_key_txt = 'TEST'.
mo_context->set_attribute(
EXPORTING
iv_name = 'Y_KEY__TXT' "Custom field description
iv_value = lv_key_txt
).
ENDMETHOD.
Hope this works!
Hi Varun,
Try assign FPM_REFRESH event for your custom field at UI config level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.