2015 Apr 09 8:12 AM
Hi Experts,
I am passing three internal tables as using parameters in a subroutine in my program. I am little confused if it is recommended to pass so many tables as parameters.
Could you please let me know.
Thanks in advance.
2015 Apr 09 10:40 AM
Hi Tiki,
Previously i was thinking like Gaurav, but some days back, i read one document that SAP never recommended to define the data variable at global level.
Because when the program load SAP collect all the data object into Stack memory global objects always remain same till that program is in memory.
So if we can define the data at local level it will automatically clear from memory when the scope of the blocks end.
Thanks and Regards,
Nishant
Hi Experts,
I am passing three internal tables as using parameters in a subroutine in my program. I am little confused if it is recommended to pass so many tables as parameters.
Could you please let me know.
Thanks in advance.
2015 Apr 09 8:45 AM
Hi ,
I was also curious to know if it is recommended to pass these many tables in the perform.
The F1 help also does not gives any such information.
If your table are globally defined you dont have to pass them in using parameters, but depending on your requirement, you can use USING and CHANGING parameters of the perform apropriately.
Would like other Gurus also to comment/share their views on this.
Hope this helps.
2015 Apr 09 10:36 AM
Hi!
I think if you are not passing huge tables by value, it's not a problem.
But as far as PERFORMs are obsolete now you can use local classes for your program. Defining these 3 tables as class attributes will let you forget about USING parameters.
2015 Apr 09 10:40 AM
Hi Tiki,
Previously i was thinking like Gaurav, but some days back, i read one document that SAP never recommended to define the data variable at global level.
Because when the program load SAP collect all the data object into Stack memory global objects always remain same till that program is in memory.
So if we can define the data at local level it will automatically clear from memory when the scope of the blocks end.
Thanks and Regards,
Nishant
2015 Apr 09 2:03 PM