<?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: Error when inserting or changing in a sorted table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644163#M1666020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am still getting a new error as follow after changing my stmt to &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;INSERT r_user INTO i_user&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;the error is as follow:&lt;/P&gt;&lt;P&gt;You attempted to change, delete or create a row in the&lt;/P&gt;&lt;P&gt;internal table "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER", but no&lt;/P&gt;&lt;P&gt;&amp;nbsp; valid cursor exists&lt;/P&gt;&lt;P&gt;for the table.&lt;/P&gt;&lt;P&gt;Error in an ABAP/4 statement when processing an internal table. &lt;/P&gt;&lt;P&gt;Possible reasons:&lt;/P&gt;&lt;P&gt;1. The relevent ABAP language command does not include the addition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "...INDEX...", although the statement is not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt;2. In the body of a loop started with "LOOP ... USING KEY ...", an ABAP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statement has been issued with an implicit index specification. This&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is only permitted in connection with the "USING KEY loop_key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; addition and applies to the "DELETE itab" and "MODIFY itab"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statements.&lt;/P&gt;&lt;P&gt;3. The relevent ABAP language command statement was called from within a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "LOOP...ENDLOOP" loop after a DELETE&lt;/P&gt;&lt;P&gt;&amp;nbsp; "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 06:45:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-03-15T06:45:49Z</dc:date>
    <item>
      <title>Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644152#M1666009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Hi Experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;I am getting error as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Error when inserting or changing in a sorted table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;A line is to be inserted or changed at position 3 in the sorted&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;internal table (type SORTED_TABLE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER".&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;In doing so, the sorting sequence - determined by the table key - was&lt;/SPAN&gt;&lt;/P&gt;&lt;OL start="1" style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;destroyed.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Error Program is as follow:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 693&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLEAR r_final1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 694&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REFRESH: i_final1, i_sum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 695&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 696&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-bukrs = r_bkpf-bukrs.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Company code&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 697&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-belnr = r_bkpf-belnr.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Accounting Document Number&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 698&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-gjahr = r_bkpf-gjahr.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Fiscal Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 699&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-usnam = r_bkpf-usnam.&amp;nbsp;&amp;nbsp;&amp;nbsp; "User Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 700&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-budat = r_bkpf-budat.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Posting date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "+RT25298&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 701&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-cpudt = r_bkpf-cpudt.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Accounting Document Entry Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 702&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-bldat = r_bkpf-bldat.&amp;nbsp;&amp;nbsp;&amp;nbsp; "Document Date in Document&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 703&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 704 *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get the user name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 705&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLEAR r_user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 706&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ TABLE i_user INTO r_user WITH KEY usnam = r_bkpf-usnam.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 707&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 708&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF sy-subrc NE 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 709 *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Look up the user name that goes with ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 710&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FUNCTION 'SUSR_USER_ADDRESS_READ'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 711&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 712&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = r_final1-usnam&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 713&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 714&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_usr03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = r_user_usr03&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 715&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 716&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_address_not_found = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 717&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 718&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; 719&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF sy-subrc = 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;720&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_user-usnam = r_bkpf-usnam.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;721&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONCATENATE r_user_usr03-name1 r_user_usr03-name2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;722&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO r_user-name SEPARATED BY space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT r_user INTO i_user INDEX sy-tabix.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;724&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;725&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;726&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;727 *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assign User Name into dummy final table&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;728&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-name1 = r_user-name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;729&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;730&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLEAR : r_bseg.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;731 *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process the line items for the document&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;732&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP AT i_bseg INTO r_bseg&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;733&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE bukrs = r_bkpf-bukrs&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;734&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND belnr = r_bkpf-belnr&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;735&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND gjahr = r_bkpf-gjahr.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;736&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;737 *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move fields to output&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;738&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r_final1-hkont = r_bseg-hkont.&amp;nbsp;&amp;nbsp; "General Ledger Account&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Please provide me with a solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin-bottom: 12.55pt; margin-top: auto;"&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Vikas.&lt;/SPAN&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 13:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644152#M1666009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-14T13:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644153#M1666010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moved to the ABAP Development space, where Discussions/Forums about ABAP are located.&lt;/P&gt;&lt;P&gt;Audrey, SCN Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 23:04:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644153#M1666010</guid>
      <dc:creator>audreystevenson</dc:creator>
      <dc:date>2012-03-14T23:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644154#M1666011</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;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; INSERT r_user INTO TABLE i_user. "No index - sorted means always in sorted order&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;READ TABLE i_user INTO r_user WITH TABLE KEY usnam = r_bkpf-usnam."increase speed using index&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Clemens&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 23:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644154#M1666011</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2012-03-14T23:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644155#M1666012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I_USER is defined as a sorted table, then a non-catchable exception will occur if a line to be inserted would disrupt the sort order of the table. I suppose this is what happens here. So the program must be changed to insert the new entry at the correct position according to the sort order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 23:35:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644155#M1666012</guid>
      <dc:creator>Tamas_Hoznek</dc:creator>
      <dc:date>2012-03-14T23:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644156#M1666013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;where to discuss the new SCN surface?&lt;/P&gt;&lt;P&gt;- need Style ABAP code&lt;/P&gt;&lt;P&gt;- need setting for line space&lt;/P&gt;&lt;P&gt;- need help features&lt;/P&gt;&lt;P&gt;Regards Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 23:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644156#M1666013</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2012-03-14T23:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644157#M1666014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clemens has provided the solution. Basically your statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; INSERT r_user INTO i_user INDEX sy-tabix.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;is trying to put an entry into position 3(sy-tabix must have a value of 3) but in doing this it will then contradict the sort order you have got in the definition of i_user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;Changing the insert to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt; INSERT r_user INTO i_user INDEX.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;will let the sytem determine where the new entry goes.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 23:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644157#M1666014</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2012-03-14T23:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644158#M1666015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For Sorted Tables no need to specify Index Number , as the new record will be inserted at corresponding location based on its content because inserting a new record will change Sort Sequence,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravindra.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 04:40:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644158#M1666015</guid>
      <dc:creator>chundru_ravindra</dc:creator>
      <dc:date>2012-03-15T04:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644159#M1666016</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 Clemens, Neil and Chundru had said, you must not use index for a sorted table unless you are sure the index position which you are giving will not affect the order of the sorted table. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644159#M1666016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644160#M1666017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am still getting a new error as follow after changing my stmt to &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;INSERT r_user INTO i_user&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;the error is as follow:&lt;/P&gt;&lt;P&gt; You attempted to change, delete or create a row in the&lt;/P&gt;&lt;P&gt; internal table "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER", but no&lt;/P&gt;&lt;P&gt;&amp;nbsp; valid cursor exists&lt;/P&gt;&lt;P&gt; for the table.&lt;/P&gt;&lt;P&gt;Error in an ABAP/4 statement when processing an internal table. &lt;/P&gt;&lt;P&gt;Possible reasons:&lt;/P&gt;&lt;P&gt; 1. The relevent ABAP language command does not include the addition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "...INDEX...", although the statement is not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt; 2. In the body of a loop started with "LOOP ... USING KEY ...", an ABAP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statement has been issued with an implicit index specification. This&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is only permitted in connection with the "USING KEY loop_key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; addition and applies to the "DELETE itab" and "MODIFY itab"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statements.&lt;/P&gt;&lt;P&gt; 3. The relevent ABAP language command statement was called from within a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "LOOP...ENDLOOP" loop after a DELETE&lt;/P&gt;&lt;P&gt;&amp;nbsp; "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644160#M1666017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644161#M1666018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the efforts...but this solution is not working.Am getting another dump.i had updated it down the discussion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644161#M1666018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644162#M1666019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am still getting a new error as follow after changing my stmt to &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;INSERT r_user INTO i_user&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;the error is as follow:&lt;/P&gt;&lt;P&gt;You attempted to change, delete or create a row in the&lt;/P&gt;&lt;P&gt;internal table "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER", but no&lt;/P&gt;&lt;P&gt;&amp;nbsp; valid cursor exists&lt;/P&gt;&lt;P&gt;for the table.&lt;/P&gt;&lt;P&gt;Error in an ABAP/4 statement when processing an internal table. &lt;/P&gt;&lt;P&gt;Possible reasons:&lt;/P&gt;&lt;P&gt;1. The relevent ABAP language command does not include the addition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "...INDEX...", although the statement is not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt;2. In the body of a loop started with "LOOP ... USING KEY ...", an ABAP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statement has been issued with an implicit index specification. This&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is only permitted in connection with the "USING KEY loop_key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; addition and applies to the "DELETE itab" and "MODIFY itab"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statements.&lt;/P&gt;&lt;P&gt;3. The relevent ABAP language command statement was called from within a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "LOOP...ENDLOOP" loop after a DELETE&lt;/P&gt;&lt;P&gt;&amp;nbsp; "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:45:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644162#M1666019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644163#M1666020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am still getting a new error as follow after changing my stmt to &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-size: 10pt; color: #333333; font-family: 'Arial','sans-serif';"&gt;INSERT r_user INTO i_user&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;the error is as follow:&lt;/P&gt;&lt;P&gt;You attempted to change, delete or create a row in the&lt;/P&gt;&lt;P&gt;internal table "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER", but no&lt;/P&gt;&lt;P&gt;&amp;nbsp; valid cursor exists&lt;/P&gt;&lt;P&gt;for the table.&lt;/P&gt;&lt;P&gt;Error in an ABAP/4 statement when processing an internal table. &lt;/P&gt;&lt;P&gt;Possible reasons:&lt;/P&gt;&lt;P&gt;1. The relevent ABAP language command does not include the addition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "...INDEX...", although the statement is not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt;2. In the body of a loop started with "LOOP ... USING KEY ...", an ABAP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statement has been issued with an implicit index specification. This&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is only permitted in connection with the "USING KEY loop_key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; addition and applies to the "DELETE itab" and "MODIFY itab"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statements.&lt;/P&gt;&lt;P&gt;3. The relevent ABAP language command statement was called from within a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "LOOP...ENDLOOP" loop after a DELETE&lt;/P&gt;&lt;P&gt;&amp;nbsp; "\PROGRAM=ZGLFINGLRX_MANUAL_JOURNALAUDIT\DATA=I_USER".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644163#M1666020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644164#M1666021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have declared the table with unique key then, may be its trying to insert a record with same key value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 06:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644164#M1666021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T06:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644165#M1666022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Use the statement "INSERT r_user INTO TABLE i_user." In your Insert statement TABLE is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 07:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644165#M1666022</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2012-03-15T07:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644166#M1666023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bala Krishna is right. Insert statement syntax is wrong, Table keyword missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 08:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644166#M1666023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T08:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644167#M1666024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikas,&lt;/P&gt;&lt;P&gt;Just check you SY-TABIX value when you are inserting record into the table. You read an internal table after that calling a function module , then concatenating values, and then finally inserting record. In between&amp;nbsp; think that sy-index is getting changed to a number that is beyond the number of records into the internal table.&lt;/P&gt;&lt;P&gt;Try to get SY-TABIX into a local variable just after you read the table, after that use that local variable as an index value while inserting record.&lt;/P&gt;&lt;P&gt;Please check this and let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 08:57:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644167#M1666024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T08:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644168#M1666025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its working.Thanks a lot for your valuable contribution ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 10:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644168#M1666025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T10:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644169#M1666026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vikas,&lt;/P&gt;&lt;P&gt;all readers are happy, if you&lt;/P&gt;&lt;P&gt;- let us know the solution that worked for you&lt;/P&gt;&lt;P&gt;- close the thread as "solved"&lt;/P&gt;&lt;P&gt;- mark answers as helpful/solved&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 11:16:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644169#M1666026</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2012-03-15T11:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error when inserting or changing in a sorted table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644170#M1666027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use append to add to a sorted table.&amp;nbsp; SAP will put the record into the correct sequence.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 11:55:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-inserting-or-changing-in-a-sorted-table/m-p/8644170#M1666027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-15T11:55:38Z</dc:date>
    </item>
  </channel>
</rss>

