a month ago
I have an odd situation with an Export parameter not being found in my include.
Here's the function declaration;
function z_ca_get_cluster.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IM_PROVIDER) TYPE ZCADEPARTMENT OPTIONAL
*" VALUE(IM_SUBPROVIDER) TYPE ZCASUBDEPT OPTIONAL
*" EXPORTING
*" REFERENCE(EX_FILE) TYPE FILE_TABLE. <--- Problem parameter
*" REFERENCE(EX_CLUSTERID) <--- Also not found
*"----------------------------------------------------------------------
clear: gt_recover.
Here's the includes;
*******************************************************************
* System-defined Include-files. *
*******************************************************************
include lzcaclustertop. " Global Declarations
include lzcaclusteruxx. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
include lzcaclusterlcl.
And here we are inside the include which has an issue;
class lcl_handler implementation.
method on_hotspot_click.
data: ld_value type zcafilename,
ld_row type lvc_s_row.
field-symbols: <row> type zcaclusterid.
sender->get_current_cell( importing e_value = ld_value es_row_id = ld_row ).
ex_file = ld_value.
...
endmethod.
endclass.
If I try to activate it, I get the following error;
Field "EX_FILE" is unknown.
I have tried activating the include by itself and I have tried activating everything together. I have tried deleting and readding the export parameters, but nothing seems to change this error. I have even tried forcing the activation but it short dumps when I try to run it.
Request clarification before answering.
Maybe you need a member variable of your class. Set this variable at your method. Then addd a method to access the variable. At the function module call this added method.
(If you doesn't create an object of the class change the method and object to class method and class data.)
class lcl_handler definition.
public section.
...
methods:
give_file
returning value(rt_file) type file_table.
...
private section.
data:
mt_file type file_table.
...
endclass.
class lcl_handler implementation.
...
method on_hotspot_click.
...
mt_file = ld_value.
...
endmethod.
...
method give_file.
rt_file = mt_file.
endmethod.
...
endclass.
function z_ca_get_cluster.
...
ex_file = lo_object->give_file( ).
" or ex_file = lcl_handler=>give_file( ).
...
endfunction.
Alternatively use an (old style) global variable within your function group (you already have another one - gt_recover?). Set the value to the global variable in the method. Get the value from this variable in the function module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.