Shared Memory Object

Hi.
I am creating a new Area in SHMA. when i click on create its is not showing me an option for Binding to be specified.
Please help as this is very urgent.
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 5:36 PM

Also - my test system (which is failing for me) has a few application servers - do shared objects in shared memory work in instances where a few application servers exist?

Similar Messages

  • Question on use of shared memory objects during CIF executions

    We have a CIF that runs in background via program RIMODACT that is invoked from our external job scheduler.  (The schedulere kicks off a job - call it CIFJOB - and the first step of this job executes RIMODACT.)
    During the execution of RIMODACT, we call a BAdI (an implementation of SMOD_APOCF005.)
    In the method of this BAdI, we load some data into a shared memory object each time the BAdI is called. (We create this shared memory object the first time the BAdI is called.)
    After program RIMODACT finishes, the second step of CIFJOB calls a wrapper program that calls two APO BAPI's.  
    Will the shared memory object be available to these BAPIs?
    Reason I'm asking is that the BAPIs execute on the APO app server, but the shared memory object was created in a CIF exit called from a program executing on the ECC server (RIMODACT).
    Edited by: David Halitsky on Feb 20, 2008 3:56 PM

    I know what you're saying, but it doesn't apply in this case (I think.)
    The critical point is that we can tie the batch job to one ECC app server.  In the first step of this job (the one that executes RIMODACT to do the CIF), we build the itab as an attribute of the "root" shared memory object class.
    In the second step of the batch job, we attach to the root class we built in the first step, extract some data from it, and pass these data to a BAPI that we call on the APO server.  (This is what I meant by a "true" RFC - the APO BAPI on the APO server is being called from a program on the ECC server.)
    So the APO BAPI never needs access to the ECC shared memory object - it gets its data passed in from a program on the ECC server that does have access to the shared memory object.
    Restated this way, is the solution correct ???

  • Enhanced protected mode and global named shared memory object

    Good morning.
    I've written a bho that do data exchange with a system service. The service creates named shared memory objects in the Global namespace. Outside appcontainer IE 11 sandboxed everything works fine lowering objects integrity level. Inside the sandboxed environment
    OpenFileMappingW seems to return a valid handle but the calls to MapViewOfFile always gives access denied. What i'm missing? Thank you.
    Service code for security descriptor creation:
    if (InitializeSecurityDescriptor(pSA->lpSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
    if (ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:P(A;;GA;;;WD)(A;;GA;;;AC)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)//
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorDacl(pSecDesc, &fAclPresent, &pDacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorDacl(pSA->lpSecurityDescriptor, TRUE, pDacl, FALSE);
            if (bRetVal ==TRUE && ConvertStringSecurityDescriptorToSecurityDescriptorW(L"S:(ML;;NW;;;LW)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorSacl(pSecDesc, &fAclPresent, &pSacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorSacl(pSA->lpSecurityDescriptor, TRUE, pSacl, FALSE);
                    OutputDebugStringW(L"SACL ok.");
        return bRetval;
    BHO code
    LPMEMORYBUFFER OpenDataChannel(HANDLE *hQueue)
        LPMEMORYBUFFER lp = NULL;
        WCHAR data[512] = { 0 };
        for (int a = 0;; a++)
            if(iestatus==FALSE)StringCchPrintfW(data, 512,L"Global\\UrlfilterServiceIE.%d", a);//NOT in EPM
            else StringCchPrintfW(data, 512, L"%s\\Global\\UrlfilterServiceIE.%d",appcontainernamedobjectpath, a);//in EPM
            *hQueue = OpenFileMappingW(FILE_MAP_ALL_ACCESS, TRUE, data);//FILE_MAP_ALL_ACCESS
            if (*hQueue != NULL)
                //file mappato esistente
                lp = (LPMEMORYBUFFER)MapViewOfFile(*hQueue, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(MEMORYBUFFER));//FILE_MAP_ALL_ACCESS
                if (lp != NULL)

    Ciao Ritchie, thanks for coming here. ;-)
    I call (only) OpenFileMapping and MapViewOfFile inside my code and i get access denied at the first try. As i stated before this happens when IE11 is working inside EPM 32/64bit mode, outside EPM it works as it should. However i decided to take a different
    approach to do IPC, because, you want it or not, the service is up and running as SYSTEM... Still i'm really interested about two points:
    1) can i use global kernel objects in EPM mode?
    2) if one is "yes, you can": what's wrong with my code? The security descriptor? Something else?
    Thanks all.

  • Short Dump TSV_TNEW_PAGE_ALLOC_FAILED while using shared memory objects

    Hi Gurus,
    We are using shared memory objects to stor some data which we will be reading later. I have implemented the interfce IF_SHM_BUILD_INSTANCE in root class and using its method BUILD for automatic area structuring.
    Today our developments moved from dev system to quality system, and while writing the data into the shared memory using the methods ATTACH_FOR_WRITE and DETACH_COMMIT in one report. We started getting the run time error TSV_TNEW_PAGE_ALLOC_FAILED.This is raised when the method DETACH_COMMIT is called to commit the changes in the shared memory.
    Everyhting works fine before DETACH_COMMIT. I know that it is happening since the program ran out of extended memory, but I am not sure why it is happening at DETACH_COMMIT call. If excessive memory is being used in the program, this run time error should have been raised while calling the ATTACH_FOR_WRITE method or while filling the root class attributes. I am not sure why it is happening at DETACH_COMMIT method.
    Many Thanks in advance.
    Thanks,
    Raveesh

    Hi raveesh,
    as Naimesh suggested: Probably system parameter for shared memory area is too small. Compare the system parameters in devel and QA, check what other shared memory areas are used.
    Regarding your question, why it does not fail at ATTACH_FOR_WRITE but then on DETACH_COMMIT:
    Probably ATTACH_FOR_WRITE will set an exclusive write lock on the shared memory data, then write to some kind of 'rollback' memory and DETACH_COMMIT will really put the data into shared memory area and release the lock. The 'rollback' memory is in the LUW's work memory which is much bigger as the usual shared memory size.
    This is my assumption - don't know who can verify or reject it.
    Regards,
    Clemens

  • Shared Memory Short Dump: SHMM ab_ShmResetLocks - anyone?

    hello:)
         I have a problem with shared memory area (SHMM) that dumps.
    I have a tool that uses a shared memory area instance to store data.
    When I run the tool and update the data stored in the instance, a short dump is thrown:
    SYSTEM_SHM_AREA_OBSOLETE with the explanation:
    An attempt was made to access a shared memory area that has already been
      released. Possible reasons for release:
    - explicit release from an ABAP program or from the shared objects
       management transaction
    - implicit release during resource shortages
    The first one does not match, as I DO NOT explicitly release the instance of my area.
    Moreover, ST22 shows me different parts of code every time, so my code is not the cause, or a specific part of code, or data that I shift.
    The second one would probably be the cause.
    But how can I avoid it?
    Moreover, there in SM21(System Log) there is at this time, there is a runtime error, that says
    ab_ShmResetLocks and nothing more:(
    Shared Memory size is sufficient.
    The Shared Memory Area Settings (SHMA) do not time out the read/write access(Lifetime: no entry and Automatic area structuring is set)
    Any help is more than welcome, why i get the short dump!!
    best regards
    simon:)

    Please check the following SAP notes:
    [SAP Note 1105266 WDA: Runtime error SYSTEM_SHM_AREA_OBSOLETE|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_wd/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313035323636%7d]
    Also check the below notes for related details.
    Note 1322182 - Memory consumption of ABAP Shared Objects
    [SAP Note 764187 SYSTEM_SHM_AREA_DETACHED runtime error|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_aba/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d373634313837%7d]
    Please check the size of the shared memory object in the profile parameter abap/shared_objects_size_MB.
    Regards,
    Dipanjan

  • Shared memory used in Web Dynpro ABAP

    Hi Gurus,
    I am using shared memory objects in Web Dynpro ABAP. Everything was working fine until we went live to production. After some research I realized that users are not always able to reach data in shared memory because of different approach of web environment and classic GUI when using more servers. Solution would be to go to database instead of shared memory. However I am still interested if there might be some other way to solve it. Any ideas?

    Marek Veverka wrote:
    Hi Gurus,
    >
    > I am using shared memory objects in Web Dynpro ABAP. Everything was working fine until we went live to production. After some research I realized that users are not always able to reach data in shared memory because of different approach of web environment and classic GUI when using more servers. Solution would be to go to database instead of shared memory. However I am still interested if there might be some other way to solve it. Any ideas?
    To my understanding writing to the database is the safe option. There are no other ways to solve your problem with Shared memory.

  • Shared memory and ABAP

    Dear developers,
    I have some documentation on ABAP SHARED OBJECTS and I wonder how I could define shared memory objects at run time ( so I would need something like an API ) instead of using the SHMA transaction.
    I actually also wonder what would happen if 2 users of the same shared object would call on one of its methods ? Can we have concurrent access ? How does the whole locking thing works ? Is it possible to implement waiting calls/locks ?
    If you have any serious/technical documentation on semaphores/locks in SAP/ABAP I'd also be very interested.
    Sincerely,
    Olivier MATT

    Hi matt,
                This is vijay here.
                                          if you r working on frequntly changed data then you must use this locking technique.
    well jus go to se11 and make a lock object by starting initial......EZ....
    EX: EZENMARA.
    then u can fix the lock as shared or (exclusive,cumulative) or( exclusive, not cumulative)
    you can also fix the lock parameters like  specific fields.then jus save and activate.
    and when you will make a program jus call the function module enqueue_ezenmara for locking and dequeue_ezenmara for unlocking and u can get rest in my program.
    regards
    vijay
    rewards if answer is helpfull.
    TABLES: MARA.
    PARAMETER: MATNR LIKE MARA-MATNR.
    CALL FUNCTION 'ENQUEUE_EZENMARA'
    EXPORTING
       MODE_MARA            = 'S'
       MANDT                = SY-MANDT
      MATNR                =
       X_MATNR              = 'MATNR'
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
    EXCEPTIONS
      FOREIGN_LOCK         = 1
      SYSTEM_FAILURE       = 2
      OTHERS               = 3
    IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    WRITE: 'TABLE IS LOCKED'.
    ELSE.
    SELECT * FROM MARA WHERE MATNR = MATNR.
    WRITE:/ MARA-MATNR,MARA-ERNAM,MARA-MTART.
    ENDSELECT.
    ENDIF.

  • Shared memory area & triggering "client" actions

    Hi all,
    I'm playing around with shared objects, and I would like to accomplish one thing:
    I have a shared memory and a "client" class which uses it.
    When one of the instances of this client class calls a specific method of the shared memory root class, another instance of the client class should receive a message from the root class. This other instance would be running under a different user.
    Since no events are allowed for shared memory area root classes, event handling on the side of the client class is not possible. I even tried to store references to instances of the client class in the shared memory but this would not work either (surprise! surprise! - CX_SHM_EXTERNAL_REFERENCE
    So apart from periodically querying the root class from the client, is there really no way how to initialize the SHMA->client communication from the shared memory area side ?
    thanks,
    Stanislav Mikulas

    If your clients keep the read connection to the shared memory, is there a way to follow this connection back to the clients?
    But even if so, how could you trigger an event at the client?
    Actually, I think there is no solution besides polling the shared memory objects for changes periodically.

  • Internal table in shared memory

    I'm using an internal table in a shared memory area. Depending on the existance of rows i would like to modify these rows or appending new rows.
    So i need read and write access.
    I tried to use attach_for_write( ) but after that i cannot read the table, sy-subrc is always 4.
    So i tried to read the table with attach_for_read( ) first. I can read it, and the result is now sy-subrc = 0.
    But after attaching the table via attach_for_write i'm unable to modify the table, how can i do this?

    myshmhandle = zca_shm_repstat_area=>attach_for_update( ).
    CREATE OBJECT myroot AREA HANDLE myshmhandle.
    read table myshmhandle->root->it_stat with key mandt = sy-mandt report = sy-repid
      ASSIGNING <p>.
    if sy-subrc = 0.
        <p>-freq    = wa_stat-freq + 1.
        <p>-ldate   = sy-datum.
        <p>-ltime   = sy-uzeit.
        <p>-userid  = sy-uname.
        ins = abap_false.
      else.
        wa_stat-mandt   = sy-mandt.
        wa_stat-report  = sy-repid.
        wa_stat-freq    = 1.
        wa_stat-ldate   = sy-datum.
        wa_stat-ltime   = sy-uzeit.
        wa_stat-userid  = sy-uname.
        ins = abap_true.
        append wa_stat to myroot->it_stat.
      endif.
    myshmhandle->set_root( myroot ).
    myshmhandle->detach_commit( ).
    Running the first time, everyting is ok. Running the second time the read will give back sy-subrc = 0 and <p> contains the correct values. after running to the end the table has no rows at all and is inconsitent I cant see what i'm doing wrong.

  • Questions about db_keep_cache_size and Automatic Shared Memory Management

    Hello all,
    I'm coming upon a server that I'm needing to pin a table and some objects in, per the recommendations of an application support call.
    Looking at the database, which is a 5 node RAC cluster (11gr2), I'm looking to see how things are laid out:
    SQL> select name, value, value/1024/1024 value_MB from v$parameter
    2 where name in ('db_cache_size','db_keep_cache_size','db_recycle_cache_size','shared_pool_size','sga_max_size');
    NAME VALUE VALUE_MB
    sga_max_size 1694498816 1616
    shared_pool_size 0 0
    db_cache_size 0 0
    db_keep_cache_size 0 0
    db_recycle_cache_siz 0 0
    e
    Looking at granularity level:
    SQL> select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';
    GRANULE_SIZE/VALUE
    2048
    Then....I looked, and I thought this instance was set up with Auto Shared Mem Mgmt....but I see that sga_target size is not set:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 1616M
    sga_target big integer 0
    So, I'm wondering first of all...would it be a good idea to switch to Automatic Shared Memory Management? If so, is this as simple as altering system set sga_target =...? Again, this is on a RAC system, is there a different way to do this than on a single instance?
    If that isn't the way to go...let me continue with the table size, etc....
    The table I need to pin is:
    SQL> select sum (blocks) from all_tables where table_name = 'MYTABLE' and owner = 'MYOWNER';
    SUM(BLOCKS)
    4858
    And block size is:
    SQL> show parameter block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    So, the space I'll need in memory for pinning this is:
    4858 * 8192 /1024/1024 = 37.95.......which is well below my granularity mark of 2048
    So, would this be as easy as setting db_keep_cache_size = 2048 with an alter system call? Do I need to set db_cache_size first? What do I set that to?
    Thanks in advance for any suggestions and links to info on this.
    cayenne
    Edited by: cayenne on Mar 27, 2013 10:14 AM
    Edited by: cayenne on Mar 27, 2013 10:15 AM

    JohnWatson wrote:
    This is what you need,alter system set db_keep_cache_size=40M;I do not understand the arithmetic you do here,select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';it shows you the number of buffers per granule, which I would not think has any meaning.I'd been looking at some different sites studying this, and what I got from that, was that this granularity gave you the minimum you could set the db_keep_cache_size, that if you tried setting it below this value, it would be bumped up to it, and also, that each bump you gave the keep_cache, would be in increments of the granularity number....?
    Thanks,
    cayenne

  • Multiple Users Accessing Shared Memory

    I created a shared memory enabled class, and it works great for a simple scenario.  But, it's currently not sufficient for my needs.  Here's an example of what I'm trying to accomplish, and the events happen in this order!
    User 1 writes data XXX to shared memory.
    User 2 writes data YYY to shared memory.
    User 1 reads from shared memory and I want him to get his data (XXX).
    User 2 reads from shared memory and I obviously want him to get his YYY.
    I do have a key I can use to differentiate my data but I don't know how to incorporate that in my process. 
    Is the solution to write a table, rather than my current simple structure, to my shared memory?  But if I do this how do I clean off the "used" row after it is read?
    Or is the solution to use some sort of instance of my class and reference the appropriate instance on each read?
    Here's my write:
      data: lo_shared_area type ref to z_cl_rdn_shared_area,
            lo_root        type ref to z_cl_rdn_memory.
    ****get a pointer to the Shared Area
      lo_shared_area = z_cl_rdn_shared_area=>attach_for_write( ).
    ****Create an instance of our root
      create object lo_root area handle lo_shared_area.
    ****Set the Initial value for our message
      lo_root->set_ptwy( ps_ptwy ).
    ****Set the root back into the Area
      lo_shared_area->set_root(  lo_root ).
    ****Commit and detatch
      lo_shared_area->detach_commit( ).
    Here's my read:
      data: lo_shared_area type ref to z_cl_rdn_shared_area,
            lo_root        type ref to z_cl_rdn_memory.
      lo_shared_area = z_cl_rdn_shared_area=>attach_for_read( ).
      lo_root        = lo_shared_area->root.
      try.
          ls_ptwy = lo_root->get_ptwy( ).
        catch cx_root.
          clear ls_ptwy.
      endtry.
      lo_shared_area->detach( ).
    Thanks,
    Mike

    Hello,
    Clearing shared memory will crash SAP   ie cleanipc.
    Need to increase memory parameters
    Check notes...
    146289    Parameter Recommendations for 64-Bit SAP Kernel   
    146528 "Configuration of R/3 on hosts with much RAM".                     
    regards,
    John Feely

  • Global shared memory

    hi all,
    im need to maintain some data insideEJB container which will be frequently accesed by almost all of my application components. Like Global Shared Memory (GSM) in C++, is there any way of maintaining this data im memory since the application is performance critical .
    Most of my components are session and message driver beans,. Any component should access , the above mentioned common data and should be done without performance (speed) drawback .
    Please help me in this matter , as this is of utmost importance in the application design .
    Also suggest me some web links on the topic .

    If you are going to keep in temporary basis for one transaction, then you can keep the data in Java Bean object. You can put your data in a collection object and set it on the JavaBean object. Make sure the instance of the Java Bean object should be sent to each EJB so that they all will be referring to the same bean instance. Otherwise you will not get the data.
    If you want keep it for long, let's say for the session, then put the data in Stateful session bean. Make this session bean local so that other EJBs can access data locally rather making remote calls. You may use SessionFacade pattern to control the transaction properly.
    Hope this answers your question.
    Thanks

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

  • Shared memory usage

    hi group,
    I have a scenario that i have to use shared memory concept in routines of BI...here i have to write a abap code and check on a file. and i want to take that file from the shared memory concept. and then check. i also dont want to fetch th data from table but want to fetch this data also from some file using shared memory... i am totally new to shared memory concept and objects used there...can anyone guide me the step by step procedure for this...also if some help file available then that will be a great help...
    thanks in advance..

    A program which may help you is "ipcs". Specifically, "ipcs -am" run as root
    will give you information on all of the shared memory segments in use. The
    size of the segment is part of the data. This should give you a picture of
    what is going on in the system.
    Alan
    Sun Developer Technical Support
    http://www.sun.com/developers/support

  • Shared memory problem - memory leak?

    I've got the following error after calling a stored procedure about 26000 times. Does this mean Oracle 8.1.6 Thin Driver has memory leak in CallableStatement? Thanks.
    ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN checktstn(:1, :2); END;","PL/SQL MPCODE","BAMIMA: Bam Buffer")

    Me Too!
    java.sql.SQLException: ORA-04031: unable to allocate 744 bytes of shared memory ("unknown object","sga heap","library cache")
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:595)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1600)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1758)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:410)
    Does this error pertain to memory leaks?

Maybe you are looking for