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

Dynamic Export table of a function Module

Hi Friends,

I have a requirement where fields of Export table of my function Module is dynamic. It is like the Fields to be expoerted by the Function Module would be stored in a seperate Z table

The Z table would contain the records as follows .

Table Name FieldName

=========

MARA MATNR

MARC WERKS

.....

......

and So on..

. How can I define my Export table in Function module dynamically so that the structure of my Export Function Module would be same as that of the Fieldnames in Z table..

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 04, 2010 at 09:39 AM

    Just declare the associate type as "ANY TABLE" in the exporting parameter.

    FUNCTION ZTEST.
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  EXPORTING
    *"     REFERENCE(IT_TAB) TYPE  ANY TABLE
    *"----------------------------------------------------------------------

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2010 at 11:38 AM

    Hi Asik ,

    Thanks for answering .

    My function module is going to be called Remotely . Hence I can not define the Table with 'TYPE ANY'.

    Regards

    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.