Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Save Internal table to memory - problem

Former Member
0 Kudos

Hi everybody ,

I need to extract one Internal table to memory , every 1st in the Month .

Then every day I will be reading this table for my report ( in order to avoid running every day same and same database selections) .

My originall idea wos with EXPORT TO MEMORY ID , AND IMPORT

but it does'nt work next day ... With Export data is cept only untill tthe end of the transaction ...

Is there any way except of storing data in one Z_ database table ???

Thanks in advance

1 ACCEPTED SOLUTION

former_member197281
Active Participant
0 Kudos

Hi Neno,

Use this [ Export to memory id 'table1234' ] for exporting the internal table and import from the same memory id.In sometimes the no of characters we give may cause the error you said..Use the above said memory id..'table1234'.

<b>Reward points if helpful,</b>

regards,

jinesh.

6 REPLIES 6

former_member197281
Active Participant
0 Kudos

Hi Neno,

Use this [ Export to memory id 'table1234' ] for exporting the internal table and import from the same memory id.In sometimes the no of characters we give may cause the error you said..Use the above said memory id..'table1234'.

<b>Reward points if helpful,</b>

regards,

jinesh.

Former Member
0 Kudos

Are you sore that the problems are in characters???

And that with export to memory data will be hold there for one month untill I will overwrite them with new data??? An respectively I will be able to read them every day???

Here is the name of the table I am using IT_FINAL_DATA and the name of the memory id is the same!!!

Also the name of one DATE variable is EXPORT_BORDER_DATE and the memory ID is the same.

Thanks

0 Kudos

Hi,

i have encountered the same issue.....but solved when i did the same...

you can check first with a sample program......

<b>Reward points if helpful,</b>

Regards,

jinesh.

0 Kudos

Hi Neno,

You can use my code pasted above,

Just remove the delete code and you can use it for as long as u like.

Regards,

Samson Rodrigues.

Former Member
0 Kudos

Hi Neno,

What I feel about the solution to your problem is a 2 step procedure.

Firstly,prepare a report and save the table data on the Application Server on a file.Schedule this report as a background job for every 1st of the month.

Then prepare another report in which you would be calling this file where your table data is stored through GUI_DOWNLOAD and then you can also include the logic for your daily processing in this report.

I hope I was clear enough.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Former Member
0 Kudos

Hi,

You can use the following code to export to memory

*data variable required for background processing

data: wa_indx type indx.

*EXPORT Internal Table TO MEMORY ID 'XYZ'.

*part for background processing

export tab = <your table> to database indx(xy) from wa_indx client

sy-mandt id 'XYZ'.

the following code will import from Memory and clear memory

*data variable required for background processing

data: wa_indx type indx.

    • imports from database the list sent by the calling program

IMPORT tab = <your table> FROM DATABASE indx(xy) TO wa_indx CLIENT sy-mandt

ID 'XYZ'.

  • deletes the data to save wastage of memory

DELETE FROM DATABASE indx(xy)

CLIENT sy-mandt

ID 'XYZ'.

Regards,

Samson Rodrigues.