<?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: Dynamic operations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183865#M126483</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hehehe...Of course it has that entry...What i was trying to say is that it doesn't compile on MiniSap....It got an error telling me something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
After (STRING_1) you should use = or , or =,....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i just can run it...But on SAP 5 i have succefully update the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Feb 2006 13:52:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-22T13:52:14Z</dc:date>
    <item>
      <title>Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183863#M126481</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 just this sample code to make dynamic updates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  Z_DUMMY_ATG NO STANDARD PAGE HEADING.

DATA: STRING_1 TYPE STRING,
      STRING_2 TYPE STRING.

STRING_1 = 'NAME = ''Alvaro'' LAST_NAME = ''Tejada'''.
STRING_2 = 'SEQUENCE = 1'.

UPDATE ZDUMMY_TABLE
SET (STRING_1)
WHERE (STRING_2).

IF SY-SUBRC EQ 0.
WRITE:/ 'Ok!'.
ELSE.
WRITE:/ 'Error!'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine on my SAP 5....But in my MiniSap 4.6D it doesn't work....Any way i can achieve this? I want to make it a reusable as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 13:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183863#M126481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T13:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183864#M126482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls check this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table ZDUMMY_TABLE has an entry with sequence=1 in the Minisap system ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Renjith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 13:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183864#M126482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T13:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183865#M126483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hehehe...Of course it has that entry...What i was trying to say is that it doesn't compile on MiniSap....It got an error telling me something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
After (STRING_1) you should use = or , or =,....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i just can run it...But on SAP 5 i have succefully update the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 13:52:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183865#M126483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T13:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183866#M126484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alvaro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This what i found on that subject:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 2 &lt;/P&gt;&lt;P&gt;... (dbtab_syntax) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect: &lt;/P&gt;&lt;P&gt;Instead of static specification, a bracketed data object dbtab_syntax can be specified, which must contain the name of the database table or the view when the statement is executed. A character-type data object can be specified for the data object dbtab_syntax. The syntax in dbtab_syntax, as in the AAP Editor, is not case-sensitive. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before release 6.10, it was only possible to specify a flat character-type data object for dbtab_syntax, which had to contain the name of the database table or the view in capital letters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can do it as it is explained above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check abap doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 14:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183866#M126484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T14:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183867#M126485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please give me some example? My english it not actually pretty good. And also...The help on that topic it's not very usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Alvaro Tejada Galindo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 14:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183867#M126485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T14:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183868#M126486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alvaro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first think to do is to find out what ABAP´S version you are using, because if it is before release 6.10 you will not be able to do dynamic select, update...&lt;/P&gt;&lt;P&gt;On your code it seems to be correct, but as I say you can do it if you have an old ABAP release. But you can try with the following example:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Lo primero que hay que hacer es encontrar qué versión de ABAP esta usando, ya que antes la version 6.10 no se pueden hacer updates, selects...dinámicos, si esta intentándolo hacer en una versión anterior no podrá hacerlo, y al parecer según veo su código esa es la manera correcta de hacerlo dinámicamente pero tiene que ver la versión, sin embargo el siguiente es un ejemplo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: table    TYPE c LENGTH 30, &lt;/P&gt;&lt;P&gt;            column   TYPE c LENGTH 30, &lt;/P&gt;&lt;P&gt;            old_curr TYPE sycurr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: set_expr  TYPE string, &lt;/P&gt;&lt;P&gt;      condition TYPE string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE column ` = 'EUR'` &lt;/P&gt;&lt;P&gt;            INTO set_expr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE column ` = old_curr` &lt;/P&gt;&lt;P&gt;            INTO condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY. &lt;/P&gt;&lt;P&gt;    UPDATE (table) &lt;/P&gt;&lt;P&gt;    SET    (set_expr) &lt;/P&gt;&lt;P&gt;    WHERE  (condition). &lt;/P&gt;&lt;P&gt;  CATCH cx_sy_dynamic_osql_error. &lt;/P&gt;&lt;P&gt;    MESSAGE `Error in update!` TYPE 'I'. &lt;/P&gt;&lt;P&gt;ENDTRY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!!!Dont forget to reward&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 14:31:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183868#M126486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183869#M126487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now i get...hehehe...Sometimes i'm a little bit silly. Anyway, you right...it doesn't work on my MiniSap 4.6D...and it may never work...That's a shame...Anyway...it must continue working on my SAP 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx a lot Gabriel, full points awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 14:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183869#M126487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T14:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183870#M126488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alvaro,&lt;/P&gt;&lt;P&gt;according to "ABAP Reference" by Horst Keller, dynamic expressions in the UPDATE statement are available for Release 610 and higher, but not in your 46D system.&lt;/P&gt;&lt;P&gt;On a 46D system you have to write your program like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_DUMMY_ATG NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;UPDATE ZDUMMY_TABLE&lt;/P&gt;&lt;P&gt;SET NAME = 'Alvaro' LAST_NAME = 'Tejada'&lt;/P&gt;&lt;P&gt;WHERE SEQUENCE = 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Ok!'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Error!'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 15:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-operations/m-p/1183870#M126488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-22T15:19:46Z</dc:date>
    </item>
  </channel>
</rss>

