<?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: Updating table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386113#M530216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi deva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with modify but it appending the values .even insert will add the values &lt;/P&gt;&lt;P&gt;so it is not meeting the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pavee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2007 10:21:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-19T10:21:05Z</dc:date>
    <item>
      <title>Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386108#M530211</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 a requirement where i have create custom transaction that will ask the user to enter the value of amount. and it will be stored in the one custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is there should be only one entry in the table .if the user executes the transaction second time.it should override the value that is already exists in the table.&lt;/P&gt;&lt;P&gt;i am not getting the logic to keep the only value in the table . please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;paveee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:15:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386108#M530211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386109#M530212</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;by setting the primary key for a particular field in the table while creation you can avoid the duplication of entries..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386109#M530212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386110#M530213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If u wantto over write a record, then ucan use MODIFY statement .&lt;/P&gt;&lt;P&gt;If u dont wantto over write a record, then u can go for INSERT tstament.  &lt;/P&gt;&lt;P&gt;Revert back if any issues,&lt;/P&gt;&lt;P&gt;Reward with points if helpful ,&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;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386110#M530213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386111#M530214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ashu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;primary key of the table itself is amount.and mandt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table has got only three fields(custom table) mandt,amount,desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pavee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386111#M530214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386112#M530215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Direct database update &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code can be used as a template to produce an ABAP which updates a particular database &lt;/P&gt;&lt;P&gt;table field&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp; Report  ZUPDATE_PRPS                                                *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;  Quick report to Update PRPS-FAKKZ database field                   *
*&amp;amp;---------------------------------------------------------------------*
Report  ZUPDATE_PRPS.

tables: prps.

parameter: p_wbs like prps-pspnr,
           p_value like prps-fakkz default 'X'.

data: wa_fakkz type prps-fakkz.


************************************************************************
*START-OF_SELECTION
start-of-selection.

call function 'CONVERSION_EXIT_ABPSP_INPUT'
     exporting
         input     = p_wbs
    importing
         output    = p_wbs
    exceptions
         not_found = 1
         others    = 2.

select single fakkz
  into wa_fakkz
  from prps
 where pspnr eq p_wbs.
if sy-subrc eq 0.
   update prps set fakkz = p_value where PSPNR eq p_wbs.
   if p_value is initial.
     message i999(za) with 'Billing element field has been unchecked'.
   else.
     message i999(za) with 'Billing element field has been checked'.
   endif.
else.
  message i999(za) with 'WBS element not found'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points  if it is usefull ...&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386112#M530215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386113#M530216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi deva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with modify but it appending the values .even insert will add the values &lt;/P&gt;&lt;P&gt;so it is not meeting the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pavee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386113#M530216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386114#M530217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naveen is correct. U should use the Modify statement. The modify statement works in the following way. If the record already exists, it overrides it with new content. If it does not exist, it creates a new entry. So this solves your purpose with a single statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386114#M530217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386115#M530218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi praveen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u can go for &amp;lt;b&amp;gt;MODIFY&amp;lt;/b&amp;gt; statement since this statement will over write the existing record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386115#M530218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386116#M530219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   you should have a logic  which should check whether the Amount (input )already exists or not .&lt;/P&gt;&lt;P&gt; 1. if it exists : use UPDATE or MODIFY stmt  .&lt;/P&gt;&lt;P&gt; 2. if the entry does not exist use INSERT stmt .&lt;/P&gt;&lt;P&gt;you have to use a where condition in 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check if the amount exists or not, you can have a select query and store the data in an int table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if u face any problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ Laxmi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reward for helpful answers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386116#M530219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386117#M530220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ss,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;   save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;   WHEN 'BUTTON'.&lt;/P&gt;&lt;P&gt;        lw_ydamt-mandt = ydamt-mandt.&lt;/P&gt;&lt;P&gt;        lw_ydamt-thdamt = ydamt-thdamt.&lt;/P&gt;&lt;P&gt;        lw_ydamt-pordt  = ydamt-pordt.&lt;/P&gt;&lt;P&gt;        modify  ydamt from lw_ydamt .&lt;/P&gt;&lt;P&gt;now i am using this code to update .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i executes the transaction second time and if i give different value. it is inserting new row.&lt;/P&gt;&lt;P&gt;Please help ...me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pavee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386117#M530220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386118#M530221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ur sake, I myself made the program and tested it with the modify statement. It is working superb, the same way u want it. Just c below. I made a demo version by creating a ztable with three fields viz, mandt, numbr and name (mandt and numbr are my key fields). I created a screen in se51 with two fields ie numbr and name (gave dictionary names to the fields in Se41). Made a pushbutton 'UPDATE' with function code 'UPD' to update/insert the contents (as the case may be). Just see the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSS_TEST1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables : ZTAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : itab like standard table of Ztab1,&lt;/P&gt;&lt;P&gt;       wtab like ztab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call screen 1.&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;      Module  USER_COMMAND_0001  INPUT&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;MODULE USER_COMMAND_0001 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;    WHEN 'UPD'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lw_ydamt-mandt = ydamt-mandt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wtab-numbr = ztab1-numbr.&lt;/P&gt;&lt;P&gt;      wtab-name = ztab1-name.&lt;/P&gt;&lt;P&gt;      modify ztab1 from wtab .&lt;/P&gt;&lt;P&gt;   endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0001  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this I checked the contents in Se16 (just to be quick i omitted any exit or display button) but in the SE16 I could see that the program is inserting a record if it does not exist and modifying it if its exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get back if u have any probs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 11:20:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386118#M530221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T11:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386119#M530222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing, while executing the transaction second time, you will have to see that you are giving the same values for key fields (for a particular record) and different values for non-key fields , if you dont want a new entry. If you check your transaction the second time by giving new values for the key fields, then obviously it is going to insert a new record rather than update anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 11:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386119#M530222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T11:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386120#M530223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. it is correct . the amount field is updating if  the value is exists in the table and inserting if the user enters different value that is not exists in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i do not want second record in the table . eventhough the user enters different value for the second time.it should override that value also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is there should be only record in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me...full points will be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;paveee.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 12:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386120#M530223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T12:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386121#M530224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WRITE SELECT statement IF SY-SUBRC = 0. OR SY-DBCNT = 1 MODIFY THE ROW ELSE INSERT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 12:15:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386121#M530224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T12:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386122#M530225</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;Try replacing the code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;save_ok = ok_code.&lt;/P&gt;&lt;P&gt;CLEAR ok_code.&lt;/P&gt;&lt;P&gt;CASE save_ok.&lt;/P&gt;&lt;P&gt;WHEN 'BUTTON'.&lt;/P&gt;&lt;P&gt;lw_ydamt-mandt = ydamt-mandt.&lt;/P&gt;&lt;P&gt;lw_ydamt-thdamt = ydamt-thdamt.&lt;/P&gt;&lt;P&gt;lw_ydamt-pordt = ydamt-pordt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single *  &lt;/P&gt;&lt;P&gt;from ydamt&lt;/P&gt;&lt;P&gt;where thdamt = lw_thdamt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;   modify ydamt from lw_ydamt .&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  delete ydamt.&lt;/P&gt;&lt;P&gt;  insert ydamt from lw_ydamt.&lt;/P&gt;&lt;P&gt;end if.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it was useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 12:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386122#M530225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T12:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386123#M530226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SS,&lt;/P&gt;&lt;P&gt;i got the solution ,&lt;/P&gt;&lt;P&gt;Ur code with some modification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;    WHEN 'UPD'.&lt;/P&gt;&lt;P&gt;      lw_ydamt-mandt = ydamt-mandt.&lt;/P&gt;&lt;P&gt;      lw_ydamt-thdamt = ydamt-thdamt.&lt;/P&gt;&lt;P&gt;      lw_ydamt-pordt = ydamt-pordt.&lt;/P&gt;&lt;P&gt;      DELETE FROM ydamt.&lt;/P&gt;&lt;P&gt;      MODIFY ydamt FROM lw_ydamt.&lt;/P&gt;&lt;P&gt;       CLEAR sy-ucomm.&lt;/P&gt;&lt;P&gt;     LEAVE PROGRAM&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;it is meeting my requiremennt..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur asnwers.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;paveee...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 12:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/2386123#M530226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T12:34:24Z</dc:date>
    </item>
  </channel>
</rss>

