<?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 attach_for_write is unknown in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013713#M411292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to write ABAP code to access Shared Memory but there is an error message&lt;/P&gt;&lt;P&gt;when compiling. &lt;/P&gt;&lt;P&gt;attach_for_write is unknown. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on note 857904-Upgrade from Release 6.40 to 7.0. &lt;/P&gt;&lt;P&gt;I try to re-generate my class with program RSGENSHO but it still doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise how I should edit/adjust my code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2007 12:15:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-14T12:15:16Z</dc:date>
    <item>
      <title>attach_for_write is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013713#M411292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to write ABAP code to access Shared Memory but there is an error message&lt;/P&gt;&lt;P&gt;when compiling. &lt;/P&gt;&lt;P&gt;attach_for_write is unknown. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on note 857904-Upgrade from Release 6.40 to 7.0. &lt;/P&gt;&lt;P&gt;I try to re-generate my class with program RSGENSHO but it still doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise how I should edit/adjust my code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 12:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013713#M411292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T12:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: attach_for_write is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013714#M411293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Erika,&lt;/P&gt;&lt;P&gt;         The concept of shared memory is a little different....There are two classes which are involved viz &lt;/P&gt;&lt;P&gt;   1)  your shared memory class that is generated by the wizard&lt;/P&gt;&lt;P&gt;   2) The root class which is required for you access anything the shared memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to first identify the root class.... and then use that to do any operations to the shared area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching a very simple program for the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSHARED_MEM2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : area type REF TO zcl_shared_area,&lt;/P&gt;&lt;P&gt;       root TYPE REF TO zcl_shared_root.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get a Pointer to the Shared Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;area = zcl_shared_area=&amp;gt;attach_for_write( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create an instance of our Root&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT root AREA HANDLE area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set initial value for our Message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;root-&amp;gt;set_message( 'This is the initialization of the Shared Memory' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the root back into the Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;area-&amp;gt;set_root( root ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Commit and Detach&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;area-&amp;gt;detach_commit( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful for you......Please reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013714#M411293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: attach_for_write is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013715#M411294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mijesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried so already but it doesn't work. &lt;/P&gt;&lt;P&gt;I understand that the problem is due to different version of Web AS. &lt;/P&gt;&lt;P&gt;Are you on version 6.40 or 7.00?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to the note, it seems that we need modification. &lt;/P&gt;&lt;P&gt;Currently, my code look like this. And I'm getting error that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field "ATTACH_FOR_WRITE" is unknown, but there is a field with the similar name "ATTACH_MODE_WAIT".&lt;/P&gt;&lt;P&gt;===================================&lt;/P&gt;&lt;P&gt;REPORT  ZWRITE_AREA_XX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  hdl  type ref to zcl_shm_area_xx,&lt;/P&gt;&lt;P&gt;  root type ref to zcl_shm_area_root_xx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hdl = zcl_shm_area_xx=&amp;gt;attach_for_write().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT root AREA HANDLE hdl.&lt;/P&gt;&lt;P&gt;root-&amp;gt;string_attr = 'Hello!!'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hdl-&amp;gt;set_root( root ).&lt;/P&gt;&lt;P&gt;hdl-&amp;gt;detach_commit().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===========================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 09:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/attach-for-write-is-unknown/m-p/2013715#M411294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T09:58:02Z</dc:date>
    </item>
  </channel>
</rss>

