<?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>Question Re: UPDATE temporary table in AMDP Class Method in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511508#M98110</link>
    <description>&lt;P&gt;Thanks Florian for the effort but AMDP has other limitations, and in documents AMDP is overlooked all the time. &lt;/P&gt;
  &lt;P&gt;Please see log in the screenshot, local table creation is not supported.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/80077-localtable.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2017 06:49:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-10-27T06:49:55Z</dc:date>
    <item>
      <title>UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaq-p/511506</link>
      <description>&lt;P&gt;Dear experts,&lt;/P&gt;
  &lt;P&gt;I need to change only one field in a dataset and upsert it to a physical db table with AMDP. This physical table has too many columns which I do not want to specify all fields, and also developers can add some fields in future and when a new field added I do not want to edit code again and again. &lt;/P&gt;
  &lt;P&gt;Please see ZAG_SIM is a physical table and lt_result temp table type of ZAG_SIM should read base version and copy this data changing version column entries. &lt;/P&gt;
  &lt;P&gt;Please advice why UPDATE command is not accepted in eclipse editor? &lt;/P&gt;
  &lt;P&gt;Thanks in advance,&lt;/P&gt;
  &lt;P&gt;Ergin Ozturk&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/81043-update.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 16:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaq-p/511506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-25T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511507#M98109</link>
      <description>&lt;P&gt;Updates on a table variable are not supported by the keyword UPDATE. Since HANA 2.0 SPS01 you can do updates with another syntax. Details can be found &lt;A href="https://help.sap.com/viewer/de2486ee947e43e684d39702027f8a94/2.0.02/en-US/36f718be73e745ceae0530aa80850ce3.html" target="_blank"&gt;here&lt;/A&gt;. But personally I haven't tried it yet within an AMDP (maybe there are further restrictions).&lt;/P&gt;
  &lt;P&gt;If you are not on a HANA revision level which supports that, you can use an &lt;A href="https://help.sap.com/viewer/de2486ee947e43e684d39702027f8a94/2.0.02/en-US/a94ea1e47d734191be3df6c2ce5f32d6.html" target="_blank"&gt;index based cell access&lt;/A&gt; to update your column (of course a loop has to be done over all entries and each data record has to be accessed by its index).&lt;/P&gt;
  &lt;P&gt;Another option would be to use a local temporary row table like that:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;do
begin
  create local temporary row table #test like "ZAG_SIM";
  insert into #test select * from "ZAG_SIM";
  update #test set "VERSION" = :lv_temp;
  ...
  drop table #test;
end;
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;You can try both options if you like and share your results on the performance.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;BR /&gt;Florian&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 15:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511507#M98109</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2017-10-26T15:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511508#M98110</link>
      <description>&lt;P&gt;Thanks Florian for the effort but AMDP has other limitations, and in documents AMDP is overlooked all the time. &lt;/P&gt;
  &lt;P&gt;Please see log in the screenshot, local table creation is not supported.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/80077-localtable.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 06:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511508#M98110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-27T06:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511509#M98111</link>
      <description>&lt;P&gt;Too bad. Have you tried the index-based cell access too?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 07:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511509#M98111</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2017-10-27T07:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511510#M98112</link>
      <description>&lt;P&gt;Thank you Florian, &lt;/P&gt;
  &lt;P&gt;FOR loop with index access did the job. &lt;/P&gt;
  &lt;P&gt;FOR i IN 1 .. :lv_counter DO &lt;/P&gt;
  &lt;P&gt; lt_result.VERSION[:i] = :lv_temp ; &lt;/P&gt;
  &lt;P&gt;END FOR; &lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511510#M98112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-30T14:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE temporary table in AMDP Class Method</title>
      <link>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511511#M98113</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;erginozturk&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;It might be an late answer  �� ,&lt;/P&gt;&lt;P&gt;But this may help to other.&lt;/P&gt;&lt;P&gt;The easiest way for this is by using select itself.&lt;/P&gt;&lt;P&gt;we can do it as below for the above code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lt_result = select feild1 , feild2, :lv_temp as version where version = :lv_base and mandt = session_context( 'CLIENT' );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;We don't have to loop which may have performance to it.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 15:12:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-temporary-table-in-amdp-class-method/qaa-p/511511#M98113</guid>
      <dc:creator>rahulpippalla</dc:creator>
      <dc:date>2021-04-07T15:12:25Z</dc:date>
    </item>
  </channel>
</rss>

