<?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: Report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025158#M715250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khanna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE  dbtab      SET f1 ... fn. or &lt;/P&gt;&lt;P&gt;UPDATE (dbtabname) SET f1 ... fn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... WHERE condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... CONNECTION con &lt;/P&gt;&lt;P&gt;&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;Updates values in a database table. If there is no WHERE clause, all lines (in the current client) are updated. If a WHERE condition is specified, only thoserecords which satisfy the WHERE condition are updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SET clause f1 ... fn identifies the columns to be updated and assigns values to them. Four types of SET statements fi are supported: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = g &lt;/P&gt;&lt;P&gt;In all selected lines, the database table column specified by f receives the value of g. g can be an ABAP field, a literal, or a field descriptor. In the latter case, the contents of the column to which g points are copied into the line of the table that you are updating. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = f + g &lt;/P&gt;&lt;P&gt;In all selected lines, the contents of g are added to the value in the database table column determined by f. g can be an ABAP field, a literal, or a field descriptor. The NULL value remains unchanged. This statement can only be applied to a numeric field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = f - g &lt;/P&gt;&lt;P&gt;In all selected lines, the content of g is subtracted from the value in the database table column determined by f. g can be an ABAP field, a literal, or a field descriptor. The NULL value remains unchanged. This statement can only be applied to a numeric field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(source_text) &lt;/P&gt;&lt;P&gt;For all selected lines, the program executes the SET statements that are specified dynamically in the source_text variable as ABAP-Quelltext source text. You can specify any SET statement that you could specify statically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Changing the discount to 3 percent for all customers in the current client: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE scustom SET discount = '003'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;The same example using a dynamic SET condition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: tabname     TYPE STRING, &lt;/P&gt;&lt;P&gt;      set_clause  TYPE STRING. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabname    = 'SCUSTOM'. &lt;/P&gt;&lt;P&gt;set_clause = 'DISCOUNT = ''003'' '. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE (tabname) SET (set_clause). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the command has been executed, the system field SY-DBCNT contains the number of updated lines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;At least one line was updated, &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;No line was updated because either no line could be selected or the change would have generated lines with primary keys that already existed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;With pooled and cluster tables, an UPDATE cannot change any primary key field. &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;SET statements are not separated by commas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not use the colon and commas to separate chained statements, since you could change an entire database table without wanting 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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FALSCH * WRONG * FALSCH * WRONG * FALSCH * WRONG * &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UPDATE SCUSTOM SET:  DISCOUNT  = '003', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     TELEPHONE = '0621/444444' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               WHERE ID        = '00017777'. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fragment is not a single statement that update the discount and telephone number for the customer with the customer number '00017777'. Rather, it represents two statements - the first changes the discount for all customers, while the second changes the telephone number of the customer with the customer number '00017777'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... WHERE condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Updates only those lines which satisfy the&lt;/P&gt;&lt;P&gt;WHERE clause condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You cannot include a subquery to the appropriate database table in the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Increase the number of occupied seats on Lufthansa flight 0400 on 28.02.2001 by 3 (in the current client): &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE sflight SET   seatsocc = seatsocc + 3 &lt;/P&gt;&lt;P&gt;               WHERE carrid   = 'LH'   AND &lt;/P&gt;&lt;P&gt;                     connid   = '0400' AND &lt;/P&gt;&lt;P&gt;                     fldate   = '20010228'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Switches off automatic client handling. This allows you&lt;/P&gt;&lt;P&gt;to update across all clients when using client-specific tables. The client field is treated like a normal table field, for which you can formulate suitable conditions in the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CLIENT SPECIFIED addition must immediately follow the database table name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Increase the number of occupied seats on Lufthansa flight 0400 on 28.02.2000 by 3 in client 2: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SFLIGHT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE sflight CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;               SET   seatsocc = seatsocc + 3 &lt;/P&gt;&lt;P&gt;               WHERE mandt    = '002'  AND &lt;/P&gt;&lt;P&gt;                     carrid   = 'LH'   AND &lt;/P&gt;&lt;P&gt;                     connid   = '0400' AND &lt;/P&gt;&lt;P&gt;                     fldate   = '20010228'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... CONNECTION con &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The Open SQL command is not executed on the&lt;/P&gt;&lt;P&gt;standard database, but on the secondary database connection specified with con. con is the name of the database connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text), where the source_text field contains the name of the database connection and must be type C or STRING. &lt;/P&gt;&lt;P&gt;The CONNECTION con addition must be specified directly after the name of the database table or after the CLIENT SPECIFIED addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here you can use,&lt;/P&gt;&lt;P&gt;UPDATE  ztab SET salary = '1000' where level = 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward If Useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2007 11:07:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-02T11:07:38Z</dc:date>
    <item>
      <title>Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025154#M715246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to retrieve data from ztable which contains eno,name,age,sal,level,date of join.In level i have T,M &amp;amp; L.I selected the data with level L.I want to add salary 1000 to their existing salary.How to do that?&lt;/P&gt;&lt;P&gt;I am getting level as input parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025154#M715246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T11:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025155#M715247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;use the update statement&lt;/P&gt;&lt;P&gt;tables: ztable&lt;/P&gt;&lt;P&gt;update ztable set salary = '1000' where level = 'L'.&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;ANJI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025155#M715247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T11:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025156#M715248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;update ztable set sal = sal + 1000 where level = 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: ilevel(1) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update ztable set sal = sal + 1000 where level = ilevel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025156#M715248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T11:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025157#M715249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ztable into table itab where leval = 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop ai itab.&lt;/P&gt;&lt;P&gt;itab-salary = itab-salary + 1000.&lt;/P&gt;&lt;P&gt;modify itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / itab-eno,itab-ename,itab-salary......&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gagan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025157#M715249</guid>
      <dc:creator>former_member194152</dc:creator>
      <dc:date>2007-11-02T11:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025158#M715250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khanna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE  dbtab      SET f1 ... fn. or &lt;/P&gt;&lt;P&gt;UPDATE (dbtabname) SET f1 ... fn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... WHERE condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... CONNECTION con &lt;/P&gt;&lt;P&gt;&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;Updates values in a database table. If there is no WHERE clause, all lines (in the current client) are updated. If a WHERE condition is specified, only thoserecords which satisfy the WHERE condition are updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SET clause f1 ... fn identifies the columns to be updated and assigns values to them. Four types of SET statements fi are supported: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = g &lt;/P&gt;&lt;P&gt;In all selected lines, the database table column specified by f receives the value of g. g can be an ABAP field, a literal, or a field descriptor. In the latter case, the contents of the column to which g points are copied into the line of the table that you are updating. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = f + g &lt;/P&gt;&lt;P&gt;In all selected lines, the contents of g are added to the value in the database table column determined by f. g can be an ABAP field, a literal, or a field descriptor. The NULL value remains unchanged. This statement can only be applied to a numeric field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = f - g &lt;/P&gt;&lt;P&gt;In all selected lines, the content of g is subtracted from the value in the database table column determined by f. g can be an ABAP field, a literal, or a field descriptor. The NULL value remains unchanged. This statement can only be applied to a numeric field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(source_text) &lt;/P&gt;&lt;P&gt;For all selected lines, the program executes the SET statements that are specified dynamically in the source_text variable as ABAP-Quelltext source text. You can specify any SET statement that you could specify statically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Changing the discount to 3 percent for all customers in the current client: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE scustom SET discount = '003'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;The same example using a dynamic SET condition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: tabname     TYPE STRING, &lt;/P&gt;&lt;P&gt;      set_clause  TYPE STRING. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabname    = 'SCUSTOM'. &lt;/P&gt;&lt;P&gt;set_clause = 'DISCOUNT = ''003'' '. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE (tabname) SET (set_clause). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the command has been executed, the system field SY-DBCNT contains the number of updated lines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;At least one line was updated, &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;No line was updated because either no line could be selected or the change would have generated lines with primary keys that already existed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;With pooled and cluster tables, an UPDATE cannot change any primary key field. &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;SET statements are not separated by commas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not use the colon and commas to separate chained statements, since you could change an entire database table without wanting 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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FALSCH * WRONG * FALSCH * WRONG * FALSCH * WRONG * &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UPDATE SCUSTOM SET:  DISCOUNT  = '003', &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     TELEPHONE = '0621/444444' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               WHERE ID        = '00017777'. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fragment is not a single statement that update the discount and telephone number for the customer with the customer number '00017777'. Rather, it represents two statements - the first changes the discount for all customers, while the second changes the telephone number of the customer with the customer number '00017777'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... WHERE condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Updates only those lines which satisfy the&lt;/P&gt;&lt;P&gt;WHERE clause condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You cannot include a subquery to the appropriate database table in the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Increase the number of occupied seats on Lufthansa flight 0400 on 28.02.2001 by 3 (in the current client): &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE sflight SET   seatsocc = seatsocc + 3 &lt;/P&gt;&lt;P&gt;               WHERE carrid   = 'LH'   AND &lt;/P&gt;&lt;P&gt;                     connid   = '0400' AND &lt;/P&gt;&lt;P&gt;                     fldate   = '20010228'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Switches off automatic client handling. This allows you&lt;/P&gt;&lt;P&gt;to update across all clients when using client-specific tables. The client field is treated like a normal table field, for which you can formulate suitable conditions in the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CLIENT SPECIFIED addition must immediately follow the database table name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Increase the number of occupied seats on Lufthansa flight 0400 on 28.02.2000 by 3 in client 2: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SFLIGHT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE sflight CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;               SET   seatsocc = seatsocc + 3 &lt;/P&gt;&lt;P&gt;               WHERE mandt    = '002'  AND &lt;/P&gt;&lt;P&gt;                     carrid   = 'LH'   AND &lt;/P&gt;&lt;P&gt;                     connid   = '0400' AND &lt;/P&gt;&lt;P&gt;                     fldate   = '20010228'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... CONNECTION con &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The Open SQL command is not executed on the&lt;/P&gt;&lt;P&gt;standard database, but on the secondary database connection specified with con. con is the name of the database connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text), where the source_text field contains the name of the database connection and must be type C or STRING. &lt;/P&gt;&lt;P&gt;The CONNECTION con addition must be specified directly after the name of the database table or after the CLIENT SPECIFIED addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here you can use,&lt;/P&gt;&lt;P&gt;UPDATE  ztab SET salary = '1000' where level = 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward If Useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/3025158#M715250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T11:07:38Z</dc:date>
    </item>
  </channel>
</rss>

