Skip to Content
author's profile photo
Former Member

Passing Internal table as parameter to a Method

Hi,

Can somebody tell me how to pass an Internal table as a parameter to a method?

Thanks in advance,

Best Regards,

Manish

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Oct 04, 2005 at 01:35 PM

    I think you must pass the <i>body</i> of the table (I mean itab[] instead of itab).

    Cheers,

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 04, 2005 at 01:36 PM

    use table type parameter for casting.

    Methods m1

    importing it_tab type (tabletype).

    ...

    Endmethod.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 04, 2005 at 01:45 PM

    hai,

    you should create a table type for a sturture you want to pass the internal table in data dictionary sell

    and you shouls declare teh internal table with type ref to and then pass it.

    if nay doubts pls come back

    cheers

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 04, 2005 at 01:52 PM

    data: itab1 type string occurs 0 with header line.

    ....

    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

    exporting

    FILENAME = 'C:\ftext.txt'

    • APPEND = 'X'

    changing

    DATA_TAB = <b>itab1[].</b>

    Svetlin

    Add comment
    10|10000 characters needed characters exceeded