2006 Jun 05 1:24 PM
Hello...
I am facing a problem in Function Module. I am using Tables in FM. When I create a subroutine in separate include and try to call that table in that Subroutine it gives me error table not found. I have seen many FM using tables and calling them in separate include without specifically declaring the table.
Please guide.. I am not able to find my mistake...
Thanks & Regards
Ankur
2006 Jun 05 1:36 PM
hi,
this is because all the function module parameters are local by default.so these parameters will NOT be visible in any further includes.
To MAKE all the parameters visible in all includes & we should make them global(instead of local)
in se37 change,
go to menu
EDIT->INTERFACE->GLOBALIZE PARAMETERS.
if you click on this , all the parameters change to GLOBAL.SO you can access them in any includes.
then activate it.
regards
srikanth
Hello...
I am facing a problem in Function Module. I am using Tables in FM. When I create a subroutine in separate include and try to call that table in that Subroutine it gives me error table not found. I have seen many FM using tables and calling them in separate include without specifically declaring the table.
Please guide.. I am not able to find my mistake...
Thanks & Regards
Ankur
2006 Jun 05 1:26 PM
no for each and every FM there is Global Declaration include program like this exp.
<b>include lgraptop. " Global Data</b>
regards
Prabhu
2006 Jun 05 1:30 PM
ya...coz when u access the field...that variable is accessed locally and unless u declare it then and ther it'll throw that error...
it's like SCOPE in 'C'...
reward points if it helps
regds
gunjan
2006 Jun 05 1:33 PM
Hi Ankur,
You can declare the tablename in the TOP include of your function module.This TOP Include will usually have Tables and Data declarations.
You can find the TOP Include from the function pool.Function pool name will be given on the FM attributes screen.
If this is useful, award points pls..
Thanks.
Regards,
Bharadwaj
2006 Jun 05 1:34 PM
Hi,
As Prabhu already stated: You'll need to add an include statement somewhere in the declarations part of the function group (where your FM is located).
Most often the TOP include is used for this.
Suppose your include has the name ZMYINCLUDE01 and there-in your TABLES statement is located.
Look for the TOP include (starting with letter "L" and ending with text "TOP". Open this one and put the statement "include ZMYINCLUDE01." into it.
Once activated your TABLES statement has been declared globally and you do not have to put it somewhere else anymore.
Regards,
Rob.
2006 Jun 05 1:36 PM
hi,
this is because all the function module parameters are local by default.so these parameters will NOT be visible in any further includes.
To MAKE all the parameters visible in all includes & we should make them global(instead of local)
in se37 change,
go to menu
EDIT->INTERFACE->GLOBALIZE PARAMETERS.
if you click on this , all the parameters change to GLOBAL.SO you can access them in any includes.
then activate it.
regards
srikanth
2006 Jun 05 1:59 PM
Hi,
goto
se37...........Enter FM Name ( Change Mode ).
1)edit>interfaces->Globlize Parameter
this to make the parameter global within the includes of the function Module.
local parameter is good. in that case u have to pass the tables in the table option of the perform to make the parameter available in the include of the FM ; since forms are present in the Include of the FM.
Mark Helpfull Answers
Regards
2006 Jun 05 2:49 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |