<?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: Inserting records into Custom table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595595#M865873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check sy-subrc eq 0. just after your each update statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if its not eq 0, update is getting failed.&lt;/P&gt;&lt;P&gt;this can happen it the record you want to update is locked by some other program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use lock object to remove such things.&lt;/P&gt;&lt;P&gt;create lock objects ( SE11) for the table/s you are using then use it in the program and update / modify your table in side enqueue-Dequeue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points it helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgs,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ashok Gupta on Mar 30, 2008 4:12 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Mar 2008 10:41:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-30T10:41:53Z</dc:date>
    <item>
      <title>Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595593#M865871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a custom table without table maintainence. I need to insert records into this custom table using abap coding only. When a run a download program an excel file is generated. from that excel file i have to summarise the data and upload the summary to Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is am getting 3 records in summary but only one record is updated into Ztable. Some times total 3 records updated. i dont understand this strange behaviour. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_update_report_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report log: sum of Document currency Amt &amp;amp; local currency Amt&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for all document currency keys&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SORT it_data BY waers.&lt;/P&gt;&lt;P&gt;  LOOP AT it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ON CHANGE OF it_data-waers.&lt;/P&gt;&lt;P&gt;      IF sy-tabix NE 1.&lt;/P&gt;&lt;P&gt;        zdmaplog-dmdate = sy-datum.&lt;/P&gt;&lt;P&gt;        zdmaplog-dmtime = sy-uzeit.&lt;/P&gt;&lt;P&gt;        zdmaplog-dmtyp = 'D'.&lt;/P&gt;&lt;P&gt;        zdmaplog-sbukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;        zdmaplog-tbukrs = p_bukrst.&lt;/P&gt;&lt;P&gt;        zdmaplog-items  = v_lines.&lt;/P&gt;&lt;P&gt;        zdmaplog-wrbtr  = v_wrbtr.&lt;/P&gt;&lt;P&gt;        zdmaplog-dwaers = v_waers.&lt;/P&gt;&lt;P&gt;        zdmaplog-dmbtr  = v_dmbtr.&lt;/P&gt;&lt;P&gt;        zdmaplog-lwaers = 'SGD'.&lt;/P&gt;&lt;P&gt;        zdmaplog-userid = sy-uname.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;update db table zdmaplog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        INSERT zdmaplog.&lt;/P&gt;&lt;P&gt;        v_subrc = sy-subrc.&lt;/P&gt;&lt;P&gt;        COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;        IF v_subrc NE 0.&lt;/P&gt;&lt;P&gt;          WRITE: / v_waers, 'Zdmaplog not updated'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR: v_lines, v_wrbtr, v_dmbtr, v_subrc.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    v_waers = it_data-waers.&lt;/P&gt;&lt;P&gt;    v_lines = v_lines + 1.&lt;/P&gt;&lt;P&gt;    IF it_data-shkzg = 'H'.                  "credit&lt;/P&gt;&lt;P&gt;      v_wrbtr = v_wrbtr - it_data-wrbtr.&lt;/P&gt;&lt;P&gt;      v_dmbtr = v_dmbtr - it_data-dmbtr.&lt;/P&gt;&lt;P&gt;    ELSEIF it_data-shkzg = 'S'.              "Debit&lt;/P&gt;&lt;P&gt;      v_wrbtr = v_wrbtr + it_data-wrbtr.&lt;/P&gt;&lt;P&gt;      v_dmbtr = v_dmbtr + it_data-dmbtr.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;update DB table zdmaplog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  zdmaplog-dmdate = sy-datum.&lt;/P&gt;&lt;P&gt;  zdmaplog-dmtime = sy-uzeit.&lt;/P&gt;&lt;P&gt;  zdmaplog-dmtyp = 'D'.&lt;/P&gt;&lt;P&gt;  zdmaplog-sbukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;  zdmaplog-tbukrs = p_bukrst.&lt;/P&gt;&lt;P&gt;  zdmaplog-items  = v_lines.&lt;/P&gt;&lt;P&gt;  zdmaplog-wrbtr  = v_wrbtr.&lt;/P&gt;&lt;P&gt;  zdmaplog-dwaers = v_waers.&lt;/P&gt;&lt;P&gt;  zdmaplog-dmbtr  = v_dmbtr.&lt;/P&gt;&lt;P&gt;  zdmaplog-lwaers = 'SGD'.&lt;/P&gt;&lt;P&gt;  zdmaplog-userid = sy-uname.&lt;/P&gt;&lt;P&gt;  INSERT zdmaplog.&lt;/P&gt;&lt;P&gt;  v_subrc = sy-subrc.&lt;/P&gt;&lt;P&gt;  COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;  IF v_subrc NE 0.&lt;/P&gt;&lt;P&gt;    WRITE: / v_waers, 'Zdmaplog not updated'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f_report_log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its urgent, please help me. i wil reward good points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 03:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595593#M865871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-30T03:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595594#M865872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Fren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_update_report_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report log: sum of Document currency Amt &amp;amp; local currency Amt&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;for all document currency keys&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT it_data BY waers.&lt;/P&gt;&lt;P&gt;LOOP AT it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT NEW&lt;/STRONG&gt; it_data-waers.&lt;/P&gt;&lt;P&gt;IF sy-tabix NE 1.&lt;/P&gt;&lt;P&gt;zdmaplog-dmdate = sy-datum.&lt;/P&gt;&lt;P&gt;zdmaplog-dmtime = sy-uzeit.&lt;/P&gt;&lt;P&gt;zdmaplog-dmtyp = 'D'.&lt;/P&gt;&lt;P&gt;zdmaplog-sbukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;zdmaplog-tbukrs = p_bukrst.&lt;/P&gt;&lt;P&gt;zdmaplog-items = v_lines.&lt;/P&gt;&lt;P&gt;zdmaplog-wrbtr = v_wrbtr.&lt;/P&gt;&lt;P&gt;zdmaplog-dwaers = v_waers.&lt;/P&gt;&lt;P&gt;zdmaplog-dmbtr = v_dmbtr.&lt;/P&gt;&lt;P&gt;zdmaplog-lwaers = 'SGD'.&lt;/P&gt;&lt;P&gt;zdmaplog-userid = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;update db table zdmaplog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODIFY zdmaplog from zdmaplog.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;v_subrc = sy-subrc.&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;IF v_subrc NE 0.&lt;/P&gt;&lt;P&gt;WRITE: / v_waers, 'Zdmaplog not updated'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: v_lines, v_wrbtr, v_dmbtr, v_subrc.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_waers = it_data-waers.&lt;/P&gt;&lt;P&gt;v_lines = v_lines + 1.&lt;/P&gt;&lt;P&gt;IF it_data-shkzg = 'H'. "credit&lt;/P&gt;&lt;P&gt;v_wrbtr = v_wrbtr - it_data-wrbtr.&lt;/P&gt;&lt;P&gt;v_dmbtr = v_dmbtr - it_data-dmbtr.&lt;/P&gt;&lt;P&gt;ELSEIF it_data-shkzg = 'S'. "Debit&lt;/P&gt;&lt;P&gt;v_wrbtr = v_wrbtr + it_data-wrbtr.&lt;/P&gt;&lt;P&gt;v_dmbtr = v_dmbtr + it_data-dmbtr.&lt;/P&gt;&lt;P&gt;ENDIF.&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;&lt;/P&gt;&lt;P&gt;On Change of and INSERT dbtab are obsolete statements...&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please dont use it in ur Reports.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abhinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 10:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595594#M865872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-30T10:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595595#M865873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check sy-subrc eq 0. just after your each update statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if its not eq 0, update is getting failed.&lt;/P&gt;&lt;P&gt;this can happen it the record you want to update is locked by some other program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use lock object to remove such things.&lt;/P&gt;&lt;P&gt;create lock objects ( SE11) for the table/s you are using then use it in the program and update / modify your table in side enqueue-Dequeue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points it helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgs,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ashok Gupta on Mar 30, 2008 4:12 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 10:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595595#M865873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-30T10:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595596#M865874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for response, But the problem is its Control break statements At new, At end are not working. For which types fields we can use Control break statements in side loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with Insert is solved that is because of key fields in table definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz give the answer for Control break statements. I will reward full points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 08:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595596#M865874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T08:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595597#M865875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For working with control break statements like AT NEW, the field upon which u r working, should be the first field in that internal table.Otherwise it won't give the appropriate results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ur case, waers is not the first field in that IT, i suppose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually, we should have the field (which we r working with) as the first field in that structure &amp;amp; also the IT should be sorted by that field, prior to the operations with the control break statements (such as AT NEW).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u really want to work with those controlbreak statements, u create another IT with WEARS as the first field,sort it by WEARS, run a loop on that &amp;amp; use whatever commands u want. This time it surely works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this &amp;amp; let me know in case of any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forget to reward points,if this is useful.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 09:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595597#M865875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T09:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595598#M865876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While using AT NEW and AT END the field you are mentioning should be the first field in the table also do the same in the table declaration try this it may work out. and most importantly sort by the same field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 10:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595598#M865876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T10:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595599#M865877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Fren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you for rewarding....and ofcourse inspiring...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding usage of Control Break Statements..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP stores data internally like the Array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example... &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT NEW it_data-waers.
zdmaplog-dmdate = sy-datum.
zdmaplog-dmtime = sy-uzeit.
zdmaplog-dmtyp = 'D'.
zdmaplog-sbukrs = p_bukrs.
zdmaplog-tbukrs = p_bukrst.
zdmaplog-items = v_lines.
zdmaplog-wrbtr = v_wrbtr.
zdmaplog-dwaers = v_waers.
zdmaplog-dmbtr = v_dmbtr.
zdmaplog-lwaers = 'SGD'.
zdmaplog-userid = sy-uname.
ENDAT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will get stored in single array format internally...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above case, &lt;/P&gt;&lt;P&gt;the data will be stored as follows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-dmdate-dmtime-dmtyp-sbukrs-tbukrs-items-wrbtr-dwaers-dmbtr-lwaers-userid-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here, the data is stored in digital format... so &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW statement will compare the previous Array with the current record....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this case if u give &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT NEW dmdate&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it'll check for the change in ' dmdate ' field....and proceed as per the logic....&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Not necessary to be the first field...if u want the data in this format..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 Table_1-Field_A  Table_1-Field_B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__________________________1 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________2 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________3 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________4 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 Table_1-Field_A  Table_1-Field_B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__________________________1 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________2 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________3 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;__________________________4 Table_2-Field_A Table_2-Field_B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,                                                &lt;/P&gt;&lt;P&gt;if u give &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT NEW sbukrs&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it'll check for all the fields till  ' sbukrs ' ...i e &lt;STRONG&gt;-dmdate-dmtime- dmtyp-sbukrs-&lt;/STRONG&gt; if any one field changes AT NEW will be true...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mostly we use AT NEW on CHARACTER FIELD TYPES &amp;gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C N D T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inspire if needful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Warm Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abhi...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 16:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595599#M865877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T16:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting records into Custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595600#M865878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou Naga Pavan and Abaper007. I have rewarded you good points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 04:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-custom-table/m-p/3595600#M865878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T04:15:22Z</dc:date>
    </item>
  </channel>
</rss>

