<?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: Modify database table from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947145#M694807</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;Use the abap code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;MODIFY ZTABLE FROM WA.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;Move wa to wa1.&lt;/P&gt;&lt;P&gt;append itab1 from wa1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&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;Sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2007 06:40:08 GMT</pubDate>
    <dc:creator>sreeramkumar_madisetty</dc:creator>
    <dc:date>2007-10-15T06:40:08Z</dc:date>
    <item>
      <title>Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947142#M694804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update database table from internal table which is having around 30000 records.&lt;/P&gt;&lt;P&gt;I am using MODIFY tabname FROM TABLE int_tabname...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this statement, I can modify the databse records very well. But user has some additional requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He wants that the table should be modified from the internal table and after modification we should have the erroneous records to be displayed if any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. if 1500 records out of 30000 are erroneous then only 28500 records should be updated and 1500 records should be displayed as erroneous records so that the user can correct them and use them again for executing the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any FM which imports the database table name and internal table, modifies the database and exports an internal tanle with erroneous records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appriciated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947142#M694804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947143#M694805</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;In this case..u have use loop statemnt .But performance wiese not good...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;MODIFY ZTABLE FROM WA.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;Move wa to wa1.&lt;/P&gt;&lt;P&gt;append itab1 from wa1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the table itab1 will have error records..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947143#M694805</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-10-15T06:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947144#M694806</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 suggest to use BDC or some other method to update database table , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use this to update directly then check sy-subrc after each UPDATE or MODIFY commend if sy-subrc not equal to 0 then move the record to a seprate intenal table and show it to user. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947144#M694806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947145#M694807</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;Use the abap code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;MODIFY ZTABLE FROM WA.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;Move wa to wa1.&lt;/P&gt;&lt;P&gt;append itab1 from wa1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&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;Sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947145#M694807</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-10-15T06:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947146#M694808</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;modifying datbase table useing internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;advises&amp;lt;/b&amp;gt; before updating this datbase table plz lock that table to avoid incosistency &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the logic for modifying &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modify the database table as per new dunning procedure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MODIFY fkkvkp FROM TABLE lt_fkkvkp   .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and finally unlock the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;example&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To lock table for further operations&lt;/P&gt;&lt;P&gt;  constants: lc_tabname TYPE  rstable-tabname  VALUE 'FKKVKP'  . "FKKVKP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      tabname        = lc_tabname&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      foreign_lock   = 1&lt;/P&gt;&lt;P&gt;      system_failure = 2&lt;/P&gt;&lt;P&gt;      OTHERS         = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  To fetch all the contract accounts for customers of the segment&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Households/SME.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM fetch_contract_accounts using lc_tabname .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.                    " IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*wrote the logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modify the database table as per new dunning procedure from internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MODIFY fkkvkp FROM TABLE lt_fkkvkp   .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*unlock the tbale&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     TABNAME   =  uc_tabname .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if usefull&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947146#M694808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modify database table from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947147#M694809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     As you asked try this function modules:&lt;/P&gt;&lt;P&gt;                                                               BDL/_MODIFY_MAINTAIN_A1S&lt;/P&gt;&lt;P&gt;                                                               BDL/_MODIFY_SESSMAP_A1S&lt;/P&gt;&lt;P&gt;                                                               BDL/_MODIFY_TASKS_A1S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                                              APPTSEG_MODIFY_INTERNAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it once the above function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is useful please reward it.&lt;/P&gt;&lt;P&gt;thanks &amp;amp;regards&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-table-from-internal-table/m-p/2947147#M694809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:50:22Z</dc:date>
    </item>
  </channel>
</rss>

