2006 Jul 07 3:37 PM
Hello,
Say I have an include that contains all the data declarations and another include contains some forms. Do I need to include the include with data declaration in the include with forms? If not, how can I use, say, an internal table that I have declared in the data declaration include in the forms include?
Thanks a lot!
Regards,
Anyi
2006 Jul 07 3:39 PM
2006 Jul 07 3:39 PM
2006 Jul 07 3:39 PM
you first create a report program
there,
write all the includes there.
LIKE
INCLUDE ZDATA_DECLARATIONS
INCLUDE ZFORMS.
etc..
2006 Jul 07 3:39 PM
Sample Code:
REPORT ZTEST.
INCLUDE ZTESTTOP. " Data declarations Include
INCLUDE ZTESTFORMS. " Subroutines
All the declarations in the TOP include are global variables and can be accessed in the FORMS include.
Any variables declared inside the FORMS include will not be available outside the FORMS include.
-Kiran
2006 Jul 07 3:40 PM
if an include has the data declaration, then include it in the report which has all the forms and logic .
report ztest
include zdata.
write: v_val. "v_val is declared in zdata
Regards,
ravi
2006 Jul 07 3:40 PM
Usually you include both these in the main program.
INCLUDE DATA_DECL_INCLUDE
INCLUDE FORMS_INCLUDE.
Main program.
If you do this all the variables you have declared in the data declaration include will be available for the forms include.
Regards,
Ravi
2006 Jul 07 3:41 PM
Hi
follow like this.
PROGRAM TEST.
INCLUDE INC_DECLARATIONS.
INCLUDE INC_FUNC_MODULES.
...
In INC_DECLARATIONS all data will be declared.
Func modules in INC_FUNC_MODULES can use those declarations.
Bala
2006 Jul 07 3:41 PM
hi,
if u say the first include is ZMIN1 and the second report or some include like ZMIN2 then
under second one
Report ZMIN2.
Include ZMIN1.
i think it would be helpful for you
Regards,
Naveen
2006 Jul 07 3:43 PM
Hi Anyi,
1) Yes,You can use both INCLUDEs in a report.
2) For this create a report and specify these two includes as
REPORT ZREPORT.
INCLUDE ZREPORT_DATA.
INCLUDE ZREPORT_FORMS.
Thanks,
Vinay