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

Similar Messages

  • How to pass data between two internal sessions using ABAP memory?

    Hi,
    How to pass data between two internal sessions using ABAP memory?
    It would be fine if you could explain with an example.
    And also let me clear about the data passing between two main sessions and two external sessions with specific examples.
    Thanks.

    Hi ,
      check the example.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    In this statement, the system does not check whether the structure of the object in memory is compatible with the structure into which you are reading it. The data is transported bit by bit. If the structures are incompatible, the data in the target field may be incorrect.
    PROGRAM SAPMZTS1.
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    SUBMIT SAPMZTS2 AND RETURN.
    SUBMIT SAPMZTS3.
    The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
    Example for SAPMZTS2:
    PROGRAM SAPMZTS2.
    DATA: TEXT1(10),
          TEXT3 LIKE TEXT1 VALUE 'Initial'.
    IMPORT TEXT3 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT3.
    IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT1.
    Example for SAPMZTS3:
    PROGRAM SAPMZTS3.
    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    LOOP AT JTAB.
      WRITE / JTAB-BOOKID.
    ENDLOOP.
    The output is displayed on two successive screens. It looks like this:
    and
    The program SAPMZTS2 attempts to read a data object TEXT3 from the data cluster "text", which does not exist. TEXT3 therefore remains unchanged. The existing data object TEXT2 is placed in TEXT1. In both cases, SY-SUBRC is 0, since the cluster "text" contains data.
    The program SAPMZTS3 reads the internal table ITAB from the cluster "table" into the internal table JTAB. Both tables have the same structure, namely that of the ABAP Dictionary table SBOOK.
    Pls. reward if useful.....

  • 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

  • Memory monitoring in ABAP debugger

    Can anyone tell me the relevance of memory monitoring in ABAP debugger and and how to use it practically. I have searched the forums but did not find anything.

    Hi Sameer,
    If you choose the Settings pushbutton and select the Memory Monitoring radio button, or if you choose the menu Settings  ® Memory Monitoring, the system will inspect the roll area of the current mode after every ABAP statement. This allows you to check whether neighboring memory areas have been overwritten.
    The system checks of the memory segments  in order to find the memory overwrites for each executed statement. SAP uses this settings internally to find potential kernal bugs. Turning on this setting significantly decreases application performance.
    This internal setting is not relavent for ABAP developers.
    please check this link
    http://www.sappro.com/downloads/Settings&SystemAreas.pdf
    http://help.sap.com/saphelp_nw70/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm
    best regards,
    raam

  • 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

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

  • Help with memory issue - abap memory vs roll area

    Hi experts,
    with our customer we are using TRM and WebDynpro technology to process Tax forms. We have portal integration. Recently due to performance reasons we were forced to analyze memory consumption and actually we are unable to understand what is happening. In memory inspector we can see much higher total memory than for ABAP total.
    For Example, running simple application for form bundle search will produce following memory consumptions:
    We do not understand why the Total section is + 12 MB when all ABAP code is just 7 MB?
    Another example - opening of a form bundle (FB) leads to cca 32 MB consumption (no matter what type of FB we are opening). Visiting all pages of FB leads to 52 MBs (specific FB, this depends on FB type). Again, when we invoke memory inspector a lot of memory is in Roll Area.
    This look like roll area is almost always twice as big as the actual ABAP Application.
    Please any suggestions what is happening?
    May be just the misunderstanding of roll area. To our knowledge roll area is the area of the internal session managed by memory manager (usually mostly created by extended memory). But why is this area so large when the actual application needs half of the space?
    Some discussion suggests that this is due many dead objects released when memory inspector is started. But why is this space still available to the application and not put back to the extended pool? Is there any way how to identify those dead objects?
    Thanks a lot

    Hi, ORA-4031 in this case can be caused by unrestricted growth of the PGA, thus forcefully reducing the SGA.
    We've had this in the past also.
    The solution is in older versions to increase the shared_pool_size as you mentioned but with ASMM, this is no longer an option. You can however retrict the growth of the PGA by setting SGA_TARGET.
    On our system this now looks like:
    SQL> show parameter _target
    NAME                                 TYPE                 VALUE
    db_flashback_retention_target        integer              1440
    memory_max_target                    big integer          10G
    memory_target                        big integer          10G
    pga_aggregate_target                 big integer          0
    sga_target                           big integer          8GSee how we in fact set the max growth of the PGA to 2Gb ( 10Gb - 8Gb)
    Try this and see if ot works for you also
    Success!!
    FJFranken

  • 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

  • ABAP Memory.

    Hi,
    I have 2 ABAP program which was created in dialog screen not selection-scrren and list-processing.  I using IMPORT & EXPORT with MEMORY ID 'mem_test' to pass value. I would like to know will there be any memory corruption and cause inconsistency when there is multi-concurrency of user using the ABAP program.
    IF using IMPORT & EXPORT without Memory ID, will it cause any memory corruption and cause inconsistency when 2 person accessing the program at a time, or the memory will be smart enough to allocated another new memory space for the other user?
    How do i avoid this? Is there any other better way like using submit? Please advise.
    Regards,
    Rayden

    SUBMIT
    Syntax
    SUBMIT {rep|(name)} [selscreen_options]
                        [list_options]
                        [job_options]
                        [AND RETURN].
    Addition:
    ... AND RETURN
    Effect
    The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.
    The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.
    The selscreen_options additions can be used to determine the selection screen for the program accessed and to supply it with values.
    The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.
    You can schedule the program for background processing by specifying job_options.
    SUBMIT - selscreen_options
    Syntax
    ... [USING SELECTION-SCREEN dynnr]
        [VIA SELECTION-SCREEN]
        [selscreen_parameters] ... .
    Extras:
    1. ... USING SELECTION-SCREEN dynnr
    2. ... VIA SELECTION-SCREEN
    Effect
    The addition USING SELECTION-SCREEN specifies the selection screen, VIA SELECTION-SCREEN specifies whether it is displayed. The additions selscreen_parameters provide values for the parameters, selection criteria, and the free selection of the called selection screen.
    The values are transferred to the selection screen between the events INITIALIZATION and AT SELECTION-SCREEN OUTPUT The following hierarchy applies for transferring values:
    First, the variant of the addition USING SELECTION-SET is transferred, which sets all parameters and selection criteria to the values of the variant. The values previously set in the called program are overwritten.
    The values of the table of the addition WITH SELECTION-TABLE are then transferred. All parameters and selection criteria specified there are overwritten accordingly.
    Finally, the values of the additions WITH sel value are transferred. All parameters and selection criteria are overwritten accordingly. If the addition WITH sel value is used more than once for the same parameter, this is overwritten with the last specified value. If the addition WITH sel value is used more than once for the same selection criterion, a selection table with the corresponding number of lines is transferred.
    Providing values for free selections is independent of this hierarchy.
    Notes
    The options for parameter transfer enable a selection screen to be viewed as a parameter interface of an executable program. This applies particularly for background selection screen processing and for parameters and selection criteria that are defined without screen elements using the addition NO-DISPLAY
    When transferring data, note that any adjustments made to the screen format, such as abbreviations or the execution of conversion routines, are not executed for fields for which there are no screen elements on the selection screen. This applies for all parameters and selection criteria defined with NO DISPLAY. It also applies for all lines of a selection table with the exception of the first line.
    The additions selscreen_parameters only work the first time the called program is executed. If a selection screen is displayed in the called program, the runtime environment calls the program again after it is finished, thereby replacing the values specified in selscreen_parameters with the previous input values.
    Addition 1
    ... USING SELECTION-SCREEN dynnr
    Effect
    This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
    If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
    If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
    Addition 2
    ... VIA SELECTION-SCREEN
    Effect
    If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed.
    SUBMIT - list_options
    Syntax
    ... [LINE-SIZE width]
        [LINE-COUNT page_lines]
        { [EXPORTING LIST TO MEMORY]
        | [TO SAP-SPOOL spool_options] } ... .
    Extras:
    1. ... LINE-SIZE width
    2. ... LINE-COUNT page_lines
    3. ... EXPORTING LIST TO MEMORY
    4. ... TO SAP-SPOOL spool_options
    Effect:
    These additions affect the basic list in the program accessed. While LINE-SIZE and LINE-COUNT influence the formatting, the other two additions determine the output type of the list.
    EXPORTING LIST TO MEMORY saves the list to the ABAP Memory and TO SAP-SPOOL sends it as a print list to the SAP spool system. If you do not specify these additions, the basic list is displayed as a screen list.
    Note:
    The additions only take effect the first time the program accessed is executed. If a selection screen is displayed in the program accessed, the runtime environment accesses the program again after completion, without taking account of the list_options additions. This is particularly important to the addition TO SAP-SPOOL, because the basic list is displayed as a screen list and not as a print list when the program is accessed again. For this reason, it is advisable not to use the addition VIA SELECTION-SCREEN when using list_options.
    Addition 1
    ... LINE-SIZE width
    Addition 2
    ... LINE-COUNT page_lines
    Effect
    These additions define the line width and page length of the basic list. They have the same effect as the additions of the same name in the program initiating statement for the program accessed. If the program accessed has the same additions in the program initiating statement, these overwrite the values specified for SUBMIT.
    Addition 3
    ... EXPORTING LIST TO MEMORY
    Effect
    This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
    The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
    The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
    The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
    The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
    The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
    Note
    The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed.
    Example
    Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list.
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    Addition 4
    ... TO SAP-SPOOL spool_options
    Effect
    This addition causes a new print list level to be opened in the internal session of the program called and assures that the first output statement for the basic list creates a new spool request. All list outputs of the program called are transferred as print lists, page by page, to the SAP spool system. Using the spool_options additions, the print parameters and archiving parameters of the spool request are specified.
    Note
    It is not possible to switch from the print list to a screen list in the program called. The statement NEW-PAGE PRINT OFF does not work on print list levels created using SUBMIT TO SAP-SPOOL.
    Example
    Accessing an executable program and creating a spool request.
    DATA: print_parameters TYPE pri_params,
          archi_parameters TYPE arc_params,
          valid_flag(1) TYPE c.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        archive_mode           = '3'
      IMPORTING
        out_parameters         = print_parameters
        out_archive_parameters = archi_parameters
        valid                  = valid_flag
      EXCEPTIONS
        invalid_print_params   = 2
        OTHERS                 = 4.
    IF valid_flag = 'X' AND sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        ARCHIVE PARAMETERS archi_parameters
                        WITHOUT SPOOL DYNPRO.
    ENDIF.

  • ABAP Memory Validity Period

    Hi All,
              I am exporting a value to ABAP memory using EXPORT nametab FROM it_error_messg TO MEMORY ID mem_id_export.
    Now after reading the value I am unable to clear free the memory as the control comes multiple times i.e., in a loop. I think the value in this memory is stored till the session is active. Will it contents of the memory get cleared once i log off from SAP.
    Thank you in advance.
    Regards
    Sandy

    yes until the session ends, or you can clear programatically...

  • 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

  • How to import from abap memory?

    In Zprogram the import statement is
    " import lv_ebeln from memory id '/IXOS/DX_RSEG'."
    1) I need to know the stucture that matches to this memory ID.
    2) is there any alternate procedure to get the data from memory id.
    i dont know what the exporting type they used.
    Urgent

    sorry i am not getting you properly probably some other program
    export lv_ebeln to memory id '/IXOS/DX_RSEG'. statement will be there which is filling the value of  lv_ebeln to the memory id /IXOS/DX_RSEG you need not know the structure of this because that is the memory space indicator . '/IXOS/DX_RSEG' is the area in the abap memory and where the latest value of  lv_ebeln is  stored.
    so getting the value from that abap memory area '/IXOS/DX_RSEG'  you have to only use import lv_ebeln from memory id '/IXOS/DX_RSEG'.  i think there is no other way....
    regards
    shiba dutta

Maybe you are looking for

  • Cropping a landscape to a portrait

    Hi, I have a landscape photo I would like to crop into a portrait with the 4x6 dimensions, obviously iPhoto knows what a landscape and portrait photo is so I have no option to crop it the way I want unless doing it with no lock on but then how do I k

  • Cant create pdf file

    icant create pdf files,mesage:ican find archive of resource ¨pdf file

  • Gnome 3 not saving settings

    Gnome 3 was installed accepting all options to # pacman -S gnome Background doesn't change in the settings, other settings as well, for example the favourite icons don't save - everytime I log out and in there are only epiphany and file manager. Fail

  • HD problem after connecting to new Mac Pro

    Went to our first MUG meeting of the years tonight. And took along my Lacie 500gig firewire external H/D. This was going to be used to demo the new iTunes 7 app. The computer being used was a new Mac Pro duo core intel etc. When I plugged the H/d in

  • Premiere Elements 9 Shakey Video After Render!?

    Hi I am using Premiere Elements 9 to create my videos. For some reason when I render my videos out the material is shaky? I've been rendering my videos to play on windows media and the format is HD720p 30 The camera I am using is a Panasonic HDC-SD20