<?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: retrieve dara from application server to internal table based on selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793287#M651790</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;First get all the data into an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;datasetname&amp;gt;FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; File not found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE e139.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Read each line from the dataset and append to an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;*-- Read dataset and pass it to an internal table.&lt;/P&gt;&lt;P&gt;      READ DATASET &amp;lt;datasetname&amp;gt;INTO lwa_input.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        APPEND lwa_input TO i_input1.&lt;/P&gt;&lt;P&gt;        CLEAR lwa_input.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;*-- Close Dataset .&lt;/P&gt;&lt;P&gt;    CLOSE DATASET p_lv_dsn.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;Now all the data u will get in the internal table i_input1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at i_input1 into lwa_input1 where ebeln in s_ebeln and matnr in s_matnr..&lt;/P&gt;&lt;P&gt;append lwa_input1 to i_final.&lt;/P&gt;&lt;P&gt;clear lwa_input1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 11:22:31 GMT</pubDate>
    <dc:creator>former_member404244</dc:creator>
    <dc:date>2007-09-04T11:22:31Z</dc:date>
    <item>
      <title>retrieve dara from application server to internal table based on selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793284#M651787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to retrieve the data from application server to internal table &lt;/P&gt;&lt;P&gt;On the basis of selection screen fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_ebeln for ekpo-ebeln.&lt;/P&gt;&lt;P&gt;S_matnr for ekpo-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I want to take the data from application server to internal table where &lt;/P&gt;&lt;P&gt;Ebeln in s_ebeln and matnr in s_matnr range&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sureshkumar D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 11:09:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793284#M651787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T11:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve dara from application server to internal table based on selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793285#M651788</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;Following are the steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET ....&lt;/P&gt;&lt;P&gt;TRANSFER into ITAB....&lt;/P&gt;&lt;P&gt;CLOSE DATASET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab where ebeln in s_ebeln and matnr in s_matnr.&lt;/P&gt;&lt;P&gt;append itab to i_final.&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;I_FINAL will have the required data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 11:11:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793285#M651788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T11:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve dara from application server to internal table based on selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793286#M651789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to get all the data from the application server into an internal table, then you can delete the data where the data is not equal to the selection screen values,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the example Program&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF i_tab OCCURS 0,        
           text(100),     
         END OF i_tab,      
gv_dataset1(30) VALUE &amp;#146;/temp/testfile.txt&amp;#146;.

OPEN DATASET gv_dataset1 FOR INPUT IN TEXT MODE.  
 DO.     
IF SY-SUBRC &amp;lt;&amp;gt; 0.    
   EXIT.     
ENDIF.    
 READ DATASET gv_dataset1 INTO i_tab.     
APPEND i_tab.     
CLEAR i_tab.  
 ENDDO. 
" Here loop the internal table then delete the records which are not equal to the Selection screen vlaues
CLOSE DATASET gv_dataset1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 11:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793286#M651789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T11:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve dara from application server to internal table based on selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793287#M651790</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;First get all the data into an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;datasetname&amp;gt;FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; File not found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE e139.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Read each line from the dataset and append to an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;*-- Read dataset and pass it to an internal table.&lt;/P&gt;&lt;P&gt;      READ DATASET &amp;lt;datasetname&amp;gt;INTO lwa_input.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        APPEND lwa_input TO i_input1.&lt;/P&gt;&lt;P&gt;        CLEAR lwa_input.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;*-- Close Dataset .&lt;/P&gt;&lt;P&gt;    CLOSE DATASET p_lv_dsn.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;Now all the data u will get in the internal table i_input1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at i_input1 into lwa_input1 where ebeln in s_ebeln and matnr in s_matnr..&lt;/P&gt;&lt;P&gt;append lwa_input1 to i_final.&lt;/P&gt;&lt;P&gt;clear lwa_input1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 11:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-dara-from-application-server-to-internal-table-based-on-selection/m-p/2793287#M651790</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-09-04T11:22:31Z</dc:date>
    </item>
  </channel>
</rss>

