on 01-20-2009 1:05 PM
Hi,
How do I change the text og af Caption element at runtime.
Thanks,
Morten
Hi Morten,
You can bind the text property of the UI element to the attribute in the context.
Based on the value settings u make to the attribute that value will be shwon.
The attribute type shuld be string.
Hope it helps.
Regards,
Shashikanth. D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Morten,
You have to create a context attribute of type string and you have to bind the text property of this caption with this attribute..... now at run time when you want to give the text to this caption write this code...
data: lo_nd_cn_pernr type ref to if_wd_context_node,
lo_el_cn_pernr type ref to if_wd_context_element,
lv_ca_pernr type String.
lo_nd_cn_pernr = wd_context->get_child_node( name =
wd_this->wdctx_cn_pernr ).
*get element via lead selection
lo_el_cn_pernr = lo_nd_cn_pernr->get_element( ).
*set single attribute
lv_ca_pernr = 'Hello'
lo_el_cn_pernr->set_attribute(
exporting
name = `CA_PERNR`
value = lv_ca_pernr ).
regards
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found out myself
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.