<?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: how to modify the database table using a index in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865991#M672223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seen your lots of post on table modification.&lt;/P&gt;&lt;P&gt;The best way is just loop at internal table and get the data in work area and use that work area to modify the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 03:29:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T03:29:10Z</dc:date>
    <item>
      <title>how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865990#M672222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have captured a index for the modifeid recoed in a varialble now it want to modify the database table using this index&lt;/P&gt;&lt;P&gt;for eg ztabel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ho to do it pls tell me the syntex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 03:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865990#M672222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T03:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865991#M672223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seen your lots of post on table modification.&lt;/P&gt;&lt;P&gt;The best way is just loop at internal table and get the data in work area and use that work area to modify the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 03:29:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865991#M672223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T03:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865992#M672224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi atish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have alredy tried this and its not working and i want to modify using index&lt;/P&gt;&lt;P&gt;pls suggest?&lt;/P&gt;&lt;P&gt;i have a database table zmm_aims_opn&lt;/P&gt;&lt;P&gt;with fields &lt;/P&gt;&lt;P&gt;customer number    name   email&lt;/P&gt;&lt;P&gt;all are primary keys?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have captured the data in t_modify internal table which contains the data whihc is to be modified&lt;/P&gt;&lt;P&gt;but it is beig inserted not modified as this int table has the modified data hence it is not able to match with the database table and hence it is inserting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now ther are tow options to use cetain condtion to comapre the record in the d atabase table or  use index&lt;/P&gt;&lt;P&gt;index will be better one pls suggest&lt;/P&gt;&lt;P&gt;or let me know if i can use where conditon &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the modification code is as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                                   &lt;/P&gt;&lt;P&gt; loop at t_aims_opn_modify.                        &lt;/P&gt;&lt;P&gt;   modify zmm_aims_opn from table &amp;lt;b&amp;gt;t_aims_opn_modify &amp;lt;/b&amp;gt; ( this is internal table having all records to be modified)&lt;/P&gt;&lt;P&gt;   message s001 with 'Data saved'(004).            &lt;/P&gt;&lt;P&gt;   refresh:t_aims_opn_modify.                      &lt;/P&gt;&lt;P&gt; endloop.                                          &lt;/P&gt;&lt;P&gt;lse.                                               &lt;/P&gt;&lt;P&gt; message s001 with 'Data already saved'(003).      &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;nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 03:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865992#M672224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T03:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865993#M672225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand you want to modify the data of the key field. Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes then the MODIFY will not solve your purpose.&lt;/P&gt;&lt;P&gt;You need to use UPDATE...SET in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 03:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865993#M672225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T03:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865994#M672226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes i want to modify the data of email&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and all three are primary keys?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 03:50:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865994#M672226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T03:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865995#M672227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Atish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest how to use update set in above case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as the above inernal table contains data to be modified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also one more internal tabel i have zcus w hich has all the new records it is having the record modified with new one and the database table should have the recods as in this zcust internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know how to use update ..set in above my code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 04:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865995#M672227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T04:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865996#M672228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant , &lt;/P&gt;&lt;P&gt;  I feel it not possible to modify a field in a table which is part of the primary key ,so you even if you perofrm a update operation it will not be reflected in the database,&lt;/P&gt;&lt;P&gt;Or you will have to use the addition SET with the command UPDATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Arun R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 04:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865996#M672228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T04:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865997#M672229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE ztable SET name = wa_itab-name&lt;/P&gt;&lt;P&gt;email = wa_itab-email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check the syntaxes once and write the code your problem wil be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 04:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865997#M672229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T04:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865998#M672230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi atish &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code before the earlier give code is as below&lt;/P&gt;&lt;P&gt;here after this code the internal table T_cust_em contaains the modifed data&lt;/P&gt;&lt;P&gt;and it contains the record that has modified &lt;/P&gt;&lt;P&gt;or eg the 8th record is modified....so it contains the 8th record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here we can use index to this internal table to read the record which has been updated WHICH IS 8TH RECORED FOR EG &lt;/P&gt;&lt;P&gt;and then delte it from database but how to code FOR IT HERE and how to delte from database this specific record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can i use like delter from database table (zcustemail ) where &lt;/P&gt;&lt;P&gt;ship_to = zcust_em-ship_to&lt;/P&gt;&lt;P&gt;and ship_to_name = zcust_ema-ship-to_name&lt;/P&gt;&lt;P&gt;and emai_id = zcust_em-emai_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know if this is possible delteting the record will be a better option&lt;/P&gt;&lt;P&gt;like i catch the index which was modifed and use that index to read thi internal table to fetch the record whch needs to be delted from database table and use where conditon to delete from database table? pls suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLS SUGGEST? ITS URGENT?&lt;/P&gt;&lt;P&gt;IF U WNAT I CAN PAST THE WHOLE CODE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problme is how to delte from databASE? THE recoed which has been modified?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify t_zcust_em index table_zcust_em-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single *&lt;/P&gt;&lt;P&gt;         from zcustemail&lt;/P&gt;&lt;P&gt;        where ship_to eq t_zcust_em-ship_to&lt;/P&gt;&lt;P&gt;        and email_id eq t_zcust_em-email_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       and  ship_to_name = t_zcust_em-ship_to_name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    move:t_zcust_em to t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;    append t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear:t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_index = table_zcust_em-top_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 04:28:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865998#M672230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T04:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865999#M672231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting confused with your requirement. Do you want to delete the record from DB table or you want to MODIFY the record from table which has all the primary keys?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 04:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2865999#M672231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T04:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866000#M672232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Atish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to modify but in my case the modified recored is added to the table  rather then modified&lt;/P&gt;&lt;P&gt;but as moficcatio is not possible so i want to delter the record earleir one which was modified so automatically it will show the new record in the database as modfied as the earlier one is deleted &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866000#M672232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866001#M672233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using UPDATE you will be able to modify the record so no need to worry about all other logic or anything else.&lt;/P&gt;&lt;P&gt;Just use UPDATE as I mentioned earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you close the other threads and keep only one open if problem not solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866001#M672233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T06:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866002#M672234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Atish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wnat to know the code for update to modify?&lt;/P&gt;&lt;P&gt;for the email id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls let me kow on that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:32:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866002#M672234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T06:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866003#M672235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already given you the code in my above post. You just need to finetune it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:36:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866003#M672235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T06:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866004#M672236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish&lt;/P&gt;&lt;P&gt;the code u ahve posted?&lt;/P&gt;&lt;P&gt;can u please let me k now on that since ship_to is also a prirmay key and ship_to_name is also a primary key&lt;/P&gt;&lt;P&gt;and email_id also a primary key as i told earleir and my internal table contains the data which needs to be modified &lt;/P&gt;&lt;P&gt;so h0ow will it match the data in the ztable as the ztable will certainly not ahve the record which this internal table has as this is modified only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE ztable SET name = wa_itab-name&lt;/P&gt;&lt;P&gt;email = wa_itab-email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check the syntaxes once and write the code your problem wil be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866004#M672236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T06:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866005#M672237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nishant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to specify WHERE clause and in that you can provide other 2 key fields value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE &amp;lt;ztable&amp;gt; SET email = wa-email&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;ship_to = wa-ship_to &lt;/P&gt;&lt;P&gt;ship_to_name = wa-ship_to_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you got the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866005#M672237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T06:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify the database table using a index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866006#M672238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i got the idea but my problme is that this will not work as the modification internal table contains the data which is modified so this comparision will mismatch and database recored will not be updated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please seee my code as belwo whole&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module  get_t_zcust_em_for_deletion.&lt;/P&gt;&lt;P&gt;  loop with control table_zcust_em.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODULE USER_COMMAND_0300.&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;  module handling_function_0300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0300 INPUT.&lt;/P&gt;&lt;P&gt;w_crnt_line = table_zcust_em-top_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_lines = sy-loopc.&lt;/P&gt;&lt;P&gt;modify t_zcust_em index table_zcust_em-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single *&lt;/P&gt;&lt;P&gt;         from zcustemail&lt;/P&gt;&lt;P&gt;        where ship_to eq t_zcust_em-ship_to&lt;/P&gt;&lt;P&gt;        and email_id eq t_zcust_em-email_id.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    move:t_zcust_em to t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;    append t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear:t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_index = table_zcust_em-top_line.&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;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0300  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform fill_modif_value.&lt;/P&gt;&lt;P&gt;        perform modify_data.&lt;/P&gt;&lt;P&gt;        perform refresh_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORM fill_modif_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt; t_zcust_em_modif_tmp-ship_to       to   t_zcust_em_modify-ship_to ,&lt;/P&gt;&lt;P&gt; t_zcust_em_modif_tmp-SHIP_TO_NAME  to  t_zcust_em_modify-SHIP_TO_NAME ,&lt;/P&gt;&lt;P&gt;  t_zcust_em_modif_tmp-email_id   to t_zcust_em_modify-email_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; ,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         sy-uzeit                      to  t_zcust_em_modify-EXTRTIME&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         sy-uname                      to  t_zcust_em_modify-USER_ID&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append t_zcust_em_modify.&lt;/P&gt;&lt;P&gt;    clear:t_zcust_em_modify.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " fill_modif_value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not t_zcust_em_modify[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at t_zcust_em_modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      modify zcustemail  from table t_zcust_em_modify.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     UPDATE zcustemail SET&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ship_to_name = t_zcust_em_modify-ship_to_name&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ship_to = t_zcust_em_modify-ship_to&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; email_id = t_zcust_em_modify-email_id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      message s001 with 'Data saved'(004).&lt;/P&gt;&lt;P&gt;      refresh:t_zcust_em_modify.&lt;/P&gt;&lt;P&gt;*clear:t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message s001 with 'Data already saved'(003).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  refresh:t_zcust_em_modif_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**nv modify problem&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; clear:t_zcust_em_modif_tmp.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**nv modify problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " modify_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM refresh_data1.&lt;/P&gt;&lt;P&gt;  select * from zcustemail   into table t_zcust_em.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " refresh_data1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my above code Please suggest where to use and how to use update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;arora&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 09:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-the-database-table-using-a-index/m-p/2866006#M672238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T09:14:11Z</dc:date>
    </item>
  </channel>
</rss>

