2006 Sep 14 11:43 AM
Hi all,
I have two Function Groups.
I have a subroutine defined in one Function Group and want to use same subroutine in another Function Group.
Is there any way to do it, <u><b>without redefining same Subroutine in another Function Group?</b></u>
2006 Sep 14 11:46 AM
You can use a subroutine defined in another program using
Perform <subroutine name>(Program name).
For this you get the include name which is having the subroutine and give it in the braces.
Hope this helps.
Hi all,
I have two Function Groups.
I have a subroutine defined in one Function Group and want to use same subroutine in another Function Group.
Is there any way to do it, <u><b>without redefining same Subroutine in another Function Group?</b></u>
2006 Sep 14 11:46 AM
You can use a subroutine defined in another program using
Perform <subroutine name>(Program name).
For this you get the include name which is having the subroutine and give it in the braces.
Hope this helps.
2006 Sep 14 12:02 PM
Gives dump, I have Include Program.
I used like Subroutine name( include name)
Message was edited by: shital phadake
2006 Sep 14 12:08 PM
Hi,
can u paste the Dump information and your code.
Please try including the include name in the Global data defination of the Function module.
Thanks.
2006 Sep 14 12:11 PM
Try this syntax.
The program name prog is the main program for the function group you have created already.
PERFORM form IN PROGRAM prog.
2006 Sep 14 11:47 AM
2006 Sep 14 12:12 PM
You can call the subroutine <Subroutine>(Program)
but you can't call like <Subroutine>(Include)
If you have the subroutine in include just include that in your program and you can direcly call the subroutine.
EX:
include <Include Name>
Perform <Subroutine Name>
...............
2006 Sep 14 12:18 PM
Hi,
either define subroutines in include
and inlude in function group
include ztest.
perform abc .
perfrom add.
Function group ZFG
include ztest.
Function group ZFG1
include ztest.
<b> or</b>
perform test(prog1).
Regards
amole
2006 Sep 14 12:32 PM
This Dump is because you called the subroutine refering to the include name, you have to refer to the main program name, the basic program of the function group.
Alexandre
2006 Sep 14 7:38 PM
Hi Shital,
If your problem is solved, reward helpful answers and close the post.
Thanks.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |