<?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: calrify this regarding table control? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842541#M923884</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE CONTROL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; These are the screen elements used to display tabular data they can be called&lt;/P&gt;&lt;P&gt;as screen tables( like STEP LOOP).To use table control we have to create it on the screen using SCREEN PAINTER(SE51) and declare a control variable of TYPE TABLEVIEW using CONTROLS statement in the ABAP program. We have to use LOOP .. ENDLOOP statement in both PBO and PAI with or without AT int_table parameter. IF AT int_table parameter is not used than we have to place a MODULE call between the LOOP...ENDLOOP statement to fill the screen table rows from the ABAP program in PBO and program our own scrolling functions&lt;/P&gt;&lt;P&gt;using OK_CODE field.&lt;/P&gt;&lt;P&gt;Having a parallel loop(at screen table rows &amp;amp; int table rows) by using parameter &lt;/P&gt;&lt;P&gt;AT int_table makes the ABAP code simple.&lt;/P&gt;&lt;P&gt;A special structure of type CXTAB_CONTROL is used to set/get various&lt;/P&gt;&lt;P&gt;attributes of table control at runtime like CURRENT_LINE ,TOP_LINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABAP declaration&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CONTROLS: tab_con TYPE TABLEVIEW  USING SCREEN nnnn&lt;/P&gt;&lt;P&gt;  Here tab_con is the same name we used in screen for the table control.&lt;/P&gt;&lt;P&gt;This ABAP statement will declare a control variable that will be used to access&lt;/P&gt;&lt;P&gt;the table control ,  and set it's various attributes like number of fixed columns(tab_con-FIXED_COLS) ,total number of records it will display(tab_con-LINES).It is of type CXTAB_CONTROL and is a deep structure(structure containing structures).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REFRESH CONTROL  tab_con FROM SCREEN nnnn&lt;/P&gt;&lt;P&gt; This ABAP statement will initialize the table control on the screen nnnn to its initial values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PBO processing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In PBO we have to use the screen LOOP ...ENDLOOP statement , with or without&lt;/P&gt;&lt;P&gt;intenal table.&lt;/P&gt;&lt;P&gt;   LOOP WITH  CONTROL tab_con.&lt;/P&gt;&lt;P&gt;   MODULE fill_tab_con.&lt;/P&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt;Here a module should be called between the loop endloop statement to transfer&lt;/P&gt;&lt;P&gt;data from th ABAP program to the screen table through a structure.This module&lt;/P&gt;&lt;P&gt;should use the CURRENT_LINE attribute of the table control variable to get the&lt;/P&gt;&lt;P&gt;current screen table record index to read the data from the internal table into a work area.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;READ TABLE int_table INDEX tab_con-CURRENT_LINE&lt;/P&gt;&lt;P&gt;The record read will be placed in the header line of the internal table and will be available to the similarly named  screen fields or if these are different it can be written explicitly. e.g.&lt;/P&gt;&lt;P&gt;screen_field_name = int_table-field_name&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;   LOOP AT int_table INTO workarea WITH CONTROL tab_con CURSOR i FROM  &lt;/P&gt;&lt;P&gt;   n1 TO n2.&lt;/P&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here the module call is not required to fill the screen table.The CURSOR parameter is a integer of type I indicating which absolute internal table line&lt;/P&gt;&lt;P&gt;should be the first to display on the table control .FROM n1 TO n2 can be used&lt;/P&gt;&lt;P&gt;to restrict the starting line and ending line number of the internal table , they are of type SY-TABIX.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In both cases before the LOOP statement a module should be called which&lt;/P&gt;&lt;P&gt;is generally for setting of status ,in which we should fill the LINES attribute&lt;/P&gt;&lt;P&gt;(tab_con-LINES ) of the control with the total number of internal table records,doing this ensures correct and automatic scrolling.&lt;/P&gt;&lt;P&gt;The ABAP statement DESCRIBE TABLE int_table LINES lines can be used&lt;/P&gt;&lt;P&gt;to get the total lines in an int table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PAI Processing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; We have to use LOOP ... ENDLOOP in PAI so that data can transfer fro table control to ABAP program. If we want to write changes to the data we should&lt;/P&gt;&lt;P&gt;call a module between the LOOP ... ENDLOOP. The MODULE call to process user commands (SY-UCOM) should be called after the ENDLOOP statement.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT&lt;/P&gt;&lt;P&gt;MODULE mod AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;LOOP AT itab_table   or LOOP "depending on whether we are using AT int_table&lt;/P&gt;&lt;P&gt;MODULE modify_int_table.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;MODULE user_command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In the MODULE call modify_int_table we can use&lt;/P&gt;&lt;P&gt;MODIFY int_table FROM workarea INDEX tab_con-CURRENT_LINE&lt;/P&gt;&lt;P&gt;or we can use&lt;/P&gt;&lt;P&gt;int_table-field_name = screen_field_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps to create a table control is given in this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.aol.com/skarkada/sap/table_control/table_control.htm" target="test_blank"&gt;http://members.aol.com/skarkada/sap/table_control/table_control.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2008 04:47:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-19T04:47:09Z</dc:date>
    <item>
      <title>calrify this regarding table control?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842540#M923883</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 dealing with table control we must create global structure for that table control or we define structure using types or is there any other way of defining the table control structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&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; Include ZSS_TABTOP                                        Module Pool      ZSS_TABSTRIP&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;PROGRAM  ZSS_TABSTRIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS: ZSUB1 TYPE TABLEVIEW USING SCREEN '2441',&lt;/P&gt;&lt;P&gt;          SUB2  TYPE TABLEVIEW USING SCREEN '2442',&lt;/P&gt;&lt;P&gt;          TABLE_TABSTRIP TYPE TABLEVIEW USING SCREEN '2444',&lt;/P&gt;&lt;P&gt;          ZSS_TABSTRIP   TYPE TABSTRIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF S_VBAK,&lt;/P&gt;&lt;P&gt;       VBELN  TYPE VBAK-VBELN,&lt;/P&gt;&lt;P&gt;       ERDAT  TYPE VBAK-ERDAT,&lt;/P&gt;&lt;P&gt;       ERZET  TYPE VBAK-ERZET,&lt;/P&gt;&lt;P&gt;       ERNAM  TYPE VBAK-ERNAM,&lt;/P&gt;&lt;P&gt;       AUDAT  TYPE VBAK-AUDAT,&lt;/P&gt;&lt;P&gt;       VBTYP  TYPE VBAK-VBTYP,&lt;/P&gt;&lt;P&gt;       NETWR  TYPE VBAK-NETWR,&lt;/P&gt;&lt;P&gt;       WAERK  TYPE VBAK-WAERK,&lt;/P&gt;&lt;P&gt;       END OF S_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF S_VBAP,&lt;/P&gt;&lt;P&gt;       VBELN  TYPE  VBAP-VBELN,&lt;/P&gt;&lt;P&gt;       POSNR  TYPE  VBAP-POSNR,&lt;/P&gt;&lt;P&gt;       MATNR  TYPE  VBAP-MATNR,&lt;/P&gt;&lt;P&gt;       NETWR  TYPE  VBAP-NETWR,&lt;/P&gt;&lt;P&gt;       WAERK  TYPE  VBAP-WAERK,&lt;/P&gt;&lt;P&gt;       NTGEW  TYPE  VBAP-NTGEW,&lt;/P&gt;&lt;P&gt;       GEWEI  TYPE  VBAP-GEWEI,&lt;/P&gt;&lt;P&gt;       ERDAT  TYPE  VBAP-ERDAT,&lt;/P&gt;&lt;P&gt;       ERNAM  TYPE  VBAP-ERNAM,&lt;/P&gt;&lt;P&gt;       NETPR  TYPE  VBAP-NETPR,&lt;/P&gt;&lt;P&gt;       KPEIN  TYPE  VBAP-KPEIN,&lt;/P&gt;&lt;P&gt;       END OF S_VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: I_VBAK TYPE TABLE OF  S_VBAK,&lt;/P&gt;&lt;P&gt;      I_VBAP TYPE TABLE OF  S_VBAP,&lt;/P&gt;&lt;P&gt;      W_VBAK TYPE S_VBAK,&lt;/P&gt;&lt;P&gt;      W_VBAP TYPE S_VBAP,&lt;/P&gt;&lt;P&gt;      OK_CODE TYPE SY-UCOMM,&lt;/P&gt;&lt;P&gt;      G_LINES TYPE I,&lt;/P&gt;&lt;P&gt;      H_LINES TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I WANT TO DISPLAY THESE INTERNAL TABLE DATA IN TABLE PLZ PROVIDE FURTER CODE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 04:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842540#M923883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T04:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: calrify this regarding table control?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842541#M923884</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE CONTROL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; These are the screen elements used to display tabular data they can be called&lt;/P&gt;&lt;P&gt;as screen tables( like STEP LOOP).To use table control we have to create it on the screen using SCREEN PAINTER(SE51) and declare a control variable of TYPE TABLEVIEW using CONTROLS statement in the ABAP program. We have to use LOOP .. ENDLOOP statement in both PBO and PAI with or without AT int_table parameter. IF AT int_table parameter is not used than we have to place a MODULE call between the LOOP...ENDLOOP statement to fill the screen table rows from the ABAP program in PBO and program our own scrolling functions&lt;/P&gt;&lt;P&gt;using OK_CODE field.&lt;/P&gt;&lt;P&gt;Having a parallel loop(at screen table rows &amp;amp; int table rows) by using parameter &lt;/P&gt;&lt;P&gt;AT int_table makes the ABAP code simple.&lt;/P&gt;&lt;P&gt;A special structure of type CXTAB_CONTROL is used to set/get various&lt;/P&gt;&lt;P&gt;attributes of table control at runtime like CURRENT_LINE ,TOP_LINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABAP declaration&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CONTROLS: tab_con TYPE TABLEVIEW  USING SCREEN nnnn&lt;/P&gt;&lt;P&gt;  Here tab_con is the same name we used in screen for the table control.&lt;/P&gt;&lt;P&gt;This ABAP statement will declare a control variable that will be used to access&lt;/P&gt;&lt;P&gt;the table control ,  and set it's various attributes like number of fixed columns(tab_con-FIXED_COLS) ,total number of records it will display(tab_con-LINES).It is of type CXTAB_CONTROL and is a deep structure(structure containing structures).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REFRESH CONTROL  tab_con FROM SCREEN nnnn&lt;/P&gt;&lt;P&gt; This ABAP statement will initialize the table control on the screen nnnn to its initial values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PBO processing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In PBO we have to use the screen LOOP ...ENDLOOP statement , with or without&lt;/P&gt;&lt;P&gt;intenal table.&lt;/P&gt;&lt;P&gt;   LOOP WITH  CONTROL tab_con.&lt;/P&gt;&lt;P&gt;   MODULE fill_tab_con.&lt;/P&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt;Here a module should be called between the loop endloop statement to transfer&lt;/P&gt;&lt;P&gt;data from th ABAP program to the screen table through a structure.This module&lt;/P&gt;&lt;P&gt;should use the CURRENT_LINE attribute of the table control variable to get the&lt;/P&gt;&lt;P&gt;current screen table record index to read the data from the internal table into a work area.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;READ TABLE int_table INDEX tab_con-CURRENT_LINE&lt;/P&gt;&lt;P&gt;The record read will be placed in the header line of the internal table and will be available to the similarly named  screen fields or if these are different it can be written explicitly. e.g.&lt;/P&gt;&lt;P&gt;screen_field_name = int_table-field_name&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;   LOOP AT int_table INTO workarea WITH CONTROL tab_con CURSOR i FROM  &lt;/P&gt;&lt;P&gt;   n1 TO n2.&lt;/P&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here the module call is not required to fill the screen table.The CURSOR parameter is a integer of type I indicating which absolute internal table line&lt;/P&gt;&lt;P&gt;should be the first to display on the table control .FROM n1 TO n2 can be used&lt;/P&gt;&lt;P&gt;to restrict the starting line and ending line number of the internal table , they are of type SY-TABIX.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In both cases before the LOOP statement a module should be called which&lt;/P&gt;&lt;P&gt;is generally for setting of status ,in which we should fill the LINES attribute&lt;/P&gt;&lt;P&gt;(tab_con-LINES ) of the control with the total number of internal table records,doing this ensures correct and automatic scrolling.&lt;/P&gt;&lt;P&gt;The ABAP statement DESCRIBE TABLE int_table LINES lines can be used&lt;/P&gt;&lt;P&gt;to get the total lines in an int table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PAI Processing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; We have to use LOOP ... ENDLOOP in PAI so that data can transfer fro table control to ABAP program. If we want to write changes to the data we should&lt;/P&gt;&lt;P&gt;call a module between the LOOP ... ENDLOOP. The MODULE call to process user commands (SY-UCOM) should be called after the ENDLOOP statement.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT&lt;/P&gt;&lt;P&gt;MODULE mod AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;LOOP AT itab_table   or LOOP "depending on whether we are using AT int_table&lt;/P&gt;&lt;P&gt;MODULE modify_int_table.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;MODULE user_command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In the MODULE call modify_int_table we can use&lt;/P&gt;&lt;P&gt;MODIFY int_table FROM workarea INDEX tab_con-CURRENT_LINE&lt;/P&gt;&lt;P&gt;or we can use&lt;/P&gt;&lt;P&gt;int_table-field_name = screen_field_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps to create a table control is given in this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.aol.com/skarkada/sap/table_control/table_control.htm" target="test_blank"&gt;http://members.aol.com/skarkada/sap/table_control/table_control.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 04:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842541#M923884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T04:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: calrify this regarding table control?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842542#M923885</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;there is no other way to declare your internal table only the two ways as you mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you are using table control you must use loop statement in PBO and PAI events so use interanl; table with implicit header line. it will be more useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : i_vbak type table of ty_vbak with header line,&lt;/P&gt;&lt;P&gt;         i_vbap type table of ty_vbap with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for displaying in the pbo of your screen where you used table control &lt;/P&gt;&lt;P&gt;use the following statement&lt;/P&gt;&lt;P&gt;then use the following&lt;/P&gt;&lt;P&gt;move-corresponding i_vbak to vbak.&lt;/P&gt;&lt;P&gt;move corresponding i_vbap to vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where i_vbak, i_vbap are your work areas(program) and vbak and vbap are screen work areas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.aol.com/skarkada/sap/table_control/table_control.htm" target="test_blank"&gt;http://members.aol.com/skarkada/sap/table_control/table_control.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 04:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calrify-this-regarding-table-control/m-p/3842542#M923885</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-19T04:47:41Z</dc:date>
    </item>
  </channel>
</rss>

