2005 Sep 01 1:23 PM
This may be a very silly question. I have two function groups x and y. X calls a z function module which is in the same funcion group as X. Now I want to pass some value that x gave to z to Y function module . How do I do it??
2005 Sep 01 1:29 PM
- you can create a function (of the Z group) with suited interface to take these values;
- you can use import/export parameter statements
2005 Sep 01 1:41 PM
2005 Sep 01 1:46 PM
2005 Sep 01 2:07 PM
In X Function module I have called a function module called Z . Both X and Z are in the same function group.
Now there are some values in X which I need in Y function module.
So I create a function module Z which gets values from X.
Now how do I get this table/Values to Y as it is in another function group. Could you please give me the code.
2005 Sep 01 2:15 PM
You would use the interface of the function module.
call function 'GUI_DOWNLOAD'
<b> exporting
filename = the_file_path
tables
data_tab = itab</b>
exceptions
others = 22.
Notice is this example, I am passing "the_file_path" as one value and the ITAB which is an internal table with many rows.
Regards,
Rich Heilman
2005 Sep 01 2:25 PM
I think function Z shouldn't called by X, but Y.
Infact X and Z are in the same group so they can see the global variables of group.
For example:
GROUP 1 -> Function X, Z.
TOP include.
DATA: FIELD1 TYPE C.
DATA X_BKPF LIKE STANDARD TABLE OF BKPF.
FUNCTION A.
FIELD1 = 1.
X_BKPF = .....
ENDFUNCTION.
FUNCTION Z.
EXPORTING
REFERENCE(FIELD)
TABLES
T_BKPF...
*----
FIELD = FIELD1. "Take field1 value
T_BKPF[] = X_BKPF[] "Take table values
ENDFUNCTION.
Group 2 Y
FUNCTION Y.
CALL FUNCTION Z
IMPORTING FIELD = FIELD_Y
TABLES T_BKPF = T_BKPF_Y.
ENDFUCTION.
Message was edited by: max bianchi
2005 Sep 01 4:35 PM
Thank you very much MAX I was able to solve the problem. I am not able to see the stars where I can give points. Thanks for the prompt and excellent example.
2005 Sep 01 5:24 PM
Ok! If you can't do it, I'll reward ten virtual points to myself