Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

main program , include , global itab

Former Member
0 Kudos

hi

i have main program , which calls a perform stmt whose form is written in a include program.

now for my requirement, i need to work on an internal table,

and calculations have to be done in the form inside the

include program. and send back this itab after performing the calculations on itab in form.

one trial could be that, i add one more parameter perform stmt, but there are 10 more programs using the

same include and same form, they all will get affect, which is a serious concern,

another idea would be to declare this itab in main program as global use it in the perform inside include,

after manipulations on itab, we can use it back in our program, after the changes.

Does any one know a better idea, can any one help me creating such global data as to use

both in include and main program

4 REPLIES 4

Former Member
0 Kudos

if you have to use the same include then.. you have no option left , other than delclating this intenal table in the main program before the include statemant and manipulate the table in include and it will be available back in the main program with data.

Thanks

Mahesh

Pawan_Kesari
Active Contributor
0 Kudos

If that subroutine is used by some other programs too then you can not change the interface of the subroutine.

My suggestion is to copy that subroutine to new subroutine in same include and then change the code of the new subroutine as you may like, by added parameter or by declaring a global internal table.

Former Member
0 Kudos

hi guys,

thank you for the replies,

but can any one help me declare the global internal table before the include,

that is syntax and example etc.

thanks

0 Kudos

Hi Sanjana,

Even after declaration of this ITAB in main program, you have to declare it in all other programs which are having that include program.

Regards,

Atish