Skip to Content
author's profile photo Former Member
Former Member

EXPORT TO MEMEORY ID: name sensitive?

Hi All.

I am using EXPORT/IMPORT TO/FROM MEMORY ID statement and I have the following problem:

During the EXPORT statement I have to use a field with exactly the same name as the field I used during the IMPORT statement.

This means that if I'm using a field with the same name the EXPORT fills it with expected values, but if I'm using a different name the field stayed empty and the SY-SUBRC=0.

Does any of you know what might cause this problem?

thanx.

ayal.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2007 at 04:19 PM

    Hi,

    May be Exporting is done successful, despite of value being filled or passed.

    So it is returning sy-subrc value 0.

    So as per my idea memory i/o is done well but garbage has been read.

    Reward if useful!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 01, 2007 at 05:09 PM

    It is a good idea to use the same field name as well as the same type of field or structure to export and to import. Of course you would use the same memory id.

    Program one.

    data: this_field(20) type c.
    
    export  this_field to memory id 'THIS_MEM_ID'.

    Program two.

    data: this_field(20) type c.
    
    import  this_field from memory id 'THIS_MEM_ID'.

    Regards,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Rich.

      Let's put aside the structure issue. This is given that I'm using the same structure for both fields.

      Second, this issue is not a show-stopper, just a wonder I have.

      I agree that it is a good idea to use the same name, but the question is: is it a must?

      I could not find a documentation about this limitation and it doesn't make sense that such a limitation exist since it means that the MEMORY ID need to store not only the values you assigned to it but some properties regarding the parameter you used to do it.

      thanx.

      ayal.

  • Posted on Jul 01, 2007 at 05:57 PM

    Hi Yes SAP Team,

    the name of the fields is not most important. But the data object must have the same structure for the same ID.

    You should always use the addition 3 ( ... ID key) with the statement. The effect of the variant without this addition is not certain. ( EXPORT statements in different parts of a program overwrite each other in the ABAP memory), since it exists only for reasons of compatibility with R/2.

    EXPORT int_tab[] TO MEMORY ID 'ABC'.
    IMPORT int_tab[] FROM MEMORY ID 'ABC'.
    

    This means if you export to another ID you must also IMPORT from the other ID.

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 01, 2007 at 07:45 PM

    Lets put it this way, the first time that I used these statements, I tried with different names for the fields, of course it didn't work, used the same field names, and it worked, now I always use the same field names.

    REgards,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      > Lets put it this way, the first time that I used

      > these statements, I tried with different names for

      > the fields, of course it didn't work, used the same

      > field names, and it worked, now I always use the same

      > field names.

      >

      > REgards,

      > RIch Heilman

      So basically, what you're saying is that we must use the same name for both field or it won't work.

      thanx.

      ayal.

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.