Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dynamic function module call

Former Member
0 Likes
4,673

Hi all,

can anybody suggest me how to handle import, export and tables parameters in a dynamic function module call if they are associated with TABLE types.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
4,466

You might be interested in reading this [http://help.sap.com/abapdocu_702/en/abapcall_function_dynamic.htm].

but the issue is , can we actually input the table type data at run-time if yes, how is it possible

Actually we can. So given this, I stil don't know what you are missing in your code.


DATA: l_funcname TYPE c LENGTH  30,
      l_data TYPE swncdatum,
      l_time TYPE swncuzeit.

DATA: data TYPE REF TO data,
      l_type TYPE c LENGTH 30.
FIELD-SYMBOLS <fs> TYPE table.


l_data = '20110101'.
l_time = '121212'.

l_funcname = 'SWNC_GET_WORKLOAD_SNAPSHOT'.
l_type = 'SWNCGL_T_AGGTASKTYPE'.

CREATE DATA data TYPE (l_type).
ASSIGN data->* TO <fs>.


CALL FUNCTION l_funcname
  EXPORTING
    read_start_date = l_data
    read_start_time = l_time
    read_end_date   = l_data
    read_end_time   = l_time
  IMPORTING
    tasktype        = <fs>.

39 REPLIES 39