<?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: update statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436626#M208102</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;Check these 2 things,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Are you giving the values (inveno = '227')&lt;/P&gt;&lt;P&gt;as youe see them in the DB table.&lt;/P&gt;&lt;P&gt;If not use &amp;lt;b&amp;gt;CONVERSION_EXIT_ALPHA_INPUT&amp;lt;/b&amp;gt; to convert it to the input format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;(Next 2 form Documentation)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change a column of the type STRING, the primary key in the WHERE condition must be fully specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)Do not use the &amp;lt;b&amp;gt;colon and commas to separate chained statements&amp;lt;/b&amp;gt;, since you could &amp;lt;b&amp;gt;change an entire database table without wanting&amp;lt;/b&amp;gt; to, if you use them wrongly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* FALSCH * WRONG * FALSCH * WRONG * FALSCH * WRONG * 
* UPDATE SCUSTOM SET:  DISCOUNT  = '003', 
*                      TELEPHONE = '0621/444444' 
*                WHERE ID        = '00017777'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fragment is &amp;lt;b&amp;gt;not a single statement&amp;lt;/b&amp;gt; that update the discount and telephone number for the customer with the customer number '00017777'. Rather, it &amp;lt;b&amp;gt;represents two statements&amp;lt;/b&amp;gt; - the &amp;lt;b&amp;gt;first&amp;lt;/b&amp;gt; changes the &amp;lt;b&amp;gt;discount for all customers&amp;lt;/b&amp;gt;, while the &amp;lt;b&amp;gt;second changes the telephone number of the customer with the customer number '00017777'&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So make the following changes and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

In case of &amp;lt;b&amp;gt;Point 1&amp;lt;/b&amp;gt;
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input  = inveno
  IMPORTING
    output = inveno.


UPDATE ztale_head SET   : send = 'X'
                          ttime = sy-uzeit
                          ddate = sy-datum
               WHERE inveno = &amp;lt;converted value&amp;gt;.


&amp;lt;b&amp;gt;Else do it in this way&amp;lt;/b&amp;gt;


UPDATE ztale_head SET   : send = 'X'
                          ttime = sy-uzeit
                          ddate = sy-datum
               WHERE inveno = '227'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Jul 2006 13:29:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-24T13:29:40Z</dc:date>
    <item>
      <title>update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436622#M208098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;update ztale_head set : send = 'X',&lt;/P&gt;&lt;P&gt;         ttime = sy-uzeit,&lt;/P&gt;&lt;P&gt;         ddate = sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         where inveno = '227'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here only record with 227 invoice no shud be updated in ztable but whole ztable is updated with send = 'X' and date and tiem field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 11:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436622#M208098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T11:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436623#M208099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe a problem with the conversion exit.&lt;/P&gt;&lt;P&gt;Try using the conversion exit on the inveno and then pass it in the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Aarthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 11:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436623#M208099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T11:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436624#M208100</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;DO like this..&lt;/P&gt;&lt;P&gt;update ztale_head set : send = 'X',&lt;/P&gt;&lt;P&gt;ttime = sy-uzeit,&lt;/P&gt;&lt;P&gt;ddate = sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where inveno = '0000000227'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 11:53:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436624#M208100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T11:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436625#M208101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharma,&lt;/P&gt;&lt;P&gt;       Check the Syntax,&lt;/P&gt;&lt;P&gt;UPDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modifies lines in database tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE &amp;lt;dbtab&amp;gt; SET  &amp;lt;si&amp;gt; = &amp;lt;f&amp;gt; &lt;/P&gt;&lt;P&gt;                   |&amp;lt;si&amp;gt; = &amp;lt;s i&amp;gt; + &amp;lt;f&amp;gt; &lt;/P&gt;&lt;P&gt;                   |&amp;lt;si&amp;gt; = &amp;lt;s i&amp;gt; - &amp;lt;f&amp;gt; [WHERE &amp;lt;cond&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sets the value in &amp;lt;si&amp;gt; to &amp;lt;f&amp;gt;, increases it by &amp;lt;f&amp;gt;, or decreases it by &amp;lt;f&amp;gt; for all selected lines. The WHERE addition determines the lines that are updated. If you omit the WHERE addition, all lines are updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 11:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436625#M208101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T11:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436626#M208102</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;Check these 2 things,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Are you giving the values (inveno = '227')&lt;/P&gt;&lt;P&gt;as youe see them in the DB table.&lt;/P&gt;&lt;P&gt;If not use &amp;lt;b&amp;gt;CONVERSION_EXIT_ALPHA_INPUT&amp;lt;/b&amp;gt; to convert it to the input format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;(Next 2 form Documentation)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change a column of the type STRING, the primary key in the WHERE condition must be fully specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)Do not use the &amp;lt;b&amp;gt;colon and commas to separate chained statements&amp;lt;/b&amp;gt;, since you could &amp;lt;b&amp;gt;change an entire database table without wanting&amp;lt;/b&amp;gt; to, if you use them wrongly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* FALSCH * WRONG * FALSCH * WRONG * FALSCH * WRONG * 
* UPDATE SCUSTOM SET:  DISCOUNT  = '003', 
*                      TELEPHONE = '0621/444444' 
*                WHERE ID        = '00017777'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fragment is &amp;lt;b&amp;gt;not a single statement&amp;lt;/b&amp;gt; that update the discount and telephone number for the customer with the customer number '00017777'. Rather, it &amp;lt;b&amp;gt;represents two statements&amp;lt;/b&amp;gt; - the &amp;lt;b&amp;gt;first&amp;lt;/b&amp;gt; changes the &amp;lt;b&amp;gt;discount for all customers&amp;lt;/b&amp;gt;, while the &amp;lt;b&amp;gt;second changes the telephone number of the customer with the customer number '00017777'&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So make the following changes and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

In case of &amp;lt;b&amp;gt;Point 1&amp;lt;/b&amp;gt;
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input  = inveno
  IMPORTING
    output = inveno.


UPDATE ztale_head SET   : send = 'X'
                          ttime = sy-uzeit
                          ddate = sy-datum
               WHERE inveno = &amp;lt;converted value&amp;gt;.


&amp;lt;b&amp;gt;Else do it in this way&amp;lt;/b&amp;gt;


UPDATE ztale_head SET   : send = 'X'
                          ttime = sy-uzeit
                          ddate = sy-datum
               WHERE inveno = '227'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 13:29:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement/m-p/1436626#M208102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T13:29:40Z</dc:date>
    </item>
  </channel>
</rss>

