<?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: File from the Application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819556#M659471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply...but I need to include this thing in my Program , so can you elaborate a lil bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 14:15:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T14:15:09Z</dc:date>
    <item>
      <title>File from the Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819553#M659468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;I am working on a scenario where I need to get a file from the application server and for this I need to ask user to enter the location and that too at the selection screen and then I need to read this location using open data set and read data set in my program , once I am done with this I need to do some other validations. so can you please help me out how to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:10:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819553#M659468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: File from the Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819554#M659469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CG3Y&lt;/P&gt;&lt;P&gt;CG3Z&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Transactions to move file to Application and vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819554#M659469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: File from the Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819555#M659470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the example program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUPLOADTAB                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Example of Uploading tab delimited file                             *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
REPORT  zuploadtab                    .

PARAMETERS: p_infile  LIKE rlgrap-filename
                        OBLIGATORY DEFAULT  '/usr/sap/'..

DATA: ld_file LIKE rlgrap-filename.

*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
    name1 like pa0002-VORNA,
    name2 like pa0002-name2,
    age   type i,
    END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
      wa_record TYPE t_record.

*Text version of data table
TYPES: begin of t_uploadtxt,
  name1(10) type c,
  name2(15) type c,
  age(5)  type c,
 end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.

*String value to data in initially.
DATA: wa_string(255) type c.

constants: con_tab TYPE x VALUE '09'.

*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:

*class cl_abap_char_utilities definition load.
*constants:
*    con_tab  type c value cl_abap_char_utilities=&amp;gt;HORIZONTAL_TAB.



************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
  DO.
    CLEAR: wa_string, wa_uploadtxt.
    READ DATASET ld_file INTO wa_string.
    IF sy-subrc NE 0.
      EXIT.
    ELSE.
      SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                      wa_uploadtxt-name2
                                      wa_uploadtxt-age.
      MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
      APPEND wa_upload TO it_record.
    ENDIF.
  ENDDO.
  CLOSE DATASET ld_file.
ENDIF.


************************************************************************
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD

* Display report data for illustration purposes
  loop at it_record into wa_record.
    write:/     sy-vline,
           (10) wa_record-name1, sy-vline,
           (10) wa_record-name2, sy-vline,
           (10) wa_record-age, sy-vline.
  endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&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;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819555#M659470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: File from the Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819556#M659471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply...but I need to include this thing in my Program , so can you elaborate a lil bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819556#M659471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: File from the Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819557#M659472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Declare the selection screen with file as parameter so that the user enter the application server file..&lt;/P&gt;&lt;P&gt;the use the OPEND DATASET  as mentioned in below code and process&lt;/P&gt;&lt;P&gt;Refer this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.&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; Report  ZUPLOADTAB                                                  *                     &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; Example of Uploading tab delimited file                             *&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;REPORT  zuploadtab                    .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETERS: p_infile  LIKE rlgrap-filename&lt;/P&gt;&lt;P&gt;                        OBLIGATORY DEFAULT  '/usr/sap/'..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: ld_file LIKE rlgrap-filename.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*Internal tabe to store upload data&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_record,&lt;/P&gt;&lt;P&gt;    name1 like pa0002-VORNA,&lt;/P&gt;&lt;P&gt;    name2 like pa0002-name2,&lt;/P&gt;&lt;P&gt;    age   type i,&lt;/P&gt;&lt;P&gt;    END OF t_record.&lt;/P&gt;&lt;P&gt;DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;      wa_record TYPE t_record.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*Text version of data table&lt;/P&gt;&lt;P&gt;TYPES: begin of t_uploadtxt,&lt;/P&gt;&lt;P&gt;  name1(10) type c,&lt;/P&gt;&lt;P&gt;  name2(15) type c,&lt;/P&gt;&lt;P&gt;  age(5)  type c,&lt;/P&gt;&lt;P&gt; end of t_uploadtxt.&lt;/P&gt;&lt;P&gt;DATA: wa_uploadtxt TYPE t_uploadtxt.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*String value to data in initially.&lt;/P&gt;&lt;P&gt;DATA: wa_string(255) type c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;constants: con_tab TYPE x VALUE '09'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*If you have Unicode check active in program attributes then you will&lt;/P&gt;&lt;P&gt;*need to declare constants as follows:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*class cl_abap_char_utilities definition load.&lt;/P&gt;&lt;P&gt;*constants:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   con_tab  type c value cl_abap_char_utilities=&amp;gt;HORIZONTAL_TAB. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;ld_file = p_infile.&lt;/P&gt;&lt;P&gt;OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    CLEAR: wa_string, wa_uploadtxt.&lt;/P&gt;&lt;P&gt;    READ DATASET ld_file INTO wa_string.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1&lt;/P&gt;&lt;P&gt;                                      wa_uploadtxt-name2&lt;/P&gt;&lt;P&gt;                                      wa_uploadtxt-age.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.&lt;/P&gt;&lt;P&gt;      APPEND wa_upload TO it_record.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET ld_file.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*END-OF-SELECTION&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*!! Text data is now contained within the internal table IT_RECORD&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display report data for illustration purposes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_record into wa_record.&lt;/P&gt;&lt;P&gt;    write:/     sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name1, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-name2, sy-vline,&lt;/P&gt;&lt;P&gt;           (10) wa_record-age, sy-vline.&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;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-the-application-server/m-p/2819557#M659472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:25:19Z</dc:date>
    </item>
  </channel>
</rss>

