Export to Memory ID

Hi All,
I have a requirement in which i need to export a variable to a Fix Memory ID and then retrieve it when required. Now since i am exporting the variable to the same memoryid how will i retrieve the value of a particular variable if it is required.
In my case i am using a requirement routiune from where i have to export the variable value to a memory id. This routine is called everytime a delivery is saved.
Now I have to import the variable value corresponding to the particular delivery number. So how will we be able to do that. Or is there any other way to achieve this functionality.
Please help me.
Regards,
Sharadendu

You can export data (variable, internal table) to memory, but you can't just retrieve it at any point in time. Data will stay in memory during session, but next time upon entering a transaction (or whatever you're doing) the memory ID will be 'empty' again.
If you are in same session (for example when doing a submit of a report just after exporting data to memory ID), you can retrieve this data again.
Alternative would be, to store this data in a custom database table, or maybe even use shared memory objects (however I'm in doubt about your particular requirement). Shared memory objects via transaction SHMA.

Similar Messages

  • EXPORT to MEMORY ID Vs. EXPORT to DATA BASE IDX table??

    Hi,
    Some times we use EXPORT to MEMORY ID and some times we EXPORT to DATABASE IDX table, pls. let me know,
    1) When we use EXPORT to MEMORY ID?
    2) When we use EXPORT to DATA BASE IDX table?
    3) I knew that in the (1) case, data wuld be stored in shared memory for session live.......but, what about (2) case,Where its stored, is it storeas really in data base? like other data (say, sales order data) this exported data also persists for ever in the Oracle data bse? or this table (idx) is a logical data base?
    Thank you

    First of make it a point to read the SAP documentation if you have any doubts: [http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#!ABAP_ALTERNATIVE_4@4@|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#!ABAP_ALTERNATIVE_4@4@]
    SAP has defined a predefined DB table INDX as a reference (you can create your custom table similar to INDX if you want). When you EXPORT the data to this table, a new record is created in the table & the data exported will be stored in RAW format.
    This data remains in the INDX table even after the session is terminated.
    BR,
    Suhas

  • 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?

  • 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

  • EXPORT to Memory

    I want to get rid of EXPORT and IMPORT statement.  What are the alternative ways for Import and export.
    EXPORT TO memory ID &
    IMPORT from Memory ID
    BRegards
    Pravin

    You can use INDX cluster tables for this purpose, quite usefull for passing values.
    IMPORT p1 = w_btrtl FROM DATABASE indx(HR) ID W_CHAVE.
    export p1 = w_btrtl to DATABASE indx(HR) ID W_CHAVE.
    DELETE from database indx(HR) ID W_CHAVE.

  • 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.

  • Submit report and export to memory

    Hi
    I am using this code to submit report
    submit ZM005REP
    WITH S_BLEND IN R2
    WITH S_GROUP IN R3
    WITH S_WERKS IN r1
    exporting list to memory and return.
    I am using LIST_FROM_MEMORY to read the list.
    I want to further use the values from this list for calculations , but when I saw the list its just an array of strings.
    I want to read the opening bal field which is returned in this list.
    Any advice on this ?
    Thanks,
    Shital

    Hi,
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    Then you can use the ITAB_LIST for caliculation which is having all the values.
    Thanks
    Sudheer

  • Email attachment with didnt used EXPORTING TO MEMORY

    Hi Expert,
    For my development I cant using below abap code because I getting short dump when trying to execute the SAP Standard Program "RM06WCD1". When trying other program that is working fine.
    SUBMIT (report_name)
             USING SELECTION-SET p_var
             EXPORTING LIST TO MEMORY AND RETURN.
    So I trying to use it with FM "Job Open" and FM "Job Close" and it was working fine with the following submit statement.
      SUBMIT (report_name)
       USING SELECTION-SET p_var
             VIA JOB l_name NUMBER l_number  AND RETURN.
    and I using this fm "RSPO_RETURN_ABAP_SPOOLJOB" to get the data from the spool.
    But I stuck in develop in emailing with the htm attachment part. I have no idea on how to split my line item because the content will be different based on the report that calling.
    Have any expert here got any idea on the way to solve for this issue?
    Thanks.

    Hi,
    I don't understand what your issue is exactly. RSPO_RETURN_ABAP_SPOOLJOB returns the lines of a  spool of type "ABAP list" in an internal table. Each line of the internal table corresponds to one line, so what do you mean by "split"?
    Or does RM06WCD1 generate a spool of type "SAPscript/Smart form"? In that case, you shouldn't use RSPO_RETURN_ABAP_SPOOLJOB, but use CONVERT_OTFSPOOLJOB_2_PDF to send it as mail. Moreover, a standard function allows to send directly outputs as a mail.
    BR
    Sandra

  • 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

  • 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>

  • Does EXPORT to MEMORY ID work in background

    Hi,
    I'm exporting an internal table to a memory ID which will then be used in another program which will be called from the current program with a SUBMIT and RETURN statement.
    When i use the SUBMIT online, it seems to EXPORT and IMPORT the internal table correctly.
    but, when i SUBMIT to the program in background, it does not seem to do whatever i expect, which makes me think eventually there is some problem with the data I've been EXPORTing and IMPORTing.
    Can anyone shed any lights on this one please?
    Thanks,
    Tabraiz
    Edited by: Tabraiz Ali Khan on Mar 10, 2009 10:04 AM

    I used the below statement:
           SUBMIT zsecondprogram AND RETURN
                USER               sy-uname
                      VIA JOB            gv_jobname
                NUMBER             gv_job_number
                TO SAP-SPOOL
                SPOOL PARAMETERS   gs_user_print_params
                  ARCHIVE PARAMETERS gs_user_arc_params
                  WITHOUT SPOOL DYNPRO.

  • ECC6 IMPORT/EXPORT to MEMORY ID 'OPENFI00002213E'

    Hi experts,
    I have a problem with IMPORT/EXPORT in ECC6 within the same program. The short dump happenned at IMPORT time. Here is part of my code.
    DATA: MEMID13(15) VALUE 'OPENFI00002213E',
              T_VBKPF  LIKE  VBKPF OCCURS 0 WITH HEADER LINE.
    EXPORT t_vbkpf TO MEMORY ID memid13.
    CALL TRANSACTION 'FV60'
         USING bdcdata
         OPTIONS FROM s_ctu_params
         MESSAGES INTO bdcmsgcoll.
    IMPORT t_vbkpf FROM MEMORY ID memid13.
    In 4.6C, the internal table t_vbkpf was updated with the created document from the transaction 'FV60' call but it gave a short dump in ECC6.
    Runtime Errors         CONNE_IMPORT_WRONG_STRUCTURE                  
    Except.                CX_SY_IMPORT_MISMATCH_ERROR                   
    Date and Time          2007.12.06 15:46:46                           
    Short text                                                          
         Error when importing object "T_VBKPF".                                                                               
    Please help, thanks!
    CHuong

    Hi,
    In ECC 6 for import from memory you need the import structure will be flat , character-type data
    The following is from documentation.
    +
    If MEMORY is specified, the data cluster that was written to the ABAP Memory under the identification specified in id with the statement EXPORT is imported. For id, a flat , character-type data object is expected. This object contains the identification of the data cluster.
    +
    otherwise use this way
    TYPES:
      BEGIN OF tab,
        col1 TYPE i,
        col2 TYPE i,
      END OF tab.
    DATA:
      wa_indx TYPE indx,
      wa_itab TYPE tab,
      cl      TYPE mandt VALUE '100',
      itab    TYPE STANDARD TABLE OF tab.
    IMPORT tab = itab
      FROM DATABASE indx(xy)
      TO   wa_indx
      CLIENT cl
      ID 'TABLE'.
    WRITE: wa_indx-aedat, wa_indx-usera, wa_indx-pgmid.
    ULINE.
    LOOP AT itab INTO wa_itab.
      WRITE: / wa_itab-col1, wa_itab-col2.
    ENDLOOP.

  • 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

Maybe you are looking for

  • Gallery and iWeb

    I have some movies and photo albums published in my Gallery. I'm producing web sites using iWeb. I want to insert the photo albums and movies into pages. This works fine when I choose Insert>.Mac Web Gallery> and the appropriate movie. But I never ge

  • Setup.exe wont start !!

    I want to install Adobe After Effects CS3 but when i launch setup.exe nothing happens. And if i install it from WinZip it says: Please Insert Adobe After Effects To Continue... What now ?

  • Fiel Riquered on MIRO, Payment Method

    Some one knows how I can Make the Field Method Payment on MIRO that could be Required?? I was trying make it on FI, but is not the field, and I don´t find it on MM, or only we can make it on OB28? Thanks!

  • Error creating AQMsg object

    We are using OO4O in an application made in Visual Basic 6.0. This application enqueues and dequeues objects from an AQ queue. The problem is that sometimes, when we enqueue an object we are having the following message: "Eneuque error in AQ object,

  • Error when opening Administrator console

    Hi All, I am getting the below error when I try to open the administrator console. I do have access to the application privilege sap.hana.admin::Monitoring. Can anyone please let me know how this can be resolved. Goutham