EXPORT & IMPORT Memory ID

Hi experts.
I have a strange problem:
Within the PI-Sheet I get a serial number and activate a FM that has the following command:
EXPORT LWA_SERIAL-SERIALNO TO MEMORY ID 'SER'.
(LWA_SERIAL-SERIALNO has the requested value).
At the end of the process I activate a FM that has the command IMPORT LV_SERNR FROM MEMORY ID 'SER'.
For some reason field LV_SERNR doesn't get the value and sy-subrc equal 4.
Both LWA_SERIAL-SERIALNO  and LV_SERNR  are the same type (GERNR).
Does anyone know why's that ???
Thanks in advance,
Rebeka

Hi,
The problem is not a strange problem... its a common problem if the variable names are different during EXPORT and IMPORT.
To get the value from memory id it is a must that both have the same name as well as the same type and also of the same length.. so that is why you could export the value to memory... but during retrieving the value from the memory the above mentioned are the prerequisites.
In you case Both LWA_SERIAL-SERIALNO and LV_SERNR should be of same type (GERNR) and should be of the same variable name.
Replace the variable name during export or import.. so as you are using the table field during export declared that while importing as declared during exporting.
Hope this would help you.
Good luck
Narin

Similar Messages

  • Export/Import memory

    Hi,
    what is the difference between Export/Import buffer
    and   Exp./Imp.SHM buffer
    regards,
    dev

    Hi Dev,
    This will be useful.
    Whenever a user session is created during any transactions, objects are created
    in memory. If another user is accessing the same object another copy is
    created in the memory - which means accessing objects is one copy per
    user per session (Session Memory).
    Until before SAP Application Server 6.40 these objects cannot accessed
    by other sessions or other programs. The concept of Shared Memory
    enables to access this memory if the object is not locked by that
    session. SAP Provides a class for accessing shared memories -
    CL_ABAP_MEMORY_AREA. Static methods are available in this class for
    binding a session to the memory area.
    What are the Advantages of Shared Memory?
    ~Data is kept only once in Memory.
    ~The Data will be in the memory as Memory Tables that reflect the
    structure of Database table.
    ~Fast access at Main Memory Speed.
    ~Saves Memory (Saves Approximately 3MB Per user per Session.
    More on Next Posting...
    http://groups.google.com/group/DEVS_SAP
    --Thanks and Regards,
    Ragu
    ERP,
    Suzlon Energy Limted, Pune
    +919370675797
    I have no limits for others sky is only a reason

  • Export/import memory ID in OO

    I tried to use the conventional way of EXPORT itab TO MEMORY ID 'itab' and
    IMPORT itab FROM MEMORY 'itab' but it is not working in object oriented environment. How to write the correct syntax in object oriented environment?
    Thanks

    Hi..
    Internal table with Header line is not Supported in ABAP OO.
    So it may be the reason why you are getting an error.
    Declare your ITAB without header line.
    Try the Same code.
    <b>reward if Helpful</b>

  • EXPORT & IMPORT URGENT?

    Can anyone help me with the syntax used for export & import memory ID/
    I am using a User exit for functionality for COUNTRY KEY.
    whne I run my report, I want to export the country key filed value(PARAMETER ID = 'MOL') from my report and IMPORT this value in the user exit..
    can you please help me with the syntax wht i need to write?
    Its urgent!!!!

    Hi Abhay,
    define field for export
    First program:
    data: field type char10.
    field = '12345'.
    export field to memory id 'TEST'.
    In the other program:
    data: field type char10.
    import field from memory id 'TEST'.
    Cheers,
    Stefan.

  • Memory Limitation on EXPORT & IMPORT Internal Tables?

    Hi All,
    I have a need to export and import the internal tables to memory. I do not want to export it to any data base tables. is there a limitation on the amount of memroy that is can be used for the EXPORT & IMPORT. I will free the memory once I import it. The maximum I expect would be 13,000,000 lines.
    Thanks,
    Alex (Arthur Samson)

    You don't have limitations, but try to keep your table as small as possible.
    Otherwise, if you are familiar with the ABAP OO context, try use Shared Objects instead of IMPORT/EXPORT.
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/13/dc853f11ed0617e10000000a114084/frameset.htm">SAP Help On Shared Objects</a>
    Hope this helps,
    Roby.

  • Issue with Memory ID export / import

    Hi Experts,
    We are facing strange issue during export/import from memory ID.
    We are exporting value to Memory ID from module pool program and trying to import same value in SAP workflow method.
    While importing the value from memory ID it is failing to import and gives sy-subrc =4.
    Any idea how can we do export/import in module pool program to Workflow method?
    Regards,
    Sanjana

    Hi sanjana,
    Please check the link. Here you can find some examples also.
    http://wiki.scn.sap.com/wiki/display/Snippets/Import+and+Export+to+Cluster+Databases
    P.S
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/content.htm
    You just need to create a key and an ID to save data into INDX table.Once its saved you can use same key and id to import .
    Again mentioning , dont forget to delete using same key and ID once you have imported else it may give error.
    Regards,
    Sandeep Katoch

  • Export- Import to Memory Query

    Hello Everyone,
    I have 2 FMs where one exports variable to memory and other FM imports the same .
    FM A:
      DATA: id    TYPE c LENGTH 10 VALUE 'SWITCH_WO',
            id1   TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
      EXPORT   g_workorder from g_workorder  TO MEMORY ID  id.
      EXPORT   g_operation from g_operation  TO MEMORY ID  id1.
    FM B:
    DATA: id    TYPE c LENGTH 10 VALUE 'SWITCH_WO',
            id1   TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
      IMPORT g_workorder   FROM MEMORY ID  id.
      IMPORT g_operation   FROM MEMORY ID  id1.
    When it export Sy-subrc is 0 but when i import it is 4 , where  can i check memory variable in new debugger.
    Please let me know ,
    Regards,
    Raj

    Hello,
    You can use the Import and export to Memory Id only with the programs and FM which runs in the same session, because that memory is only available in the same session of the memory. Once you have imported say a internal table/work area to some memory id and the session ends the memory is cleared by the Garbage Collector.
    In your case you are using 2 FM each running in different session, Import and Export to memory id will not work for you (as said it works in a single session). Try to use concepts of Shared Memory Object or populate a table (Custom table) and try to retrieve the same from 2nd FM.
    Hope it helps.
    Thanks,
    Jayant

  • EXPORT/IMPORT  to MEMORY

    Hi,
    I want to know if a parameter ID  of "export/import to memory" instruction is available in two differents session with different user's login?
    tks
    Carlos

    The use of the shared buffer may be of some interest to you.
    <b>From F1 help</b>
    <i>EXPORT obj1 ... objn TO SHARED BUFFER dbtab(ar) ID key.
    Additions:
    1. ... = f (for each field you want to export)
    2. ... FROM f (for each field you want to export)
    3. ... CLIENT g (before ID key)
    4. ... FROM wa (as last addition or after dbtab(ar))
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters and Table work areas not allowed.
    Effect
    Stores a data cluster in the cross-transaction application buffer.The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the buffer.
    The specified table dbtab must have a standard structure.
    The buffer area for the table dbtab is divided into various logically-related areas (ar, two-character ID).
    You can export a collection of data objects (data cluster) to an area of the buffer under a key of your own choosing (key field).
    You can import individual data objects from this collection using the IMPORT statement (as long as the data has not been deleted from the buffer).
    Notes
    In classes, you must always specify explicit names for the data objects. Addition 1 or addition 2 is therefore obligatory.
    In classes, you must always specify the work area explicitly. Addition 4 is therefore obligatory.
    The table dbtab that you specify after SHARED BUFFER must be declared under TABLES (except in addition 4).
    You cannot export the header line of an internal table. If you specify the name of an internal table with a header line, the system always exports the actual table data.
    You cannot export data, object, and interface references.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Example
    Exporting two fields and an internal table to the buffer with structure INDX:
    TABLES INDX.
    TYPES: BEGIN OF ITAB3_TYPE,
              CONT(4),
           END OF ITAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4), F2 TYPE P,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH
                     NON-UNIQUE DEFAULT KEY INITIAL SIZE 2,
          WA_INDX TYPE INDX.
    Fill data fields before CLUSTR
    before the actual export
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    Export data.
    EXPORT F1    FROM F1
           F2    FROM F2
           ITAB3 FROM ITAB3
           TO SHARED BUFFER INDX(ST) FROM WA_INDX ID INDXKEY.
    Addition 1
    ... = f (for each object you want to export)
    Effect
    Exports the contents of the field f and stores them under the specified name.
    Addition 2
    ... FROM f (for each field you want to export)
    Effect
    Exports the contents of field f and stores them under the specified name.
    Addition 3
    ... CLIENT g (before ID key)
    Effect
    The data objects are stored in client g (as long as the import/export table dbtab is client-specific).
    Addition 4
    ... FROM wa (as last addition or after dbtab(ar))
    Effect
    Use this addition if you want to store user data fields in the application buffer. Instead of the table work area, the system uses the specified work area wa. The specified work area must have the same structure as the table dbtab.
    Example
    DATA WA LIKE INDX.
    DATA F1.
    WA-AEDAT = SY-DATUM.
    WA-USERA = SY-UNAME.
    WA-PGMID = SY-REPID.
    EXPORT F1 = F1 TO SHARED BUFFER INDX(AR)
                   CLIENT '001' ID 'TEST'
                   FROM WA.
    Note
    Catchable runtime error
    EXPORT_BUFFER_NO_MEMORY: The EXPORT data cluster is too big for the application buffer. This error should not occur often, since the buffer uses a procedure similar to the LRU(Least Recently Used) procedure to monitor the buffer contents. However, if the error does occur, you can increase the profile parameter rsdb/obj/buffersize (see Profile Parameter Attributes), which may help.</i>
    Regards,
    Rich Heilman

  • Import/export to memory and global variables

    Hi,
    Im working on some functionality using import/export to memory. One of the statements is:
    import gf_memid_exit = g_exit_flag gf_memid_result = t352r from memory id 'ZREV_EXT'.
    Im using global variables to contain the cluster names. But this is not working. When I change the global variables into local variables, it works. It this normal? Because I would like to have global variables (even better I would like to have global constants) to declare in order to use them within the program.
    Any ideas?
    With regards,
    Mike

    Hi Mike...
    I think with import u can use global or local variables..in debug mode pl. check when u r using global variables..whether it is getting cleared or overwritten by some other values or not. Or try with global constants..it should work...
    Regards,
    Joy.

  • Export to memory"  (bukrs) in one user exit and import to memory in other.

    I have to "export to memory"  (bukrs) in one user exit and import to memory in other.
    Does anyone has an example

    in one user exit:
    EXPORT field TO MEMORY ID 'Z_BUKRS'.
    in another user exit:
    IMPORT field FROM MEMORY ID 'Z_BUKRS'.
    what is the problem?

  • Function module to EXPORT/IMPORT to/from MEMORY?

    Hi Gurus,
    As EXPORT /IMPORTstatements come under obsolete statements.SO i am getting error in code when i compile using code inspector.
    PLease let me know if there is any function module that does the work of EXPORT and IMPORT.
    It woukl be kind if you explain how to put values in those function module to get desired output.
    Thanks

    Hi ,
      You can use these FM
    Export  to Memory
    C14Z_EXPORT_field_TO_MEMORY
    C14Z_EXPORT_TO_MEMORY
    Import From Memory
    C14Z_IMPORT_FIELD_FROM_MEMORY
    C14Z_IMPORT_FROM_MEMORY
    Regards,
       Seema

  • Export / Import  from Memory in background.

    Hi,
    I have a trouble and I dont know very well how to solve it.
    I have a Z report running in background, and this report uses a SUBMIT to call another one.
    Before the SUBMIT, there is an EXPORT to memory sentence; and the second report read this memory cluster and works with the data; but it doesnt work.
    When I execute online, there is no problem, and the 2nd report shows an ALV with data exported in 1st report, but in background, nothing is shown.
    Could you give me some help?
    A lot of thanks!

    Hello Alvaro,
    This is simple. There are two types of memories in SAP. ABAP and SAP memory. These memories have some properties. ABAP memory remains active as long as the program is in the same session. When ever there is a new session the old ABAP memory get refreshed, and a new ABAP memory comes into picture.
    In your case, before submitting the program to some other program you are exporting the value. Export will transfer the value to the ABAP memory. And after that you are submitting the program so a new session is being created and the ABAP memory is refreshed and so when you import that value you will get nothing.
    So in order to solve the matter. Find a data element whose parameter ID you can set or you can create a custom data element witha  custom parameter id and use that parameter id. Use the GET / SET parameter id to set or get the values. In that case the value is being stored at the SAP memory instead of ABAP memory.
    You can have a look the following site for the custom parameter ID creation:
    http://www.****************/Tutorials/ABAP/ParameterID/custom.htm
    Rewards points if found useful.
    Regards.
    Abhijit.

  • Problems with EXPORT TO MEMORY / IMPORT FROM MEMORY

    Hello.
    we've just made a SAP OS/DB migration of our 46C system from UNIX/Oracle to Windows/SQL.
    Our FI consultant has realized a processs failed.
    The ABAP program that files (it is a Z program) is using EXPORT TO MEMORY and IMPORT TO MEMORY.
    It seems the import is failing because the export to memory fails also.
    Of course we have changed memory parameters ..do you know what memory parameters are involved?
    Thanks very much for your help.

    It seems the import is failing because the export to memory fails also.
    Can you explain?
    Did you check the extended debugger facilities like memory areas?
    What is the structure/amount of data for ex- and import, same name, same data object?
    Just reveal what you are really doing, post a few code lines.
    Or not.
    Regards,
    Clemens

  • Export to memory/Import from memory

    When you're exporting to memory and there are multiple users on an online transaction.  Does memory mean the users own memory.  If multiple users are on AS02 and you have to custom sub screens and you want to export a field to memory on the 1st custom screen and import it on the other screen, is it possible to import another users memory if they're in that transaction doing the same thing?

    Hi,
      There are two types of Memories
    ABAP memory is a temporary memory which can store data for a session. In this case each user will have his own memory.
    For more information on ABAP Memory click the below link
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3bc4358411d1829f0000e829fbfe/content.htm
    SAP Memory is used to store and access data from different sessions. Users accessing the memory will have the same data.
    Regards,
    Vara

  • Memory Limit for "IMPORT/EXPORT from MEMORY ID" statement

    Hi All,
    Can anyone tell me whether there is any memory limit exists for "IMPORT/EXPORT from MEMORY ID" statement.
    Like may be we can transfer xx MB of data via this......or it is open, we can transfer any amount of data to ABAP memory via this.
    Regards
    Munish Garg

    1. Each user sessions have external sessions and each external sessions have internal sessions.
    2. The programs being executed in the internal sessions can access ABAP memory
    3.ABAP memory is a storage area for internal program variables like fields, structures, internal tables,,They can be passed  between internal sessions of an external session.
    4. you can transfer data through ABAp memory using IMPORT and EXPORT statements
    5. after IMPORT FROM MEMORY ID <id> , you can use sy-subrc to check the existance of the cluster ID. here sy-subrc is not used to check whether the Import was successful or not.

Maybe you are looking for

  • Error While mapping table with 100 Columns

    Hello Actually i had a requirement in which i have to map the data into target table from more than 50 tables with complex join conditions So I created 5 maps separately to load the data and now i am feared that while i deploy the the first map the o

  • Huge captivate file sizes

    I have been using Captivate to imbed an audio recording of a presentation into the slides for said presentation. The audio is in the form of one large mp3 file. When adding the audio, I select the option to distribute over many files, and line up all

  • HT201343 how to mirror late 2008 macbook pro to apple tv

    I have a late 2008 macbook pro. Can I mirror this to apple tv?

  • HT204266 I got in the UK App Store. How do I get back to the US App Store?

    I tried to download a Poweron Roland user magazine. It said it was available I the UK App Store. Said, "do I want to switch stores." Like an idiot I said yes. Now I can't get back to the US store. Help please. Thanks, Bob

  • No records - FM Delta queue

    Hi, I did setup all steps for 0PU_IS_PS_44 data extraction from R/3. In doing so I did Initialized Delta process, logged to R/3 RSA7 transaction code to check the queue. At the time of Init I got 300 records. Today I created new Info package to extra