ABAP Memory ID

Hi All,
Is the ABAP memory ID global?
for example, I have FUNC1, in FUNC1, I export value to memory ID 'ABC'. the value of 'ABC' is valide for all other function call?
The porblem I experinced is that the FUNC1 may called by many interface at the SAME time, and because the memory ID id "global", it may cause problem.
Thanks,

If you look at the documentation of the 'EXPORT' statement, you will see that data is stored in the ABAP memory not in SAP global memory. See below for an extract of the documentation.
Stores a data cluster in ABAP memory. The specified objects obj1 ... objn (fields, structures, complex structures, or tables) are stored as one cluster in ABAP memory.
If you call a transaction, an executable program, or a dialog module in call mode ( CALL TRANSACTION, SUBMIT, CALL DIALOG), the ABAP memory is retained, even over several call levels. The called transaction can import the data from ABAP memory using IMPORT ... FROM MEMORY. Each new EXPORT ... TO MEMORY overwrites the old data in ABAP memory. You cannot therefore append to data already in the ABAP memory.
When you leave the lowest level of the call chain, the ABAP memory is released.
SAP and ABAP/4 Memory
There is a difference between the cross-transaction SAP memory and the transaction-specific ABAP/4 memory.
SAP memory
The SAP memory, otherwise known as the global memory, is available to a user during the entire duration of a terminal session. Its contents are retained across transaction boundaries as well as external and internal sessions. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
ABAP/4 memory
The contents of the ABAP/4 memory are retained only during the lifetime of an external session (see also Organization of Modularization Units). You can retain or pass data across internal sessions. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
Please consult Data Area and Modularization Unit Organization documentation as well.
and Memory Structures of an ABAP Program
So, just based on this, your problem may not be related to the export statement or the import statement.
Are you making multiple function calls from the same program/transaction? In this case there is a chance of the memory getting overlaid. But if different people are using the transaction/program at the same time, but the function call is just once in the program/transaction, then you should not have this issue.
Srinivas

Similar Messages

  • ABAP Memory value in ABAP Debugger

    Hi,
    Is it possible to view the value of ABAP memory IDs in ABAP debugger?
    I know we can view the active ABAP memory IDs in debugger using Goto -> System Areas -> ABAP Memory
    Whereas my question is for those listed ABAP memory IDs, can we see the value in debugger itself?
    Thanks in advance.
    Regards,
    Balaji Viswanath.

    Hi,
    Did you sort out your problem yet? I am looking for the same. So far I know one can get the ABAP stack with the FM SYSTEM_CALLSTACK. This returns the stack but I still have not figured out how to access any stack objects yet.
    Let me know,
    Andreas

  • How to use abap memory in global class

    Hi experts,
                     I want to  know how to use abap memory in global class. when i try write export and import statement its showing
    error is export statement does not support in object oriented concept.
    Thanks
    Ramesh Manoharan

    Hi Ramesh,
    Export and import statements were not allowed to use in  classes. Create a global variable in public section of that class of type of  export parameter.Then pass value to the global variable of class  by calling that class.
    by
    Prasad GVK.

  • Problem in ABAP memory

    Hi Experts,
    This is problem about ABAP memory.
    I have two programs. Program-A & Program-B
    Program-A sets value to variable and EXPORT command is used to set this variable in memory.
    EXPORT variable TO DATABASE indx(st) ID 'KEYVALUE'.
    Program-B gets variable using IMPORT command from memory.
    IMPORT variable FROM DATABASE indx(st) ID 'KEYVALUE'.
    User runs Program-A in SE38. Program-A calls Program-B using a button click event (SUBMIT).
    The scenario is..
    User1 executes the Program-A,
    which set the variable = User1 in memory.
    User2 executes the Program-A,
    which set the variable = User2 in memory.
    User2 clicks button to call Program-B,
    which imports variable = User2 from memory.
    User1 clicks button to call Program-B,
    which imports variable = User2 from memory.
    (But User1 expects the variable = User1).
    So User1 gets wrong variable value set by another User.
    How to handle this situation?. How to set memory variables user specific? I will appriciate all helpful answers.
    Thanks in advance
    Hari.

    What you are using is global memory, if you don't want other sessions to see it, then you have to use a memeory id instead.  This will work when submittin program b using the SUBMIT statement.
    export variable to memory id 'ZRICHTEST'.
    import variable from memory id 'ZRICHTEST'.
    Or you can simply make your KEYVALUE unique by giving the USERID as part of it.
    Regards,
    Rich Heilman

  • Examples for SAP Memory and ABAP Memory

    Hi all,
        can u give me one example of sap memory and abap memory.
                                              Ranjith

    Hi,
    <b>SAP Memory</b>
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program at the time of logon using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens .
    <b>example:</b>
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    <b>ABAP Memory</b>
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this memory area remains throughout a sequence of program calls, with the exception of LEAVE TO TRANSACTION. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made from the internal calling session using the EXPORT statement. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory using the IMPORT statement. If control is then returned to the program that made the initial call, the same procedure operates in reverse.If a transaction is called using LEAVE TO TRANSACTION, the ABAP memory and the call stack are deleted. They cannot be used for data transfer.
    Since objects belonging to ABAP objects can only be accessed within an internal session, it does not make sense and is therefore forbidden (from a syntax point of view) to pass a reference to an object to a calling program through the ABAP memory.
    <b>Example:</b>
    Export hello to memory id 'Hello_world'.
    Import hello from memory id 'Hello_world'
    Regards
    Sudheer

  • ABAP MEMORY for Import

    Hi
    Please let me know how can i find the memory id name and from where for ABAP Memory .
    For ex : IMPORT IM_EKPO-KNTTP FROM MEMORY ID 'EKPO_MO'
    In the obove statement where can i find that this 'EKPO_MO' is memeory id  ??
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    If in Export where to find that export ?
    Edited by: Rob Burbank on Oct 24, 2011 12:17 PM

    Hi
    You can't find it...you can see it in the debug (there's a session showing all parameters set in the memory.
    Of course if there's a IMPORT, there is an EXPORT but it can be very hard to konw where it's done,
    - EKPO_MO is a label to assign to a part of memory, but it's created at runtime.
    You can suppse it should be another program where the export is done, in generally it doesn't make a sense to use import/export from/to memory in the same report: this statament is usually used to transfer some data between several programms
    Max

  • Wht doe memory id means abap memory?

    hi
    can any one eloborate me on teh bleow code wht does it means and from where the value of wa_quantiy coming from memory id????
    import wa_quantity ( a internal table) in to wa_quantity( internal table) from memory id 'wa_quantity'.
    regards
    Arora

    Nishanth,
    To put it in simple: "When ever we need to pass values from one session memory to another session memory we use IMPORT and EXPORT parameters."
    By doing this we import value to ABAP memory and Exporting the same from ABAP memory in other sesion. In short ABAP memory is global. Session memory is local .
    Example : Suppose wa_quantity is an internal table in one program (say Zprog1) and you are want to use it in another program (say Zprog2) so this internal table will not be available for this program.
    What we need to do.
    Export wa_quantity from wa_quantity to memory id MID1.
    here - Export <same name you need to use in p1> from <name of itab in prg1> to <unique id>
    In program 2 : you need to
    IMPORT wa_quantity from wa_quantity  from meory id MID1.
    You need to have same internal table structure in both programs.
    All the very best to you.
    - Mohan.

  • How we can see the abap memory data

    How we can see the abap-memory data
    fine the code below
    import lsind
             report_title
             table_name
             report_field
             change_display
             show_hide
             conversion_exits
             table_description
             form_program
             select_form
             update_form
             line_size
             line_count
             records[]
             fields[]
             header_fields[]
             select_fields[]
             xrep[]
             from memory id 'LZUT5U11'.
    Regards
    santhosh
    mail-id : [email protected]

    Dear Santosh,
    ABAP MEMORY:
    A logical memory model illustrates how the main memory is distributed from the view of executable programs. A distinction is made here between external sessions and internal sessions .
    An external session is usually linked to an R/3 window. You can create an external session by choosing System/Create session, or by entering /o in the command field. An external session is broken down further into internal sessions. Program data is only visible within an internal session. Each external session can include up to 20 internal sessions (stacks).
    Every program you start runs in an internal session.
    All "squares" with rounded "corners" displayed in the status diagram represent a set of data objects in the main memory.
    The data in the main memory is only visible to the program concerned.
    CALL TRANSACTION and SUBMIT AND RETURN open a new internal session that forms a new program context. The internal sessions in an external session form a memory stack. The new session is added to the top of the stack.
    When a program has finished running, the top internal session in the stack is removed, and the calling program resumes processing.
    The same occurs when the system processes a LEAVE PROGRAM statement.
    LEAVE TO TRANSACTION removes all internal sessions from the stack and opens a new one containing the program context of the calling program.
    The ABAP memory is initialized after the program is called. In other words, you cannot transfer any data to a program called with LEAVE TO TRANSACTION via the ABAP memory.
    SUBMIT replaces the internal session of the program performing the call with the internal session of the program that has been called. The new internal session contains the program context of the called program with which it is performed.
    When a function module is called, the following steps are executed:
    A check is made to establish whether your program has called a function module of the same function group previously.
    If this is not the case, the system loads the associated function group to the internal session of the calling program as an additional program group. This initializes its global data.
    If your program used a function module of the same function group before the current call, the function module that you have called up at present can access the global data of the function group. The function group is not reloaded.
    Within the internal session, all of the function modules that you call from the same group access the global data of that group.
    If, in a new internal session, you call a function module from the same function group as in internal session 1, a new set of global data is initialized for the second internal session. This means that the data accessed by function modules called in session 2 may be different from that accessed by the function modules in session 1.
    You can call function modules asynchronously as well as synchronously. To do so, you must extend the function module call using the addition STARTING NEW TASK ''. Here, '' is a symbolic name in the calling program that identifies the external session, in which the called program is executed.
    Function modules that you call using the addition STARTING NEW TASK '' are executed independently of the calling program. The calling program is not interrupted.
    To make function modules available for local asynchronous calls, you must identify them as executable remotely (processing type: Remote-enabled module).
    There are various ways of transferring data between programs that are running in different program contexts (internal sessions). You can use:
    (1) The interface of the called program (standard selection screen, or interface of a
    subroutine, function module, or dialog module)
    (2) ABAP memory
    (3) SAP memory
    (4) Database tables
    (5) Local files on your presentation server.
    For further information about transferring data between an ABAP program and your presentation server, refer to the documentation for the function modules WS_UPLOAD and WS_DOWNLOAD.
    Function modules have an interface, which you can use to pass data between the calling program and the function module itself (there is also a comparable mechanism for ABAP subroutines). If a function module supports RFC, certain restrictions apply to its interface.
    If you are calling an ABAP program that has a standard selection screen, you can pass values to the input fields. There are two options here:
    By using a variant of the standard selection screen in the program call
    By passing actual values for the input fields in the program call
    If you want to call a report program without displaying its selection screen (default setting), but still want to pass values to its input fields, there is a variety of techniques that you can use.
    The WITH addition allows you to assign values to the parameters and select-options fields on the standard selection screen.
    If the selection screen is to be displayed when the program is called, use the addition: VIA SELECTION-SCREEN.
    Use the pattern button in the ABAP Editor to insert a program call via SUBMIT. The structure shows you the names of data objects that you can complete with the standard selection screen.
    For further information on working with variants and further syntax variants for the WITH addition, see the key word documentation in the ABAP Editor for SUBMIT.
    You can use SAP memory and ABAP memory to pass data between different programs.
    The SAP memory is a user-specific memory area for storing field values. It is available in all of the open sessions in a user's terminal session, and is reset when the terminal session ends. You can use its contents as default values for screen fields. All external sessions can access SAP memory. This means that it is only of limited use for passing data between internal sessions.
    The ABAP memory is also user-specific, and is local to each external session. You can use it to pass any ABAP variables (fields, structures, internal tables, complex objects) between the internal sessions of a single external session.
    Each external session has its own ABAP memory. When you end an external session (/i in the command field), the corresponding ABAP memory is released automatically.
    To copy a set of ABAP variables and their current values (data cluster) to the ABAP memory, use the EXPORT TO MEMORY ID statement. The (up to 32 characters) is used to identify the different data clusters.
    If you repeat an EXPORT TO MEMORY ID statement to an existing data cluster, the new data overwrites the old.
    To copy data from ABAP memory to the corresponding fields of an ABAP program, use the IMPORT FROM MEMORY ID statement.
    The fields, structures, internal tables, and complex objects in a data cluster in ABAP memory must be declared identically in both the program from which you exported the data and the program into which you import it.
    To release a data cluster, use the FREE MEMORY ID statement.
    You can import just parts of a data cluster with IMPORT, since the objects are named in the cluster.
    In the SAP memory, you can define memory areas (SET/GET parameters, or parameter IDs), which you can then address by a name of up to 20 characters.
    You can fill these memory areas either using the contents of input/output fields on screens, or using the ABAP statement:
    SET PARAMETER ID '' FIELD .
    The memory area with the name now has the value .
    You can use the contents of a memory area to display a default value in an input field on a screen.
    You can also read the memory areas from the SAP memory using the ABAP statement GET PARAMETER ID FIELD . The field then contains the value from parameter .
    The link between an input/output field and a memory area in SAP memory is inherited from the data element on which the field is based. You can enable the set parameter or get parameter attributes in the input/output field attributes.
    Once you have set the Set parameter attribute for an input/output field, you can fill it with default values from SAP memory. This is particularly useful for transactions that you call from another program without displaying the initial screen. For this purpose, you must activate the Set parameter functionality for the input fields of the first screen of the transaction.
    You can:
    (1) Copy the data that is to be used for the first screen of the transaction to be called to the parameter ID in the SAP memory. To do so, use the statement SET PARAMETER immediately before calling the transaction.
    (2) Start the transaction using CALL TRANSACTION or LEAVE TO
    TRANSACTION . If you do not want to display the initial screen, use the AND
    SKIP FIRST SCREEN addition.
    (3) The system program that starts the transaction fills the input fields that do not already have default values and for which the Get parameter attribute has been set with values from SAP memory.
    The Technical information for the input fields in the transaction you want to call contains the names of the parameter IDs that you need to use.
    Parameter IDs should be entered in table TPARA. This happens automatically if you create them via the Object navigator.
    Programs that you call using the statements SUBMIT , LEAVE TO TRANSACTION , SUBMIT AND RETURN, or CALL TRANSACTION run in their own SAP LUW, and update requests receive their own update key.
    When you use SUBMIT and LEAVE TO TRANSACTION , the SAP LUW of the calling program ends. If no COMMIT WORK statement occurred before the program call, the update requests in the log table remain incomplete and cannot be processed. They can no longer be executed. The same applies to inline changes that you make using PERFORM &#8230; ON COMMIT.
    Data that you have written to the database using inline changes is committed the next time a new screen is displayed.
    If you use SUBMIT AND RETURN or CALL TRANSACTION to insert a program and then return to the calling program, the SAP LUW of the calling program is resumed when the called program ends. The LUW processing of calling and called programs is independent.
    In other words, inline changes are committed the next time a new screen is displayed. Update requests and calls using PERFORM ... ON COMMIT require an independent COMMIT WORK statement in the SAP LUW in which they are running.
    Function modules run in the same SAP LUW as the program that calls them.
    If you call transactions with nested calls, each transaction needs its own COMMIT WORK, since each transaction maps its own SAP LUW.
    The same applies to calling executable programs, which are called using SUBMIT AND RETURN.
    The statement CALL TRANSACTION allows you to
    Shorten the user dialog when calling using CALL TRANSACTION USING .
    Determine the type of update (asynchronous, local, or synchronous) for the transaction called. For this purpose, use the addition CALL TRANSACTION USING UPDATE 'update_mode', where update_mode can have the values a (asynchronous), L (local), or S (synchronous).
    Combining the two options enables you to call several transactions in sequence (logical chain), to reduce their screen sequence, and to postpone processing of the SAP LUW 2 until processing of the SAP LUW 1 has been completed.
    When you call a function module asynchronously using the CALL FUNCTION STARTING NEW TASK ' ' statement, it runs in its own SAP LUW.
    Programs that are executed with a SUBMIT AND RETURN or CALL
    TRANSACTION statement starts their own LUW processing. You can use these to perform nested (complex) LUW processing.
    You can use function modules as modularization units within an SAP LUW.
    Function modules that are called asynchronously are suitable for programs that allow parallel processing of some of their components.
    All techniques are suitable for including programs with purely display functions.
    Note that a function module called with CALL FUNCTION STARTING NEW TASK is executed as a new logon. It, therefore, sees a separate SAP memory area. You can use the interface of the function module for data transfers.
    Example: In your program, you want to call a display transaction that is displayed in a separate window (amodal). To do so, you encapsulate the transaction call in a function module, which you set as to Remote-enabled module. You use the function module interface to accept values that you write to the SAP memory. You then call up the transaction in the function module using CALL TRANSACTION AND SKIP FIRST SCREEN. You call the function module itself asynchronously.
    Type &#8216;E' locks for nested program calls may be requested more than once from the same object. This behavior can be described as follows:
    Lock entries from function modules called synchronously increment the cumulative counter, And are therefore successful.
    Lock entries from programs called with CALL TRANSACTION or SUBMIT
    AND
    RETURN is refused. The object to be locked by the called program is displayed as already Locked by another user.
    Programs that you call using SUBMIT or LEAVE TO TRANSACTION cannot come into conflict with lock entries from the calling program, since the old program ends when the call is made. When a program ends, the system deletes all of the lock entries that it had set.
    Lock requests belonging to the same user from different R/3 windows or logons are treated as lock requests from other users.
    Regards,
    Rajesh.
    Please reward points if found helpful.

  • Is there a function module to import a value to abap memory

    Hi,
    My requirement is as follows.
    I have the following inputs.
    Input 1 = some value
    Input2 = ABAP Memory
    If I pass the above inputs to a function module it should import the value in Input1 to the ABAP Memory given in Input2.
    Is there any standard function module in SAP to fulfill the above requirement?
    Thanks,
    Indira

    Not sure if my grammar is correct, but you don't "import to" rather you "export to" & "import from".
    First things first. Why do you need a FM for this purpose ? A simple [EXPORT|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#&ABAP_ALTERNATIVE_3@3@] statement will do this for you.
    May be i don't get your question correctly, else you're too much obsessed with using FMs.
    Cheers,
    Suhas

  • ABAP Memory (EXPORT/IMPORT) - Performance Issue

    Performance wise, is it a good idea to use ABAP memory to export and import data between programs?
    Thanks in advance,
    JT

    IMHO is you EXPORT/IMPORT a couple of variable...Your not going get any performance issues....So go ahead -:)
    Greetings,
    Blag.

  • Hi Friends ....Difference between SAP memory and ABAP memory

    Hi Friends,
    I faced a interview and they ask this question
    What is the difference between SAP Memory and ABAP memory..

    conti
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement.
    Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens.
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    A simple example of ABAP memory is using the EXPORT/IMPORT statements.
    Here in this program, I get the data, export it to memory,
    clear out the internal table in my progam, then reimport the data into it and write out the data.
    You probably wounldn't do this in a normal program,
    but this is how you can pass data from program a to program b when A Submits program B.
    report zxy_0002 .
    data: it001 type table of t001 with header line.
    select * into table it001 from t001.
    export it001 = it001 to memory id 'ZXY_TEST'.
    clear it001. refresh it001.
    import it001 = it001 from memory id 'ZXY_TEST'.
    loop at it001.
    write:/ it001-bukrs, it001-butxt.
    endloop.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access.
    You can use SAP memory either to pass data from one program to another within a session,
    or to pass data from one session to another.
    Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters).
    These parameters can be set either for a particular user
    or for a particular program using the SET PARAMETER statement.
    Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement.
    The most frequent use of SPA/GPA parameters is to fill input fields on screens
    ABAP/4 Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access
    using the EXPORT and IMPORT statements.
    Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling,
    the data needs to be placed in ABAP memory before the call is made.
    The internal session of the called program then replaces that of the calling program.
    The program called can then read from the ABAP memory.
    If control is then returned to the program which made the initial call, the same process operates in reverse.
    SAP memory
    The SAP memory, otherwise known as the global memory,
    is available to a user during the entire duration of a terminal session.
    Its contents are retained across transaction boundaries as well as external and internal sessions.
    The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
    ABAP/4 memory
    The contents of the ABAP/4 memory are retained only during the lifetime of an external session
    (see also Organization of Modularization Units).
    You can retain or pass data across internal sessions.
    The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
    ABAP Memmory & SAP Memmory
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Set
    http://www.geocities.com/SiliconValley/Campus/6345/set_para.htm
    GET
    http://www.geocities.com/SiliconValley/Campus/6345/get_para.htm
    EXPORT
    http://www.geocities.com/SiliconValley/Campus/6345/export01.htm
    Other Imp Help
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm

  • Abap memory question

    hi,guys,i did a example to test the difference between sap memory and abap memory,the result that i did program zmemory1 is : 1111  2223,
    but the question is when i did program zmemory2 alone,the result is the same,why i can get test2 with
    import statement in different session,below is my code,
    thxs in advance!
    REPORT  zmemory1.
    DATA : test1(10) TYPE c,
           test2(10) TYPE c.
    test1 = '1111'.
    test2 = '2223'.
    FREE MEMORY ID 'TEST2'.
    SET PARAMETER ID 'TEST1' FIELD test1.
    EXPORT test2 TO MEMORY ID 'TEST2'.
    CALL TRANSACTION 'ZMEMORY2'.
    REPORT  zmemory2.
    DATA: test1(10) TYPE c,
          test2(10) TYPE c.
    GET PARAMETER ID 'TEST1' FIELD test1 .
    IMPORT test2 FROM MEMORY ID 'TEST2'.
    WRITE:/ test1,test2.

    Hello Kevin,
    You can retest the whole thing again.
    Execute your program ZMEMORY_1 in which you have chosen EXPORT TO MEMORY-ID -> This will store the value you want to, to a memory space created by name as specified by you.
    Execute your Program ZMEMORY_2 in which you have chosen IMPORT FROM MEMORY-ID -> This will get the value you have stored in the memory ID.
    In the case you execute the program separately you will not be able to get the value you have stored in memory.
    In case you have executed/submitted the program ZMEMORY_2 in program ZMEMORY_1 you will be able to get the values stored in the memory ID.
    Please note that Garbage Collector collects/clears the memory as soon as session is ended. May be in some case it would not have been triggred before the execution of the program, I am taking a case on my assumption but generally it does not happens and Garbage Collector does it job well :-).
    Hope this helps.
    Thanks,
    Jayant

  • Reading from ABAP memory, not available in call stack

    Hi,
    I need to read a table from ABAP memory. It is not available from the call stack, so I can’t use the standard ‘assign’ approach. The internal table is listed under System areas -> Area ITABS-HEADS with the name \FUNCTION-POOL=MLSP\DATA=IY_ESLL[] 
    Is it even possible to read this table? Seems as though I have to access function-pool MLSP to find it.
    Regards,
    Damian

    Hi,
    The main program of this function pool is SAPLMLSP. If you in any of theses includes can add a small form that returns the content of internal table ( IY_ESLL[]  ) that should solve your problem.
    In the program that need the data, write something like :
    PERFORM Z_GET_MLSP_DATA(SAPLMLSP) using GT_ESLL.
    This form can be created within any sub-include within the SAPLMLSP.
    However, with a quick look at SAPLMLSP does not reveal any user modifiable includes, but I didn't check very carefully.
    If you are on ECC 6.0, there are plenty of enhancement spots, which could be used for this purpose.

  • Is there any issue in using ABAP Memory ID to exchange between the programs

    Hi All,
    Do we expect any issues if we use ABAP Memory ID's to exchange the data between different programs?
    I was told by my colleagues that, we can expect some unforeseen issues if we use ABAP Memory ID's. These issues could be because of refresh of Memory ID's in the Standard program.
    Is that true? Need experts opinion on this question.
    Thanks a lot in advance.
    Regards,
    RSS

    I can think of such case only if you pick memory id of some standard name. Anyhow I can't imagine this happens w/o running any standard report on you machine from your custom report. ABAP memory is user dependant so you have your own roll area wherein all run programs can communicate. If you don't run any standard report by means of SUBMIT, you don't have to worry about this aspect either.
    Futhermore if you run separate GUI session, or sinmply use /o in same session, you open new external session which gets its own new ABAP memory. So you don't affect your previous one at all.
    If you want to be extremely careful, use memory id of some custom, original name i.e. I always use such naming convention NAME_OF_PROGRAM_XXXX where XXX denotes its usage i.e. XXX = 'EMPLOYEES'. If I also don't use SUBMIT I am 100% sure no other program touches/flushes this memory.
    Don't believe your collegues and use ABAP memory whenever needed, but always consider context of program and where it lies in the memory. If they persist, please send them here to discuss this matter giving some good reason why they discourage you to do.
    BTW: This could be an issue with SAP Memory, but with ABAP no chance.
    Regards
    Marcin

  • ABAP-Memory per User or static ABAP-class??

    Hi there,
    I want to save some information for each user in a transaction which uses SUBMIT-statements. So I want to store the information globally across reports and transactions (starting from my own single transaction).
    So I can use the ABAP-Memory for storing this information. Is the information stored there seperated by user or is it possible that one user gehts the information of another user? When is ABAP-memory cleared? Is this done automaticly when my transaction flow is finished.
    Alternatively I think I can use a global static ABAP-class with attributes to store the information. Is such a ABAP-class also user-dependent??
    And when is this information cleared??
    Can you give me some hints?
    Thank you very much!
    Kind regards
    Jens

    Hi,
    Both ABAP and SAP memory are user specific. In your case if the issue would concern just one user you should go for SAP memory (when data should be exchanged between external sessions that is windows of SAP gui) or ABAP memory when data exchanged within one external session (between internal sessions - that is between programs run in one GUI session ).
    If you want the data be stored globally for all the users, you have to either store them in some custom global table in DDIC (and later read from different user) or use [Shared objects|http://help.sap.com/saphelp_nw70/helpdata/EN/14/dafc3e9d3b6927e10000000a114084/frameset.htm] which is a special memory buffer in Application Server, where you can exchange data between user sessions.
    Regards
    Marcin

  • Add data to existing buffer in ABAP memory

    Hi All
      My requirement is to store multiple data variables in ABAP memory, but my limitation is I have to loop an Itab and export these data one by one to memory. I tried using EXPORT....TO memory in the following way:
    LOOP AT itab.
        EXPORT itab-field1 TO MEMORY ID 'CONST_MEMID'.
    ENDLOOP.
    The problem is I dont want the previous contents to be overwritten. I mean the 2nd loop should not overwrite the contents written in the first loop. Any ideas how this can be achieved?
    Thanks
    SCPA.

    I don't think you can do that, how would you do the IMPORT afterwards without knowing the type of the data in memory?
    If you can access the itab with the fieldnames (and the actually named data structures) from the place where you do the import, then you could create an incremental memory ID for each cycle, and do the import in the same order (generating the ID in the same way).
    Something like this:
    Export:
    LOOP AT itab. (ITAB in turn contains names of fields)
    ASSIGN (itab-field1) TO <fs>.
    l_mem_id = sy-tabix.
    CONDENSE l_mem_id.
    CONCATENATE 'CONST_MEMID' l_mem_id INTO l_mem_id.
    EXPORT <fs> TO MEMORY ID l_mem_id. (Here <fs> can sometimes be a field or ITAB or a deep table)
    ENDLOOP. 
    Import:
    LOOP AT itab. (ITAB in turn contains names of fields)
    ASSIGN (itab-field1) TO <fs>.
    l_mem_id = sy-tabix.
    CONDENSE l_mem_id.
    CONCATENATE 'CONST_MEMID' l_mem_id INTO l_mem_id.
    IMPORT <fs> FROM MEMORY ID l_mem_id. (Here <fs> can sometimes be a field or ITAB or a deep table)
    ENDLOOP. 
    If you really need to use only one EXPORT / ID, then I think you could use the alternative a®s suggested, generating one parameter for each itab entry. But still you'll need to generate that again when you do the import as you do for my solution.
    Hope this helps.
    Regards
    Edited by: Alejandro Bindi on Dec 16, 2008 8:59 PM
    sy-tabix, not sy-index.

Maybe you are looking for

  • Why won't my Firefox open with my home page instead of a blank tab?

    The browser always opens in a new tab even when I have it set to open in my home page. When I have Firefox set as my default browser it opens in a new blank tab when I click a link in a document or email. The only time I get my home page on opening F

  • Ipod nano frozen with screen on

    just had my ipod over 2 days. worked really fine and I was so pleased with it. but now...when i turned it on, it did not play the music. It is in pauze mode,and frozen. My pc does not recognize when i connect it. I tried several usb 2.0 ports but no

  • Premiere Pro CS5.5 Mac - Timeline Previews are being Killed... Any way to stop this ?

    Hi... On Video track one, I have the track height very high so that I can see the footage poster frames. I love editing this way. Lots of times, I will edit simultaneously between multiple sequences. My problem is that after a while PPRO just kills t

  • Nested Movieclips don't scroll after shift

    Hi, I am trying to set up a page scroller of sorts..my original plan was to have 3 movieclips placed on next to the other, within a single movieclip. When the next button is pressed the parent movieclip scrolls and reveals the next page, and the olde

  • HT5622 what is a passcode?

    I am trying to update software  and I get asked for a passcode - what is it ???