<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SHARED MEMORY AREA - SHMM and data on application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295347#M1989779</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;ravichandra.kss&lt;/SPAN&gt;, were you able to find a solution to your problem or did new issues come up?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Sep 2020 01:31:03 GMT</pubDate>
    <dc:creator>michael_piesche</dc:creator>
    <dc:date>2020-09-08T01:31:03Z</dc:date>
    <item>
      <title>SHARED MEMORY AREA - SHMM and data on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295343#M1989775</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt; I have created Shared memory area and ROOT class and stored the data on one of the application servers.&lt;/P&gt;
  &lt;P&gt;1) in our landscape, i have noticed two application servers.&lt;/P&gt;
  &lt;P&gt;2) in the SHMM transaction , i can see the instances created .&lt;/P&gt;
  &lt;P&gt;3) I am able to access these instances through ABAP program ( by creating handle through attach_for_read( ) )&lt;/P&gt;
  &lt;P&gt;Things are fine till this point.&lt;/P&gt;
  &lt;P&gt;Problem:&lt;/P&gt;
  &lt;P&gt;From the UI, the same program is called but i am unable to get the instances (data) stored in the shared memory on the application server.&lt;/P&gt;
  &lt;P&gt;I understand that the shared memory is specific to application server .&lt;/P&gt;
  &lt;P&gt;i believe that the abap backend is getting executed on another app server where the shared memory data does not exist .&lt;/P&gt;
  &lt;P&gt;1) is there any configuration so share the shared memory across all app servers ?&lt;/P&gt;
  &lt;P&gt;how can i overcome this problem?&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Ravi.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 20:13:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295343#M1989775</guid>
      <dc:creator>former_member690689</dc:creator>
      <dc:date>2020-07-12T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: SHARED MEMORY AREA - SHMM and data on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295344#M1989776</link>
      <description>&lt;P&gt;Apparently you cannot share the memory between AS:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Area Binding&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DL&gt;
&lt;DD&gt;&lt;EM&gt;                                                                                                                                                                                                                                                       The context specified for this property defines the visibility and lifetime of the area instance version of the instance. Possible contexts are:              &lt;/EM&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Application server &lt;BR /&gt;&lt;BR /&gt;Area instance versions exist until the application server is shut down.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;User session &lt;BR /&gt;&lt;BR /&gt;Area instances exist until the last ABAP session of the current user session ends. For area binding, every user logon to an AS ABAP counts individually. This also applies in particular when users log on using external interfaces such as RFC or ICF.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Top level transaction &lt;BR /&gt;&lt;BR /&gt;The top level transaction is the first program in a call sequence. These area instances exist for as long as the ABAP memory assigned to a call sequence is loaded, in other words for as long as the internal session of the top level transaction is loaded.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 13 Jul 2020 05:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295344#M1989776</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-07-13T05:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: SHARED MEMORY AREA - SHMM and data on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295345#M1989777</link>
      <description>&lt;P&gt;In what context, for what purpose would you like to use shared memory and overcome the problem of having two instances?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 22:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295345#M1989777</guid>
      <dc:creator>gasparerdelyi</dc:creator>
      <dc:date>2020-07-13T22:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: SHARED MEMORY AREA - SHMM and data on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295346#M1989778</link>
      <description>&lt;P&gt;Your main problem is, that if two instances of your programm are run at the same time, but both being run on different application servers, they can not access the others data in the 'shared memory', as the shared memory is only application server specific.&lt;/P&gt;&lt;P&gt;Please have a look at the discussion from this question:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://answers.sap.com/questions/13040192/accessing-an-internal-table-across-multiple-parall.html"&gt;https://answers.sap.com/questions/13040192/accessing-an-internal-table-across-multiple-parall.html&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Basically, you have three options to rewrite your program:&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Use ABAP Channels&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenabap_channels.htm"&gt;ABAP Channels&lt;/A&gt; are event-based communication using messages between application servers (and with the Internet). The AMC part is the one you would need to implement:&lt;BR /&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenamc.htm"&gt;ABAP messaging channels (AMC)&lt;/A&gt; are a method of communication between ABAP programs using messages. Using a publish-and-subscribe mechanism, messages can be exchanged between any AS ABAP programs, including communication between different user sessions and application services&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Use Shared Objects&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenabap_shared_objects.htm"&gt;Shared objects are objects in areas of shared memory.&lt;/A&gt; Shared Objects are Application Server specific.&lt;BR /&gt;a) create a Shared Object on one specific Application Server A&lt;BR /&gt;b) create a Destination for Application Server  A&lt;BR /&gt;c) create an FM that 'exposes' the Shared Object&lt;BR /&gt;If your program is running on Application Server  A, you can access the Shared Object&lt;BR /&gt;If your program is running on a different Application Server, you access it with the RFC to Application Server A&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Rewrite your coding&lt;/STRONG&gt;&lt;BR /&gt;You will have to put in some work to set up 1. and 2. and also brain power to figure out how to handle concurrent read/write accesses to the Shared Object (same with a DB)&lt;BR /&gt;Rewriting your coding might be the best option, if it is feasible.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 14 Jul 2020 06:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295346#M1989778</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-07-14T06:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: SHARED MEMORY AREA - SHMM and data on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295347#M1989779</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;ravichandra.kss&lt;/SPAN&gt;, were you able to find a solution to your problem or did new issues come up?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 01:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shared-memory-area-shmm-and-data-on-application-server/m-p/12295347#M1989779</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-09-08T01:31:03Z</dc:date>
    </item>
  </channel>
</rss>

