cancel
Showing results for 
Search instead for 
Did you mean: 

data retreiving from function module into component controller

Former Member
0 Kudos

hi

how can we get the data from function module into component controller.what is the code to retreving the data.

Accepted Solutions (0)

Answers (4)

Answers (4)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can also use the Service Call Wizard. It has the nice addition that it will generate a matching Context for the interface of your function module (or any service target it supports):

http://help.sap.com/saphelp_nw70/helpdata/EN/47/a189b0ee583b8be10000000a421937/frameset.htm

Here is a video on the subject as well:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/093055e7-0b01-0010-d89d-cf883...

Former Member
0 Kudos

Hi,

Just Call a function module in any event that has to triggered.

for ex call FM in WDDOINIT.

Pass the importing values to the FM and set the Node attribute from the exporting values of FM. Now the node will have the FM returned values.

Regards,

Vimal

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Into Component Controller means you want the data in the Context of a component Controller

Analyze the Function Module what it is returning?

If it returns a Structure create a Cotnext Node of the Structure Type with cardinality 1..1

If it returns a table create a context node of the table line type with cardinality 0..n

Call the function Module in the Component Controller's WDDOINIT method if you need it on initialization of the component

use the code to put the data in your context of the component controller

data : lr_node type ref to if_wd_context_node.

lr_node = wd_context->get_child_node( '<name of the node>' ).

lr_node->bind_table( <internal table returned after the Funciton module call>' ).

Use Pattern to call the function Module or use statement CALL FUNCTION as in normal reports or module pools

also go through

http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro...

Abhi

Edited by: Abhimanyu Lagishetti on Jul 9, 2008 7:36 AM

Former Member
0 Kudos

you can simply execute that function module in WDDOINIT method or at any point of time you wish it.

after execution of that function, you can set it to corresponding context node / attributes.