<?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: Cache Class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016422#M1497437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are describing what is known in ABAP as a "Shared Object".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start with the [Online Documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/14/dafc3e9d3b6927e10000000a114084/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also several blogs and wiki entries that cover shared objects as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jun 2010 01:49:05 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2010-06-12T01:49:05Z</dc:date>
    <item>
      <title>Cache Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016421#M1497436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to implement a cache class to be used for BSP pages.&lt;/P&gt;&lt;P&gt;I want to cache a table and enhance and sort it in memory for fast access .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Java i would use a static class. But that doesn't exist in ABAP so I'm looking for an alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When called the first time it should fetch the data and order it.&lt;/P&gt;&lt;P&gt;When called later it should fetch the data from an internal table in the class without database access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time i try the class is empty when i call it the second time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows how to solve this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jun 2010 22:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016421#M1497436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-11T22:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cache Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016422#M1497437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are describing what is known in ABAP as a "Shared Object".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start with the [Online Documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/14/dafc3e9d3b6927e10000000a114084/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also several blogs and wiki entries that cover shared objects as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 01:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016422#M1497437</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2010-06-12T01:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cache Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016423#M1497438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a public static attribute in the class.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 03:24:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016423#M1497438</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2010-06-12T03:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cache Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016424#M1497439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to implement a cache class to be used for BSP pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Though I'm pretty sure that you looked at it and found it not applicable I'd first look at the [caching BSPs|http://help.sap.com/saphelp_NW04/helpdata/en/d7/446f3b19d99b0de10000000a11405a/frameset.htm] ([ICM server cache|http://help.sap.com/saphelp_NW04/helpdata/en/72/c2153aab4a0c0ee10000000a114084/frameset.htm]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time i try the class is empty when i call it the second time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you look at the [ABAP memory organization|http://help.sap.com/abapdocu_70/en/ABENORGANIZATION_OF_MODULES.htm] this will become clear:&lt;/P&gt;&lt;P&gt;&amp;lt;ul style="list-style:circle!important"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;Each user who is logging into SAP gets his own &lt;EM&gt;user session&lt;/EM&gt; (stores for example the parameter ID's).&amp;lt;/li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;A &lt;EM&gt;main session&lt;/EM&gt; (external mode) is opened for each &lt;EM&gt;user session&lt;/EM&gt; (in case of SAPgui usage this corresponds to one window).&amp;lt;/li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;Calls of ABAP programs (e.g. report or transaction) create a new &lt;EM&gt;internal session&lt;/EM&gt; which holds the changeable program data (this is also where your static classes are).&amp;lt;/li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/ul&amp;gt;&lt;/P&gt;&lt;P&gt;In your case I suspect you most likely deal with different main sessions and on top of that even with different user sessions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you want to share data across &lt;EM&gt;main sessions&lt;/EM&gt; I'd not start with &lt;EM&gt;shared objects&lt;/EM&gt;. As the name implies, they are objects and they offer quite a bit of functionality (but also more complexity and implementation effort). Note that &lt;EM&gt;shared objects&lt;/EM&gt; offer no automatic displacement, but they offer the great benefit that they are accessed by reference (so no copying overhead).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For sake of simplicity I'd start looking at ABAP statement [EXPORT .. TO SHARED BUFFER|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#!ABAP_ALTERNATIVE_6@6@] (along with the corresponding [IMPORT|http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm#!ABAP_ALTERNATIVE_6@6@]). Trivial to use and qualifies as a cache due to automatic displacement (if you don't want that you could also consider [EXPORT .. TO SHARED MEMORY|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#!ABAP_ALTERNATIVE_5@5@]). Disadvantage of the EXPORT/IMPORT is that any data has to be copied into the user session. So if your table is huge, &lt;EM&gt;shared objects&lt;/EM&gt; would save you some memory space, but this comes with some implementation overhead...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 08:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016424#M1497439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-12T08:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cache Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016425#M1497440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took a look at the EXPORT .. TO SHARED BUFFER. &lt;/P&gt;&lt;P&gt;That seemed to do the trick. &lt;/P&gt;&lt;P&gt;But in my static method i have 2 import my object again each time.&lt;/P&gt;&lt;P&gt;But it takes a lot qiucker that to recaculate them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 21:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cache-class/m-p/7016425#M1497440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-12T21:02:42Z</dc:date>
    </item>
  </channel>
</rss>

