<?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: help need in code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504695#M233323</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;You need to call the FM SCROLLING_IN_TABLE for scrolling. You need to call it in the tc_table_user_command of the screen. Capture the ok_code and call the FM accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    call function 'SCROLLING_IN_TABLE'
         exporting
              entry_act             = tc_table-top_line
              entry_from            = 1
              entry_to              = tc_table-lines
              last_page_full        = 'X'
              loops                 = v_tc_table_lines
              ok_code               = 'P+' "This is for scrolling down
              overlapping           = 'X'
         importing
              entry_new             = l_tc_new_top_line
         exceptions
              NO_ENTRY_OR_PAGE_ACT  = 01
              NO_ENTRY_TO           = 02
              NO_OK_CODE_OR_PAGE_GO = 03
              others                = 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call this FM in a form with ok_code as parameter to handle all page up(P-), page down(P&lt;EM&gt;), first page(P--) and last page(P&lt;/EM&gt;+)&lt;/P&gt;&lt;P&gt;This will give the new top line and retain the data (ie first record)in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Richa Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Aug 2006 14:27:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-23T14:27:21Z</dc:date>
    <item>
      <title>help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504693#M233321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Good morning all&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;module no_lines.------1&lt;/P&gt;&lt;P&gt; MODULE STATUS_9100.&lt;/P&gt;&lt;P&gt;  loop at itab  with control&lt;/P&gt;&lt;P&gt;          table_control cursor table_control-current_line.&lt;/P&gt;&lt;P&gt;   module get_data.----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)data li_lines type i.&lt;/P&gt;&lt;P&gt;describe table itab lines li_lines.&lt;/P&gt;&lt;P&gt;table_control-lines = table_control-lines + 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;zabc-matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;zbac-maktx = itab-maktx.&lt;/P&gt;&lt;P&gt;I when i first go into the screen 9100 my&lt;/P&gt;&lt;P&gt;table_control-top_line =1&lt;/P&gt;&lt;P&gt;table_control-current_line = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i fill the data in the table control which can upto 12 records and hit enter then&lt;/P&gt;&lt;P&gt;table_control-top_line =1&lt;/P&gt;&lt;P&gt;table_control-current_line = 1.&lt;/P&gt;&lt;P&gt;the current_line goes from 1 to 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i drag the the vertical bar then&lt;/P&gt;&lt;P&gt;table_control-top_line =2&lt;/P&gt;&lt;P&gt;table_control-current_line = 2.&lt;/P&gt;&lt;P&gt;the current_line goes from 2 to 13&lt;/P&gt;&lt;P&gt;now my internal table has 12 records ,but since the current_line is initially 2 the data from second record of internal table itab is moved into table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my table control has 11 starting with the second record of internal table and an empty row at the bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am losing the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need all the records with an empty rows at the bottom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 13:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504693#M233321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-23T13:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504694#M233322</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;Declare &lt;/P&gt;&lt;P&gt;data: v_tc_table_lines  like sy-loopc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;and in PBO&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;module no_lines.------1&lt;/P&gt;&lt;P&gt;1)data li_lines type i.&lt;/P&gt;&lt;P&gt;describe table itab lines li_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;No need for this line...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;table_control-lines = table_control-lines + 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module get_data.----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;2 write the following code.&lt;/P&gt;&lt;P&gt; v_tc_table_lines = sy-loopc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;In PAI&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at IT_table.&lt;/P&gt;&lt;P&gt;    chain.&lt;/P&gt;&lt;P&gt;      field X_table-field1.&lt;/P&gt;&lt;P&gt;      field X_table-field2&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;      module TC_table_modify on chain-request.&lt;/P&gt;&lt;P&gt;    endchain.&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;In program.&lt;/P&gt;&lt;P&gt;module TC_table_modify &lt;/P&gt;&lt;P&gt;    modify it_table&lt;/P&gt;&lt;P&gt;      from x_table&lt;/P&gt;&lt;P&gt;      index tc_table-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in PAI, the data from the table control gets looped and modified in the table(or you can append this data). and in PBO, the data from the internal table is get looped and the table control is filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 14:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504694#M233322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-23T14:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504695#M233323</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;You need to call the FM SCROLLING_IN_TABLE for scrolling. You need to call it in the tc_table_user_command of the screen. Capture the ok_code and call the FM accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    call function 'SCROLLING_IN_TABLE'
         exporting
              entry_act             = tc_table-top_line
              entry_from            = 1
              entry_to              = tc_table-lines
              last_page_full        = 'X'
              loops                 = v_tc_table_lines
              ok_code               = 'P+' "This is for scrolling down
              overlapping           = 'X'
         importing
              entry_new             = l_tc_new_top_line
         exceptions
              NO_ENTRY_OR_PAGE_ACT  = 01
              NO_ENTRY_TO           = 02
              NO_OK_CODE_OR_PAGE_GO = 03
              others                = 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call this FM in a form with ok_code as parameter to handle all page up(P-), page down(P&lt;EM&gt;), first page(P--) and last page(P&lt;/EM&gt;+)&lt;/P&gt;&lt;P&gt;This will give the new top line and retain the data (ie first record)in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Richa Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 14:27:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504695#M233323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-23T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504696#M233324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi richa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you send me your email id so that i can send you my code because i tried both your ways but it doesn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table control top line &lt;/P&gt;&lt;P&gt;and table control current  because when i scroll down my  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table control top line and current line  is not 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;waiting for your reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 17:31:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504696#M233324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-23T17:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504697#M233325</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;my id is richa_singh_81@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 09:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504697#M233325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504698#M233326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi any advice on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 14:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504698#M233326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T14:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: help need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504699#M233327</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;has anybody faced a similar problem pls do let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 14:55:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-in-code/m-p/1504699#M233327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T14:55:11Z</dc:date>
    </item>
  </channel>
</rss>

