2015 Feb 13 8:18 AM
Hi all,
I have created a function group. in that I have given variables in the TOP Include.
How can i access that include in my program.
i tried INCLUDE keyword, but it gives error "Report or Program already exists "
Is it not possible to do so or Is there any other ways???
Regards
Vipin
2015 Feb 13 8:33 AM
Hi,
It is kinda possible.
The error you get is because the TOP Include, contains the syntax FUNCTION-POOL Z... and your program contains the syntax REPORT Z....
"
Each ABAP program can contain only one "REPORT", "PROGRAM",
"FUNCTION-POOL" statement.
"
So ... look for a workaround . Maybe create a new include ZTEST_TOP in both your FGRP top include and your report.
-
Andrei
2015 Feb 13 8:27 AM
Hi Vipin,
I think its not possible. Except top include u can use.
Why do u want to do so?
If u want to access any variable declared in FG to your program create two function modules..
One for set data and other for get data.
Regards
Sreekanth
2015 Feb 13 8:33 AM
Hi,
It is kinda possible.
The error you get is because the TOP Include, contains the syntax FUNCTION-POOL Z... and your program contains the syntax REPORT Z....
"
Each ABAP program can contain only one "REPORT", "PROGRAM",
"FUNCTION-POOL" statement.
"
So ... look for a workaround . Maybe create a new include ZTEST_TOP in both your FGRP top include and your report.
-
Andrei
2015 Feb 13 8:44 AM
2015 Feb 13 9:07 AM
2015 Feb 13 9:13 AM
Please also take into account what said:
Raymond Giuseppi Feb 13, 2015 9:44 AM (in response to Andrei Sosea)
Better use a new include named LZxxxxxxT01 (L + Function groupe name + T01) so it is considered as a subobject of the funtion group, and should not be forgotten in a future development.
He is absolutely right about the naming of the include. Use FGRP namespace.