on 03-06-2014 4:31 PM
Hello experts,
How can I customize or edit Object links tab with standard search helps. I have a request to change this and use the standard search helps , the enterprise search for fields like material numbers or WBS. Is this possible?
I want to change this and have the F4 search help here.
Thanks in advance
Hello Catalin,
Yes, it's possible. The standard SAP functionality was designed to cover any kind of object link. I'm guessing you need to have, for example, the standard enterprise search help for materials, provided by the PLM framework. Basically, change the data type of the field with /PLMB/MATNR and obviously hide the Find button. Is that correct?
In this case, you only have to do an enhancement to the DPR_OBJLINKS component in the VI_OBL_CREATE view. You can simply create an overwrite for the WDDOMODIFYVIEW method and manipulate both the context and the layout.
Hope this helps!
Tudor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure,
You copy paste the code from the WDDOMODIFYVIEW method into the overwrite enhancement of the same method.
At some point in this code, you'll find the following statements:
* Create node attributes, layouts & UI elements
loop at wd_this->mt_id_fields into ls_id_fields.
* Prepare ID names
concatenate lc_label_prefix ls_id_fields-name into lv_label_id.
translate lv_label_id to upper case.
concatenate lc_input_prefix ls_id_fields-name into lv_input_id.
translate lv_input_id to upper case.
"******************************
" Here you can check the field name and change the data element, the standard one defined by "constant lc_type_name is STRING.
case <fs_id_field>-name.
when 'matnr'.
ls_attribute_info-type_name = '/PLMB/MATNR'.
lv_button_needed = abap_true.
...
endcase.
"******************************
* Fill context node attributes info (ls_attribute_info)
ls_attribute_info-name = lv_input_id.
" ls_attribute_info-type_name = lc_type_name.
ls_attribute_info-node_info = lr_child_node_info.
ls_attribute_info-is_static = abap_false.
ls_attribute_info-value_help_mode = 1.
* Add attribute to context node
call method lr_child_node_info->add_attribute
exporting
attribute_info = ls_attribute_info.
Also, if you want to hide the button, you'll need to add an extra condition to the statement:
* Add a search button at the first ID field
if lv_root_container_indx = 6 and lv_search is not initial
and lv_button_needed eq abap_true.
* Create UI element: button
lv_search_text = cl_wd_utilities=>get_otr_text_by_alias(
alias = 'SOTR_VOCABULARY_BASIC/FIND' language = sy-langu ).
...
I think that's pretty much all of it... at least, that's what I used. Good luck!
Tudor
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.