Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8493397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:59:42+00:00 2026-06-10T22:59:42+00:00

I am exporting a dynamicaly created internal table to memory. I’d like to know

  • 0

I am exporting a dynamicaly created internal table to memory.

I’d like to know if it’s possible to somehow get it back (from another program), with the addition that whereas the first program at least KNOWS the name of the table from which i dynamically created my itab, the second program doesn’t.

Here’s my code that exports my itab (which works 😛 ).

parameters: pi_tbl(5) type c obligatory.    "The table name - input from the user. can be jibberish.

data: gr_tabref type ref to data.
field-symbols:<gfs_tab> type any table. 

form create_dynamic_gr_tabref .
  data: lo_struct type ref to cl_abap_structdescr,
        lo_tabref type ref to cl_abap_tabledescr.
  lo_struct ?= cl_abap_typedescr=>describe_by_name( pi_tbl ).
  try.
      call method cl_abap_tabledescr=>create
        exporting
          p_line_type  = lo_struct
        receiving
          p_result     = lo_tabref
          .
    catch cx_sy_table_creation .
      message 'Couldn''t create the table description. Quitting' type 'E'.
  endtry.
  create data gr_tabref type handle lo_tabref.

  assign gr_tabref->* to <gfs_tab>.

  select * from (pi_tbl) into table <gfs_tab> up to 200 rows.
  data: lv_memory_id(30) type c.
  lv_memory_id = 'MYMEMORYID'.

  export itab from <gfs_tab> to memory id lv_memory_id.

endform.

Can I get the data back only with parameter with the name of the table?

What I want is to declare a generic data type, and just poor the data into it, something like:

Object myObject; import itab to myObject memory id 'MYMEMORYID'.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:59:43+00:00Added an answer on June 10, 2026 at 10:59 pm

    For Tables: Yes, it can be done, but it shouldn’t be done. One reason is that the user session will have to carry the data around unless you’re very carefull to release the memory, another one is that this is a kind of hidden global (as in cross-program) variable which is usually a bad idea to introduce it into new programs. If you have control over both the caller and the called program, function module or class, there are better ways to transfer the data. Use this only if you have to / want to use some other program that you cannot change to provide a better interface — or in some special cases like SUBMIT ... EXPORTING LIST TO MEMORY. This is one of the “legacy-smelling” parts of ABAP that it’s good to now about, but that you can do without for most of the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exporting some data from mysql to a csv file using FasterCSV. I'd like the
I am writing an exporting function to take data from a database table and
I am exporting data table from php page to pdf I got the page
When exporting a Visual Studio project to a Template (File/Export Template...) I get the
I don't know why but I thought I could statically link a function from
I have a big problem with exporting my table to Excel file format. Firstly
Does anybody know how to get around to following problem....... i am trying to
I'm exporting my php as jsonp and then calling a js file which loads
Here i am exporting the datatables in a dataset to excel.How to make the
I'm exporting some data, making a file and writing the data to the file...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.