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: 

Problems with memory!

Former Member
0 Kudos

Hi everyone,

I have made a copy of an existing program that exports to memory some data, among them there is this table we use to receive messages when a call transaction has been made, first with function JOB_OPEN we create a job, then the export is made after that submit to another program is made in this program there is a call transaction to FB01 t.code, then a call to function JOB_CLOSE is made, after that in another routine there is again an import from memory of the table message that has all errors or documents created there, but i have a problem after the import has been made, there is a do, enddo in the middle of this code there is a condition that checks number of lines received from this import with a describe table of course, but the problem is that if the information returned from all this process is just one line this is just in header line and no in the body of the internal table, so when it checks number of lines it does not found any even if there is one in the header table!!!

Do you know how can I get all data that comes in header line ???

Thanks!!

Moderator message: please choose more descriptive subject lines for your posts and use full stops now and then for better readability.

Edited by: Thomas Zloch on May 24, 2011 9:59 AM

2 REPLIES 2

former_member186741
Active Contributor
0 Kudos

if you can change the program which does the export you can change it to always append so that the table will never be empty....or you can copy the table header to a variable and include this new table header varibale in the export. The import will then need to be changed to refer to the new header variable too.

data: t type table of string, th like line of t.

th = t.

export t th to memory id sy-repid.

...............

import t = t th = th from memory id sy-repid.

Former Member
0 Kudos

Hi,

In the export program, please ensure to append the entry from the header line to the internal table and clear the header after appending. This way, in the import program, you would always have entry in the body of the table and describe statement would work just fine.

Regards,

Shyam