Skip to Content
author's profile photo Former Member
Former Member

Exporting Internal Table

Hi

How can I export an internal table in a function module, which has a different structure from DB tables.

thanks in advance

regards

suneel

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 10, 2005 at 01:45 PM

    Create a structure in the data dictionary, use this structure for declaring your table in the TABLES statement.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2005 at 01:46 PM

    Can you explain it in more detail.

    if you mean you cannot change the interface of the FM but want to import the internal table. Then you can use

    export itab to memory id 'SOMENAME'.

    and in FM

    import itab from memory id 'SOMENAME'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2005 at 01:46 PM

    Hi Suneel,

    Are you talking about a standard Function Module or your own FM ? If it is a standard FM, you cannot pass an internal table which has a different structure from that defined in the interface.

    If it is your own FM, make the type of the tables parameter generic (i.e., type ANY).

    Hope this helps,

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2005 at 02:14 PM

    The TABLES feature in a FM interface is considered to be somewhat obsolete. At least as of 4.6 you can pass a table via the IMPORT, EXPORT and CHANGING parameters.

    Define a structure in the dictionary using SE11 that describes your internal table.

    For example: ZMY_STRUC

    Then define a table type in the dictionary using SE11.

    For example ZMY_T_STRUC

    Define your internal table.

    For example DATA: T_MINE TYPE ZMY_T_STRUC.

    In your FM interface, use ZMY_T_STRUC as the type for the parameter.

    Let us know how it goes.

    Also, not sure how to do it, but you might want to change the type of this posting to a question so that you can award points.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.