on 07-11-2012 2:09 PM
Hi Forum,
I am working on SRM 7. I have created an inputfield in RFx UI using meta data now I want to hide the Lable of this input field.
This can be done by enhancing the WDDOMODIFYVIEW in the view but how to get the reference of lable from inputfield?
Please note that these UI elements are generated at runtime and will not be there in layout.
Thanks,
Anubhav
Hi Anubhav,
Please check below code,
DATA lo_nd_node_radio1 TYPE REF TO if_wd_context_node.
DATA lo_el_node_radio1 TYPE REF TO if_wd_context_element.
DATA lw_index TYPE i.
DATA lo_el_node_radio1_1 TYPE REF TO if_wd_context_element.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_first_name_lbl_vis TYPE wd_this->element_context-first_name_lbl_vis.
lo_el_node_radio1_1 = wd_context->get_element( ).
* @TODO fill attribute to Disable field label...
lv_first_name_lbl_vis = 01.
* set single attribute
lo_el_context->set_attribute(
name = `FIRST_NAME_LBL_VIS` " Label Attribute name
value = lv_first_name_lbl_vis ).
* @TODO fill attribute to enable field label...
lv_first_name_lbl_vis = 02.
* set single attribute
lo_el_context->set_attribute(
name = `FIRST_NAME_LBL_VIS` " Label Attribute name
value = lv_first_name_lbl_vis ).
*" call method set attribute property and pass value as 'X' to show
CALL METHOD lo_el_node_radio1_1->set_attribute_property
EXPORTING
attribute_name = 'FIRST_NAME_1' " InputField Attribute name
property = 1
value = 'X'.
*" call method set attribute property and pass value as SPACE to HIDE
CALL METHOD lo_el_node_radio1_1->set_attribute_property
EXPORTING
attribute_name = 'FIRST_NAME_1' " InputField Attribute name
property = 1
value = space.
Regards,
SuryaPraveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.