Skip to Content
avatar image
Former Member

main program , include , global itab

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 17, 2007 at 03:20 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2007 at 03:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 03:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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