07-24-2019 8:34 AM
i want to create an internal table in function module and apppend it to global and second function module will take the data and perform operation and give it to export
can anyone help??
07-24-2019 8:46 AM
Try declaring the internal table which you want to use in your second FM at the top include of your function group. To do so,
open your first FM in SE37.
click on object list button at the top or view your function group.
you will see a top include for your function group. Declare your internal table here in this include.
create the second function module under the same function group. you can access the internal table directly in second function module.
07-24-2019 8:54 AM
Don't use that kind of obsolete encapsulation anymore. Use a global class with the internal table as an attribute with setter-getter methods. If there can be only one instance apply the singleton design pattern.
07-24-2019 10:58 AM
Create one internal table inside FM and one in main program with same structure.
Add data in Internal Table of FM and export it to the main program in main program's Internal Table (global).
Now pass that global Internal table to second FM and use it.
07-24-2019 4:49 PM
Are the 2 function modules in the same function group? Is your question about how to declare a global variable in a function group or what?
Anyway don't do it that way, refer to the answer by Gábor Márián.