on 06-04-2007 7:21 AM
Hi All,
Plz tell me, How can I call a function module in WDA.
I have an Inputfield and a attribut under a node. I have a FM, too.
I need to call the FM in a Method.
How can I do it?
thx
Best Regards
Shuo
Hi,
For eg, if you want to display the result of FM in webdynpro input field.
IN wddoinit method of view that is created by you,
DATA:
node_node1 TYPE REF TO if_wd_context_node,
elem_node1 TYPE REF TO if_wd_context_element,
stru_node1 TYPE wd_this->element_node1 ,
item_attr1 type string.
You can use pattern to call the FM
CALL FUNCTION 'FUNCTION_NAME_XXXX'
importing
var1 = item_attr1
.
YOu can use webdynpro code wizard to generate this code. ( read attribute )
navigate from <CONTEXT> to <NODE1> via lead selection
node_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
get element via lead selection
elem_node1 = node_node1->get_element( ).
get single attribute
elem_node1->set_attribute(
EXPORTING
name = `ATTR1`
value = item_attr1 ).
If you want more information please go through the tutorials available in sdn or visit
help.sap.com and search for webdynpro abap.
Thanks,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
For more code sample on webdynpro, please check the following URL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Calling of FM is same like as you call in normal programs.
After getting the data from FM, you have to bind the the structure to the node or set the the value to the attribute which is used for your inputfield.
Thanks,
Prashanth
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.