on 04-27-2009 8:46 AM
Hi,
there is a UI Element ->"text-input field" on the view.
How can I insert this value into a sap table which the user has entered finally
Can you please tell me the procedure to achieve this ?
Kindly Regards
ertas ilhan
hi,
You must be having an Input Field which is binded to your Context Attribute.
So just Read the Context Attribute which is binded to your INput field. You can do so by using Code Wizard ( control + F7).
This way , you will be having the Value entered by user in INput field into a Variable.
Now you can use this variable to update the Table.
Through Code Wizard , you will get this code automatically if you read the Context Attribute :
Here context Attribute is ATTR and is directly Under Context Node.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_attr TYPE wd_this->element_context-attr.
get element via lead selection
lo_el_context = wd_context->get_element( ).
@TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `ATTR` < ATTR is your Context Attribute binded to Input Field>
IMPORTING
value = lv_attr ).
lv_attr is variable which contains value entered by user.
Thanx.
Edited by: Saurav Mago on Apr 27, 2009 1:25 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Get the attribute value which is bound to your uielement.
Try this
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'NODE NAME' ).
* get attribute
l_node->get_attribute( exporting name = 'ATTRIBUTE NAME'
importing value = l_value ).
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.