<?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/MODIFY DB in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168577#M753898</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;   Refer this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  SUB_READ_UPDATE_BSEG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_read_update_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_final INTO wa_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      UPDATE bseg SET zuonr = wa_final-ccnum&lt;/P&gt;&lt;P&gt;                  WHERE bukrs EQ wa_final-bukrs&lt;/P&gt;&lt;P&gt;                  AND   belnr EQ wa_final-vbeln&lt;/P&gt;&lt;P&gt;                  AND   rfzei EQ wa_final-rfzei&lt;/P&gt;&lt;P&gt;                  AND   saknr NE ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Message data updated successfully&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-002.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Message No data found&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-003.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SUB_READ_UPDATE_BSEG&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;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2007 07:29:53 GMT</pubDate>
    <dc:creator>former_member386202</dc:creator>
    <dc:date>2007-12-13T07:29:53Z</dc:date>
    <item>
      <title>UPDATE/MODIFY DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168576#M753897</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 have to modify a database table by assigning CTS number to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls guide me in this.&lt;/P&gt;&lt;P&gt;if u have pls send a sample code for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 07:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168576#M753897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T07:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE/MODIFY DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168577#M753898</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;   Refer this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  SUB_READ_UPDATE_BSEG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_read_update_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_final[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_final INTO wa_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      UPDATE bseg SET zuonr = wa_final-ccnum&lt;/P&gt;&lt;P&gt;                  WHERE bukrs EQ wa_final-bukrs&lt;/P&gt;&lt;P&gt;                  AND   belnr EQ wa_final-vbeln&lt;/P&gt;&lt;P&gt;                  AND   rfzei EQ wa_final-rfzei&lt;/P&gt;&lt;P&gt;                  AND   saknr NE ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Message data updated successfully&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-002.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Message No data found&lt;/P&gt;&lt;P&gt;    MESSAGE i888 WITH text-003.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SUB_READ_UPDATE_BSEG&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;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 07:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168577#M753898</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-12-13T07:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE/MODIFY DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168578#M753899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can use &lt;/P&gt;&lt;P&gt;Insert or Modify commands&lt;/P&gt;&lt;P&gt;It will modify the DB table from the data of Int table&lt;/P&gt;&lt;P&gt;MODIFY&lt;/P&gt;&lt;P&gt;... FROM { {wa} | {TABLE itab} }. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... FROM wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... FROM TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A wa data object that is not table-type or an itab internal table can be specified after FROM. On the one hand the content of the data objects determines whether the line(s) are inserted or changed, and on the other hand, which values are inserted or used for changes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT&lt;/P&gt;&lt;P&gt;... { {VALUES wa} &lt;/P&gt;&lt;P&gt;| {FROM wa|{TABLE itab [ACCEPTING DUPLICATE KEYS]}} }. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... {VALUES wa} | {FROM wa} ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... FROM TABLE itab [ACCEPTING DUPLICATE KEYS] ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After FROM and VALUES, you can specify a non-table-type data object wa. After FROM, you can also specify an internal table itab. The contents of the row(s) to be inserted are taken from these data objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE&lt;/P&gt;&lt;P&gt;... { {SET set_expression [WHERE sql_cond]} &lt;/P&gt;&lt;P&gt;| {FROM wa|{TABLE itab}} }. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... SET set_expression [WHERE sql_cond] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... FROM wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... FROM TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The specifications in source define which rows and columns are changed. Either individual columns are changed using the addition SET or entire rows are overwritten using the addition FROM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After FROM, either a non-table-type data object wa or an internal table itab can be specified. The content of these objects determines - on the one hand - which row(s) is/are changed, and - on the other hand - which values are used to overwrite the row(s). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out these related threads&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3254405"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="292577"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if found helpfu...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chandra Sekhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 07:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-modify-db/m-p/3168578#M753899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T07:40:15Z</dc:date>
    </item>
  </channel>
</rss>

