Skip to Content

Create Structure with dynamical Table-Type

Hi experts,

is there a possibility, to create a structure via SE11 and including there a field which referes to a dynamic table-type.

So that I can append to this structure-field all different table-types?

for example: ones I append MARA[] and ones AFKO[]

Thx for help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 14, 2011 at 01:26 PM

    Hi Christian,

    There's not predefined generic type to do that, but you could create your own field type (deep structure) which would be able to keep table lines after transposition (90 degree flip) where in example it would have four columns: Table type, row id(index) field name, value. That way you could store ANY table row you need... This will not come cheap and will involve some work of course.

    You may want have a look at standard ABAP services RRTS and RTTI (see classes and structures used in attributes an parameters) - these are two services for handling data types and metadata related operations during runtime. You may want to use them for flipping your table entries to the tabular form and so on. You may also find some ideas there on how to compose your own data type for your purposes.

    Good luck!


    Add a comment
    10|10000 characters needed characters exceeded

    • I already found the solution on my own:

      fieldtype must be DATA and you have to set the flag at ReferenceType

      In Programm you can append different table-types with the use of field-symbols and "create object".

      example on mara:

      field-symbols: <fs_mara> type standard table.

      create data <struct>-dyn_table type table of MARA.

      assign <struct>-dyn_table->* to <fs_mara>.

      <fs_mara> = mara[].

      thats it.

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.