<?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 Error in shared memory access after recompiling unchanged source in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152468#M1193822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i made this report for storing values in the shared memory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  zca_sw_shm_write4 line-SIZE 255.

DATA:
  myshmhandle            TYPE REF TO zca_shm_repstat_area,
  wa_stat                TYPE zrepstat,
  repid                  TYPE progname,
  str                    TYPE string,
  cxr                    TYPE REF TO cx_root.

FIELD-SYMBOLS:
  &amp;lt;p&amp;gt;                    TYPE zrepstat.

repid = 'REPORT'.

TRY.
    myshmhandle = zca_shm_repstat_area=&amp;gt;attach_for_update( ).

    READ TABLE myshmhandle-&amp;gt;root-&amp;gt;it_stat WITH KEY mandt = sy-mandt report = repid
      ASSIGNING &amp;lt;p&amp;gt;.

    IF sy-subrc = 0.
      &amp;lt;p&amp;gt;-freq    = &amp;lt;p&amp;gt;-freq + 1.
      &amp;lt;p&amp;gt;-ldate   = sy-datum.
      &amp;lt;p&amp;gt;-ltime   = sy-uzeit.
      &amp;lt;p&amp;gt;-userid  = sy-uname.
    ELSE.
      wa_stat-mandt   = sy-mandt.
      wa_stat-report  = repid.
      wa_stat-freq    = 1.
      wa_stat-ldate   = sy-datum.
      wa_stat-ltime   = sy-uzeit.
      wa_stat-userid  = sy-uname.

      APPEND wa_stat TO myshmhandle-&amp;gt;root-&amp;gt;it_stat.
    ENDIF.

    myshmhandle-&amp;gt;detach_commit( ).

  CATCH cx_shm_error INTO cxr.
    str = cxr-&amp;gt;get_text( ).
    LOG-POINT ID zrepstat SUBKEY 'SHM' FIELDS str.
    write:/ str.

ENDTRY.

WRITE:/ 'Done'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the first time, the instance will not be up, but its restarting  automatically as desired. I missed the entry for that, but thats ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the report over and over again works fine, and the table is updated well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i recompile the report without any changes(!) the instance is invalidet with the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
The definition of a type of (data) object in the instance '$DEFAULT_INSTANCE$' 
in client '' for area 'ZCA_SHM_REPSTAT_AREA' does not match the type definition 
used in the attached program
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do i get this error message by reactiving the report without any changes and how can i avoid this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2009 08:38:20 GMT</pubDate>
    <dc:creator>rainer_hbenthal</dc:creator>
    <dc:date>2009-02-10T08:38:20Z</dc:date>
    <item>
      <title>Error in shared memory access after recompiling unchanged source</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152468#M1193822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i made this report for storing values in the shared memory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  zca_sw_shm_write4 line-SIZE 255.

DATA:
  myshmhandle            TYPE REF TO zca_shm_repstat_area,
  wa_stat                TYPE zrepstat,
  repid                  TYPE progname,
  str                    TYPE string,
  cxr                    TYPE REF TO cx_root.

FIELD-SYMBOLS:
  &amp;lt;p&amp;gt;                    TYPE zrepstat.

repid = 'REPORT'.

TRY.
    myshmhandle = zca_shm_repstat_area=&amp;gt;attach_for_update( ).

    READ TABLE myshmhandle-&amp;gt;root-&amp;gt;it_stat WITH KEY mandt = sy-mandt report = repid
      ASSIGNING &amp;lt;p&amp;gt;.

    IF sy-subrc = 0.
      &amp;lt;p&amp;gt;-freq    = &amp;lt;p&amp;gt;-freq + 1.
      &amp;lt;p&amp;gt;-ldate   = sy-datum.
      &amp;lt;p&amp;gt;-ltime   = sy-uzeit.
      &amp;lt;p&amp;gt;-userid  = sy-uname.
    ELSE.
      wa_stat-mandt   = sy-mandt.
      wa_stat-report  = repid.
      wa_stat-freq    = 1.
      wa_stat-ldate   = sy-datum.
      wa_stat-ltime   = sy-uzeit.
      wa_stat-userid  = sy-uname.

      APPEND wa_stat TO myshmhandle-&amp;gt;root-&amp;gt;it_stat.
    ENDIF.

    myshmhandle-&amp;gt;detach_commit( ).

  CATCH cx_shm_error INTO cxr.
    str = cxr-&amp;gt;get_text( ).
    LOG-POINT ID zrepstat SUBKEY 'SHM' FIELDS str.
    write:/ str.

ENDTRY.

WRITE:/ 'Done'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the first time, the instance will not be up, but its restarting  automatically as desired. I missed the entry for that, but thats ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the report over and over again works fine, and the table is updated well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i recompile the report without any changes(!) the instance is invalidet with the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
The definition of a type of (data) object in the instance '$DEFAULT_INSTANCE$' 
in client '' for area 'ZCA_SHM_REPSTAT_AREA' does not match the type definition 
used in the attached program
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do i get this error message by reactiving the report without any changes and how can i avoid this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 08:38:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152468#M1193822</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-02-10T08:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error in shared memory access after recompiling unchanged source</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152469#M1193823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    myshmhandle = zca_shm_repstat_area=&amp;gt;attach_for_update( ).
    APPEND wa_stat TO myshmhandle-&amp;gt;root-&amp;gt;it_stat.
    myshmhandle-&amp;gt;detach_commit( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will work fine until a new activation wilol take place. I really dont understand why a new activation makes the area invalid. Anybod an idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 11:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152469#M1193823</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-02-10T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error in shared memory access after recompiling unchanged source</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152470#M1193824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does no one has an idea about this strange behaviour?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 06:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152470#M1193824</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-02-11T06:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in shared memory access after recompiling unchanged source</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152471#M1193825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 09:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152471#M1193825</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-02-27T09:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error in shared memory access after recompiling unchanged source</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152472#M1193826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I believe that I have found the reason that this is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you go to transaction SHMA, select monitor, then find your SHMA, select it, and then go to the Areas menu and select delete from all servers. Then, re-run your program and you should no longer see this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 20:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-shared-memory-access-after-recompiling-unchanged-source/m-p/5152472#M1193826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-24T20:25:06Z</dc:date>
    </item>
  </channel>
</rss>

