<?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 Modify Table In Background Works Incorrect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-background-works-incorrect/m-p/3143535#M747255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Transparent Y* table with three primary key and some quantity fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program works daily in background job, selects some data from vbak, vbap etc. and inserts two new records every day using sytax "modify Y* from S_Y*".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating two records into internal table to insert to Y* table, but program inserts two records and modifies old two records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When trying to run program in foreground all things are normallay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  perform get_values.&lt;/P&gt;&lt;P&gt;  perform get_data.&lt;/P&gt;&lt;P&gt;  perform calculate_fill_table.&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;  perform update_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am filling internal table with to records manually which will update the Y&lt;/STRONG&gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form calculate_fill_table.&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  calc_values-abmpeur = ( calc_values-abmptl / 1000 ) / $a01_kur.&lt;/P&gt;&lt;P&gt;  append calc_values. "Record One&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear calc_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;  calc_values-abmpeur = ( calc_values-abmptl / 1000 ) / $a03_kur.&lt;/P&gt;&lt;P&gt;  append calc_values. "Record Two&lt;/P&gt;&lt;P&gt;endform.                    " calculate_fill_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form update_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort calc_values by key.&lt;/P&gt;&lt;P&gt;  loop at calc_values.&lt;/P&gt;&lt;P&gt;    clear i_sm.&lt;/P&gt;&lt;P&gt;    i_sm-kvgr1     = calc_values-key. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-upto      = sy_datum. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-fperi     = $period. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-tinvoiced = calc_values-ciroton. "Quantity Field&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    modify ysipraporsm from i_sm.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2007 08:03:27 GMT</pubDate>
    <dc:creator>ibrahim_u</dc:creator>
    <dc:date>2007-12-14T08:03:27Z</dc:date>
    <item>
      <title>Modify Table In Background Works Incorrect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-background-works-incorrect/m-p/3143535#M747255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Transparent Y* table with three primary key and some quantity fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program works daily in background job, selects some data from vbak, vbap etc. and inserts two new records every day using sytax "modify Y* from S_Y*".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating two records into internal table to insert to Y* table, but program inserts two records and modifies old two records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When trying to run program in foreground all things are normallay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  perform get_values.&lt;/P&gt;&lt;P&gt;  perform get_data.&lt;/P&gt;&lt;P&gt;  perform calculate_fill_table.&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;  perform update_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am filling internal table with to records manually which will update the Y&lt;/STRONG&gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form calculate_fill_table.&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  calc_values-abmpeur = ( calc_values-abmptl / 1000 ) / $a01_kur.&lt;/P&gt;&lt;P&gt;  append calc_values. "Record One&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear calc_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;  calc_values-abmpeur = ( calc_values-abmptl / 1000 ) / $a03_kur.&lt;/P&gt;&lt;P&gt;  append calc_values. "Record Two&lt;/P&gt;&lt;P&gt;endform.                    " calculate_fill_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form update_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort calc_values by key.&lt;/P&gt;&lt;P&gt;  loop at calc_values.&lt;/P&gt;&lt;P&gt;    clear i_sm.&lt;/P&gt;&lt;P&gt;    i_sm-kvgr1     = calc_values-key. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-upto      = sy_datum. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-fperi     = $period. "Y* Table primary key&lt;/P&gt;&lt;P&gt;    i_sm-tinvoiced = calc_values-ciroton. "Quantity Field&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    modify ysipraporsm from i_sm.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 08:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-background-works-incorrect/m-p/3143535#M747255</guid>
      <dc:creator>ibrahim_u</dc:creator>
      <dc:date>2007-12-14T08:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table In Background Works Incorrect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-background-works-incorrect/m-p/3143536#M747256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use COMMIT WORK after modify.&lt;/P&gt;&lt;P&gt;Clear Work Area After using append/modify statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 08:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-background-works-incorrect/m-p/3143536#M747256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-14T08:24:21Z</dc:date>
    </item>
  </channel>
</rss>

