‎2009 Apr 29 12:22 PM
How can I export and import an internal table to memory?
This:
export messtab to memory id 'TAB'. (in program 1)
import messtab=messtab from memory id 'TAB'. (in program 2)
does not work.
‎2009 Apr 29 12:47 PM
HI friend,
Just use:
Export Int_table to memory id 'xyz'
import int_table from memory id 'xyz'.
Thanks,
neel
‎2009 Apr 29 12:24 PM
‎2009 Apr 29 12:25 PM
‎2009 Apr 29 12:28 PM
‎2009 Apr 29 12:25 PM
data: lt_idoc_status1 type standard table of bdidocstat.
export lt_idoc_status1 to memory id 'IDOC_STATUS1'.
Import lt_idoc_status1 from memory id 'IDOC_STATUS1' .
Edited by: Poorna Chandrasekhar on Apr 29, 2009 4:55 PM
‎2009 Apr 29 12:28 PM
I can't see any difference except for the suppresion of the =messtab (incidentally, I have already tried without it, and it doesn't seem to work...)
Can it be because of the table type? Mine is a standard table of bapireturn.
Thanks.
‎2009 Apr 29 12:28 PM
Hi,
In program 1.
EXPORT messtab[] TO MEMORY ID 'ABC'.
in program 2.
IMPORT messtab[] FROM MEMORY ID 'ABC'.
Rgds
Siva
‎2009 Apr 29 12:29 PM
‎2009 Apr 29 12:48 PM
Even without the brackets it doesn't work.
In program 1 I have:
WRITE text-e21 TO messtab-message.
messtab-type = c_tipo_error.
APPEND messtab. CLEAR messtab.
DELETE messtab WHERE message = space.
EXPORT messtab[] TO MEMORY ID para.
EXIT.
The EXIT leads to program 2, from where I made a submit to program 1, and where I have:
import messtab[] from memory id para.
Where:
DATA: para TYPE tpara-paramid VALUE 'MES',
messtab TYPE TABLE OF bapireturn WITH HEADER LINE.
What's wrong?
Thanks in advance.
Oh, and I've checked the table in program 1 does have an entry.
‎2009 Apr 29 12:56 PM
Hi,
Try this way
EXPORT (messtab) TO MEMORY ID para.
IMPORT (messtab) FROM MEMORY ID para.OR
EXPORT messtab FROM messtab TO MEMORY ID para.
IMPORT messtab TO messtab FROM MEMORY ID para.Regards,
Siddarth
‎2009 Apr 29 1:02 PM
Hi,
Try like this while exporting.No need of declaring PARA. It should be in quotes.
DATA: messtab TYPE TABLE OF bapireturn WITH HEADER LINE.
WRITE text-e21 TO messtab-message.
messtab-type = c_tipo_error.
APPEND messtab. CLEAR messtab.
DELETE messtab WHERE message = space.
EXPORT messtab TO MEMORY ID 'PARA'.
EXIT.
import messtab from memory id 'PARA'.
‎2009 Apr 29 12:47 PM
HI friend,
Just use:
Export Int_table to memory id 'xyz'
import int_table from memory id 'xyz'.
Thanks,
neel
‎2009 Apr 29 4:30 PM
Hello,
The code below should work.
EXPORT messagetab TO MEMORY ID 'ZMESGTAB'
To further import, use:
IMPORT messagetab TO itab " MESSAGETAB was exported
FROM MEMORY ID 'ZMESGTAB'.Regards,
Eduardo
‎2009 Apr 30 8:33 AM
The problem has disappeared, I'm not sure why. Maybe because I changed the internal table to one without header line. Thanks to all for your answers.
‎2009 Jul 15 10:45 PM
I can verify that I had the same problem and it cleared up from my EXPORT statement when I removed the header line from my internal table, but it is still happening when I try to IMPORT. I get the following syntax error:
"FIELD "'BADI_OFFINV_DETAIL'" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."
Edited by: James Smith on Jul 16, 2009 12:28 AM
‎2015 Jan 28 1:45 PM
I'm a little bit late, but this could help.
You can also pass internal table with IMPORT/EXPORT statement using deserialization like this :
DATA :
xml type string,
my_itab type table of stuff.
* 1) DESERIALIZATION
CALL TRANSFORMATION id
SOURCE zit_fields = my_itab "don't forget to add brackets with header line : my_itab[]
RESULT XML xml.
EXPORT xml TO MEMORY ID 'MYID'.
* .../...
IMPORT xml FROM MEMORY ID 'MYID'.
* 2 ) SERIALIZATION
CALL TRANSFORMATION id
SOURCE XML xml
RESULT zit_fields = my_itab.