<?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: How to process internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853954#M361317</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;  check this sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***Create a global variable for storing the current index that is getting displayed..&lt;/P&gt;&lt;P&gt;***I am assuming V_CURRENT_INDEX TYPE SYINDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHEN 'NEXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INcrement the index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    V_CURRENT_INDEX = V_CURRENT_INDEX + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF V_CURRENT_INDEX  &amp;gt; SY-TFILL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the current index is greater than the number of rows.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set the sy-tfill.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      V_CURRENT_INDEX = SY-TFILL.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'Last record reached'.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the internal table with the current index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the values to the screen variables from the header line of ITAB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHEN 'PREV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Decrement the counter.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    V_CURRENT_INDEX = V_CURRENT_INDEX - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF V_CURRENT_INDEX  &amp;lt;  0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the current index is Lesser than zero set 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      V_CURRENT_INDEX = 1.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'First record reached'.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the internal table with the current index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the values to the screen variables from the header line of ITAB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jan 2007 23:40:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-31T23:40:55Z</dc:date>
    <item>
      <title>How to process internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853953#M361316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends/experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My case is:&lt;/P&gt;&lt;P&gt;1. A dialog screen 100 to display/ update some fields of an internal table itab, Records are processed one by one on the screen&lt;/P&gt;&lt;P&gt;2. Need UPDATE, DELETE, PREV. NEXT buttons to process records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made the screen with fields and buttons. What I like to know is how to code DELETE, PREV. and NEXT buttons. Could you kindly provide a sample to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 23:30:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853953#M361316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T23:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to process internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853954#M361317</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;  check this sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***Create a global variable for storing the current index that is getting displayed..&lt;/P&gt;&lt;P&gt;***I am assuming V_CURRENT_INDEX TYPE SYINDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHEN 'NEXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INcrement the index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    V_CURRENT_INDEX = V_CURRENT_INDEX + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF V_CURRENT_INDEX  &amp;gt; SY-TFILL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the current index is greater than the number of rows.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set the sy-tfill.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      V_CURRENT_INDEX = SY-TFILL.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'Last record reached'.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the internal table with the current index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the values to the screen variables from the header line of ITAB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHEN 'PREV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Decrement the counter.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    V_CURRENT_INDEX = V_CURRENT_INDEX - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF V_CURRENT_INDEX  &amp;lt;  0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the current index is Lesser than zero set 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      V_CURRENT_INDEX = 1.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'First record reached'.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the internal table with the current index.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the values to the screen variables from the header line of ITAB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 23:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853954#M361317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T23:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to process internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853955#M361318</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;Check this for delete logic..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Get the number of rows..&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-TFILL = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**delete the record. &lt;/P&gt;&lt;P&gt;   DELETE ITAB INDEX 1.&lt;/P&gt;&lt;P&gt;    MESSAGE S208(00) WITH 'All records deleted'.&lt;/P&gt;&lt;P&gt;    LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Delete the record and decrement the index.&lt;/P&gt;&lt;P&gt;  DELETE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt;  MESSAGE S208(00) WITH 'Record deleted'.&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;Decrement the counter.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  V_CURRENT_INDEX = V_CURRENT - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE ITAB INDEX V_CURRENT_INDEX.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;***Move the values from ITAB header line to screen work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 23:58:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-process-internal-table/m-p/1853955#M361318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T23:58:13Z</dc:date>
    </item>
  </channel>
</rss>

