<?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 Problems with table controls in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555405#M251578</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;I am trying to create table control TC1 (VBELN,POSNR and Matnr).Actually in PBO,we will be moving data from ITAB to Table Control.And &lt;/P&gt;&lt;P&gt;in PAI,we will be moving data to ITAB,which will be displayed on the table control.I created one screen with single field VBELN and table control with (VBELN,POSNR and Matnr) as fields and I also created 'DISPLAY' button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT. &lt;/P&gt;&lt;P&gt;MODULE ITAB. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB WITH CONTROL TC1. &lt;/P&gt;&lt;P&gt;MODULE BEFORE. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODULE AFTER. &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;MODULE AFTER INPUT. &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 'DISP'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN POSNR MATNR FROM VBAP INTO corresponding fields of TABLE ITAB WHERE VBELN = VBAK-VBELN. &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;ENDMODULE. " AFTER INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE BEFORE OUTPUT." BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING ITAB TO VBAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;MODULE ITAB OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 5 times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = sy-index. &lt;/P&gt;&lt;P&gt;*itab-posnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-matnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-no = sy-index. &lt;/P&gt;&lt;P&gt;append itab. &lt;/P&gt;&lt;P&gt;enddo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question what should be data initially in ITAB.My question is I filled data into ITAB(VBELN,POSNR and Matnr) in the MODULE ITAB.but when i am executing the Transaction code, the data intially present in the ITAB getting displayed on to the table control.After giving VBELN and pressing 'DISPLAY' button,then the records are getting replaced with fetched records based on the VBELN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is intially I dont want the data(ITAB data) to be displayed in the table control,when I execute the transaction code.I want only the records fetched based on the VBELN to be displayed on the table control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i tried fillling only filling the value ITAB-NO like the below code means.Remember table control TC1 contains only VBELN,POSNR and MATNR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE ITAB OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 5 times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = sy-index. &lt;/P&gt;&lt;P&gt;*itab-posnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-matnr = sy-index. &lt;/P&gt;&lt;P&gt;itab-no = sy-index. &lt;/P&gt;&lt;P&gt;append itab. &lt;/P&gt;&lt;P&gt;enddo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially I am getting no values on my table control but after giving VBELN and pressing DISPLAY button I am getting nothing onto the table control.Surprisingly when i debugged by giving /h ,in the PAI module &lt;/P&gt;&lt;P&gt;I am able to loop the internal table but it is not exectuting the 'MODULE AFTER(it is skipping that line)eventhough ITAB contains data.It is directly going to loop and endloop statements continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODULE AFTER. &lt;/P&gt;&lt;P&gt;ENDLOOP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one explain me in this problem.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2006 21:05:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-15T21:05:54Z</dc:date>
    <item>
      <title>Problems with table controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555405#M251578</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;I am trying to create table control TC1 (VBELN,POSNR and Matnr).Actually in PBO,we will be moving data from ITAB to Table Control.And &lt;/P&gt;&lt;P&gt;in PAI,we will be moving data to ITAB,which will be displayed on the table control.I created one screen with single field VBELN and table control with (VBELN,POSNR and Matnr) as fields and I also created 'DISPLAY' button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT. &lt;/P&gt;&lt;P&gt;MODULE ITAB. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB WITH CONTROL TC1. &lt;/P&gt;&lt;P&gt;MODULE BEFORE. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODULE AFTER. &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;MODULE AFTER INPUT. &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 'DISP'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN POSNR MATNR FROM VBAP INTO corresponding fields of TABLE ITAB WHERE VBELN = VBAK-VBELN. &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;ENDMODULE. " AFTER INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE BEFORE OUTPUT." BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING ITAB TO VBAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;MODULE ITAB OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 5 times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = sy-index. &lt;/P&gt;&lt;P&gt;*itab-posnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-matnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-no = sy-index. &lt;/P&gt;&lt;P&gt;append itab. &lt;/P&gt;&lt;P&gt;enddo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question what should be data initially in ITAB.My question is I filled data into ITAB(VBELN,POSNR and Matnr) in the MODULE ITAB.but when i am executing the Transaction code, the data intially present in the ITAB getting displayed on to the table control.After giving VBELN and pressing 'DISPLAY' button,then the records are getting replaced with fetched records based on the VBELN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is intially I dont want the data(ITAB data) to be displayed in the table control,when I execute the transaction code.I want only the records fetched based on the VBELN to be displayed on the table control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i tried fillling only filling the value ITAB-NO like the below code means.Remember table control TC1 contains only VBELN,POSNR and MATNR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE ITAB OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 5 times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = sy-index. &lt;/P&gt;&lt;P&gt;*itab-posnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-matnr = sy-index. &lt;/P&gt;&lt;P&gt;itab-no = sy-index. &lt;/P&gt;&lt;P&gt;append itab. &lt;/P&gt;&lt;P&gt;enddo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially I am getting no values on my table control but after giving VBELN and pressing DISPLAY button I am getting nothing onto the table control.Surprisingly when i debugged by giving /h ,in the PAI module &lt;/P&gt;&lt;P&gt;I am able to loop the internal table but it is not exectuting the 'MODULE AFTER(it is skipping that line)eventhough ITAB contains data.It is directly going to loop and endloop statements continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODULE AFTER. &lt;/P&gt;&lt;P&gt;ENDLOOP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one explain me in this problem.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2006 21:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555405#M251578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T21:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with table controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555406#M251579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is in the looping of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE AFTER.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 05:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555406#M251579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T05:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with table controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555407#M251580</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;PROCESS BEFORE OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE ITAB. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB WITH CONTROL TC1. &lt;/P&gt;&lt;P&gt;MODULE BEFORE. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT. &lt;/P&gt;&lt;P&gt;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODULE AFTER. &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;MODULE AFTER INPUT. &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 'DISP'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if ITAB is initial and VBAK-VBELN is not initial.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN POSNR MATNR FROM VBAP &lt;/P&gt;&lt;P&gt;INTO corresponding fields of TABLE ITAB &lt;/P&gt;&lt;P&gt;WHERE VBELN = VBAK-VBELN. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;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;ENDMODULE. " AFTER INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE BEFORE OUTPUT." BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING ITAB TO VBAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " BEFORE OUTPUT &lt;/P&gt;&lt;P&gt;MODULE ITAB OUTPUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 5 times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = sy-index. &lt;/P&gt;&lt;P&gt;*itab-posnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-matnr = sy-index. &lt;/P&gt;&lt;P&gt;*itab-no = sy-index. &lt;/P&gt;&lt;P&gt;append itab. &lt;/P&gt;&lt;P&gt;enddo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at the bold part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hklped mark points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anversha s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 05:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-table-controls/m-p/1555407#M251580</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-16T05:25:38Z</dc:date>
    </item>
  </channel>
</rss>

