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

Similar Messages

  • Hi All,Can any provide an example for SAP MEMORY AND ABAP memory

    Hi All,
          Can any provide me an example for SAP MEMORY AND ABAP memory.
    thanks&regards.
    Bharat.

    HI Bharat
    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
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bc4358411d1829f0000e829fbfe/frameset.htm
    Other Imp Help
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    Regards Rk

  • 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

  • SHARED MEMORY AND DATABASE MEMORY giving problem.

    Hello Friends,
    I am facing problem with EXPORT MEMORY and IMPORT MEMORY.
    I have developed one program which will EXPORT the internal table and some variables to the memory.This program will call another program via background job. IMPORT memory used in another program to get the first program data.
    This IMPORT command is working perfect in foreground. But  it is not working in background.
    So, I have reviewed couple of forums and I tried both SHARED MEMORY AND DATABASE MEMORY.  But no use. Still background is giving problem.
    When I remove VIA JOB  parameter in the SUBMIT statement it is working. But i need to execute this program in background via background job. Please help me . what should I do?
    pls find the below code of mine.
    option1
    EXPORT TAB = ITAB
           TO DATABASE indx(Z1)
                FROM   w_indx
                CLIENT sy-mandt
                ID     'XYZ'.
    option2
    EXPORT ITAB   FROM ITAB
      TO SHARED MEMORY indx(Z1)
      FROM w_indx
      CLIENT sy-mandt
      ID 'XYZ'.
       SUBMIT   ZPROG2   TO SAP-SPOOL
                      SPOOL PARAMETERS print_parameters
                       WITHOUT SPOOL DYNPRO
          *_VIA JOB name NUMBER number*_
                       AND RETURN.
    ===
    Hope every bidy understood the problem.
    my sincere request is ... pls post only relavent answer. do not post dummy answer for points.
    Thanks
    Raghu

    Hi.
    You can not exchange data between your programs using ABAP memory, because this memory is shared between objects within the same internal session.
    When you call your report using VIA JOB, a new session is created.
    Instead of using EXPORT and IMPORT to memory, put both programs into the same Function Group, and use global data objects of the _TOP include to exchange data.
    Another option, is to use SPA/GPA parameters (SET PARAMETER ID / GET PARAMETER ID), because SAP memory it is available between all open sessions. Of course, it depends on wich type of data you want to export.
    Hope it was helpful,
    Kind regards.
    F.S.A.

  • Diff between sap query and abap query

    diff between sap query and abap query

    Hi,
    ABAP query is mostly used by functional consultants.
    SAP Query :
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query,:
    As far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    regards,
    vasavi.
    reward if it is helpful.

  • I know sap hr and ABAP ..

    HI,
    I know SAP HR and ABAP ...then is it necessary to learn SAP ABAP HR course separately . is SAP ABAP HR is the combination of both ABAP and SAP HR or it is a different entirely course.do you suggest me to learn ABAP HR separately .

    Hi Experts,
    Please help me...
    I am new to SAP HR ABAP Programming.. Here I need to develop a Expenses claim form( ESS)
    I require a custom report to get the employee details in form and they can fill their travel expenses and other expenses manually in the form and that should be send to manager for approval.
    I don't know from which  Infotype I can get these details for the specific employee who are logged in to ESS, what are the Function Modules and which workflow process we can use for the approval ...Etc
    I am providing detail form below please give me some information about the report and workflow..
    Please someone help me to overcome this situation..
    Regards,
    Sudheer

  • Segment memory and shared memory

    hi guys
    is it possible to know the path of "Segment memory and shared memory " on OS level...........
    i don't know exact forum for this question so i post it here
    please help me !

    If are you using Linux you can use ipcs to get all shared memory segments at system level:
    $  ipcs -m
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0x0000f47a 65536      root      777        512000     4
    0x26278554 163842     oracle    640        132120576  16
    0xac004cf0 196611     oracle    660        16108224512 128The Oracle executable sysresv uses ORACLE_SID env. var to map shared memory segment to the current instance:
    $ sysresv
    IPC Resources for ORACLE_SID "XXX1" :
    Shared Memory:
    ID              KEY
    196611          0xac004cf0
    Semaphores:
    ID              KEY
    229377          0x2dac12a4
    Oracle Instance alive for sid "XXX1"

  • In OSX Activity Monitor, what's the difference between 'free' memory and 'inactive' memory

    In OS X Activity Monitor, what's the difference between 'free' memory and 'inactive' memory. My daughters 2Gb MacBook Pro is very slow, it probably needs more memory but there is almost 1Gb of 'inactive' memory but no 'free' memory when an application is opened.
    Thanks

    Free RAM is the one that has not been used by any application since you started up your Mac, and inactive RAM is the one that was used by an application and it is not in use anymore.
    1 GB of inactive RAM is a lot, and it may be the cause of the slowness. There are a lot of apps that allows you to turn inactive into free RAM. I use FreeMemory, but have a look at the Mac App Store.
    If you are a developer, you can do that with a command you can type into Terminal:
    sudo purge

  • Start Of Ramp-Up for SAP Portfolio and Project Management 5.0

    Start Of Ramp-Up for SAP Portfolio and Project Management 5.0
    Starting with this new release, the application SAP Portfolio and Project Management 5.0
    replaces both the SAP Resource and Portfolio Management (SAP RPM) application and the
    Collaboration Projects (cProjects) application.
    Start of ramp-up for SAP Portfolio and Project Management is 19th of April, 2010. The end
    of ramp-up is currently scheduled for 19th of October, 2010.
    Functional Innovations And New Features
    A detailed description of all new and/or enhanced functional innovations and features can
    be found in the Release Notes:
    [http://service.sap.com/releasenotes |http://service.sap.com/releasenotes]
      -> SAP Solutions
        -> Release Notes SAP Portfolio and Project Management
    There are some SAP Notes which are in general very important for SAP Portfolio and Project
    Management 5.0 and which also serve as central points of entry to find import information:
    SAP Note [1377104|https://service.sap.com/sap/support/notes/1377104]      FAQs - SAP Portfolio and Project Management 5.0
    SAP Note [1402912|https://service.sap.com/sap/support/notes/1402912]      PPM 5.0: Supported Browsers, Java versions, etc. 
    SAP Note [1411953|https://service.sap.com/sap/support/notes/1411953]      PPM 5.0: Configuration Content
    SAP Note [1436778|https://service.sap.com/sap/support/notes/1436778]      SAP Portfolio and Project Management 5.0: Restrictions
    Kind regards,
       Florian

    Thanks very much for taking the time to post the info Florian. I will update this thread as well if I run into any new information.
    Do we have any idea on SAP's direction for Product Definition? PD is still version 2.0 and I heard that PD functionality will be incorporated into PPM 5.0 which does make a lot of sense. I very briefly went through the notes and config doc in this post and did not get the impression that PPM has any idea and concept management capabilities.

  • Is there any difference between DDR3 memory and LPDDR3 memory? As i brought my macbook air 2013 recently and i saw the specifications it is indicating DDR3, buy apple website stated LPDDR3. Anyone can advise on this?

    Hi
    Is there any difference between DDR3 memory and LPDDR3 memory? As i brought my macbook air 2013 recently and i saw the specifications in the system info that is indicating DDR3, but apple website stated LPDDR3. Anyone can advise on this?

    Welcome to Apple Support Communities
    Read > http://en.wikipedia.org/wiki/Mobile_DDR DDR is the RAM used in computers, and LPDDR is common in mobile computers

  • System Copy for SAP Netweaver 2004 ABAP and Java

    Dear Friends,
    We are planning to do System copy for CRM 4.0 (ABAP+Java) from PROD to Quality.
    Production has following
    Production
    CRP (ABAP+JAVA, Oracle 10g)
    CR1 (Java Standalone, CRM Applications, Oracle 10g)
    CR2 (Java Standalone, CRM Applications, Oracle 10g)
    Test
    CRT (ABAP+JAVA, Oracel 10g)
    CR1 (Java Standalone, CRM Applications, Oracle 10g)
    As per my understanding perfrom System Copy in two methods
    1. Using Offline backup of CRP from the Split Mirror backup.
    2. Export of the CRP from the Split Mirror backup.

    If you have Split Mirror available you could definitely use it. Redirected restore or export/import are the alternatives.You could also use file copy (system offline is preferred).
    BMG

  • Pagefile for SAP Erp2005 and Solution Manager 4.0

    Hi all,
    I've installed SAP ERP2005 and Solution Manager 4.0 on the same server with Windows 2003 Standard 32bit.
    The RAM on this server is 3325MB.
    How many paging file I must configure???
    At the moment I configured the pagefile size as defined in the installation guide:
    1 RAM + 8GB that is 12285MB.
    Is it correct????
    For both instance I set the PHYS_MEM parameter to 2328 (70% of the RAM)...is it correct??
    P.S. How to calculate the [BE] parameters??
    [BE] = maximum possible number of user calculated from the size of physical main memory
    Thanks in advanced
    Moreno

    I agree with Yaroslav,
    you should NOT set those values:
    em/initial_size_MB  |----    [PM]  |----    [PM]   |Mbyte     |
    |---    em/max_size_MB  |---    20000  |---   100000   |Mbyte     |
    |  em/address_space_MB  |-----    512  |-----   4096   |Mbyte     |
    |----  ztta/roll_first  |-------    1  |-------    1   |Byte      |
    |---    ztta/roll_area  |---  2000000  |---  3000000   |Byte      |
    |  ztta/roll_extension  |  2000000000  |  2000000000   |Byte      |
    |    abap/heap_area_dia  |  2000000000  |           2000000000   |Byte     |
    | abap/heap_area_nondia  |  2000000000  |           0  |Byte      |
    |  abap/heap_area_total  |  2000000000  |[PM]*1048576   |Byte      |
    |-    rdisp/ROLL_MAXFS  |  [BE] * 100   |  [BE] * 100   |8KB Block |
    |---    rdisp/ROLL_SHM  |  [BE] * 100   |  [BE] * 100   |8KB Block |
    |---    rdisp/PG_MAXFS  |---    32768  |---    32768   |8KB Block |
    |-----    rdisp/PG_SHM  | 
    so... that [BE] value is not to be used.

  • Db memory Vs abap memory

    I wanted to know in the Central Instance (crm/ BI/solman) how much memory should be allocated to the database and how much to ABAP.
    I remember from one of the class it is 30% to the database and 70% to abap. .. but I could not find this in any manual/link/note.
    Does any one send me a reference with this information.
    thank you and happy holidays.
    regards
    Laxmi

    This is just one "rule of thumb", not a general recommendation.
    Each system is different, has a different workload, different number of users, different requirements, that's why there is no official note.
    I would start with 50/50 and let the system run for a few days, then check ST02 for the maximum amount of memory for the SAP application needed and adapt the parameters according. Tuning memory is an iterative process.
    Just keep in mind that your system speed almost solely relies on the size of the database cache. Less I/O --> less time to wait --> more speed. So I would give the database as much memory as possible by not impacting the application and avoding the OS to start swapping/paging.
    Markus

  • Example for Using WDR_SELECT_OPTIONS and SALV_WD_TABLE in one View

    Hello,
    I need an Example for Using the WD-Components WDR_SELECT_OPTIONS and SALV_WD_TABLE
    in one view. Can anybody help me?
    Thanks
    Toto

    Hello,
    Please see these:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21706b4b-0901-0010-7d93-c93b6394bc1d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637]
    [/people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application]
    [/people/thomas.jung3/blog/2005/12/21/webdynpro-abap-alv]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8]
    Regards.

  • What's the difference between free memory and inactive memory?

    In activity monitor it mostly shows my having a lot of inactive memory and a lot less free memory even when I'm only running Safari for instance. What is this inactive memory and why is not available?

    This is a very informative article:
    http://docs.info.apple.com/article.html?artnum=107918

Maybe you are looking for

  • Load and Display Multiple Images in a Web Dynpro Table

    I am new to Web Dynpro and I am wondering if anyone can help me with an application that I am currently developing. I have a particular requirement to store images in a database table (not MIME repository) and then display them in a WD table element.

  • Printing selected data in ALV or Table in Web Dynpro for ABAP

    Hi Experts, I have ALV  / Table report in the Web Dypro for ABAP App.  User wants to select a record in ALV/ table and / or preview it in PDF form and then he/she can print it. What is the technical steps do I need to achieve this result? Thanks! - A

  • Can't drag and drop files between spaces in lion osx

    since upgrading to lion osx, i've noticed that i can't drag a pic, for example, from safari and drop it into a chat box in ichat.  used to drag pics, web addresses, text, etc across spaces all the time in snow leopard but i don't seem to be able to d

  • Problems When recieving Jms messages from XI

    Hello Everyone, I am a novice to XI. I am trying to send a file from Legacy System to JMS via XI. In XI monitoring I am getting Success flag. that the file is getting upladed from legacy to XI. I am using Access JMS pronider using JNDI Protocol. BUT

  • Guest Configuration after provisioning

    Hi forum I'm running Oracle VM 3.1 and I have a business requirement,as follows : As soon as the guest is up (or part of its cloning) I need to setup some configuration parameters. I am using a template as the source of my VM's. The template includes