<?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 reading data from presentation server. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277186#M495420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a text file in which records are space seperated.I will be entering the file name in selection screen in a parameter 'infile1'  and I am trying to upload these records into a internal table using function module GUI_UPLOAD.but i get a message saying that the filename given has a different field type .function module allows you to specify only fields of particualar type under filename. my code is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of period_rec,&lt;/P&gt;&lt;P&gt;          pval01(3),                   "version&lt;/P&gt;&lt;P&gt;          pval04(4),                   " fiscal year&lt;/P&gt;&lt;P&gt;          pval06(10),                  " cost centre&lt;/P&gt;&lt;P&gt;          pval12(10),                   " cost element&lt;/P&gt;&lt;P&gt;          bdc0301(15),                 " fixed cost period 01&lt;/P&gt;&lt;P&gt;          bdc0302(15),                 " fixed cost period 02&lt;/P&gt;&lt;P&gt;          bdc0303(15),                 " fixed cost period 03&lt;/P&gt;&lt;P&gt;          bdc0304(15),                 " fixed cost period 04&lt;/P&gt;&lt;P&gt;          bdc0305(15),                 " fixed cost period 05&lt;/P&gt;&lt;P&gt;          bdc0306(15),                 " fixed cost period 06&lt;/P&gt;&lt;P&gt;          bdc0307(15),                 " fixed cost period 07&lt;/P&gt;&lt;P&gt;          bdc0308(15),                 " fixed cost period 08&lt;/P&gt;&lt;P&gt;          bdc0309(15),                 " fixed cost period 09&lt;/P&gt;&lt;P&gt;          bdc0310(15),                 " fixed cost period 10&lt;/P&gt;&lt;P&gt;          bdc0311(15),                 " fixed cost period 11&lt;/P&gt;&lt;P&gt;          bdc0312(15),                 " fixed cost period 12&lt;/P&gt;&lt;P&gt;       end of period_rec.&lt;/P&gt;&lt;P&gt;parameters : infile1 like rlgrap-filename.&lt;/P&gt;&lt;P&gt;data: tab like period_rec occurs 10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename                      = infile2&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2007 09:52:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-29T09:52:56Z</dc:date>
    <item>
      <title>reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277186#M495420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a text file in which records are space seperated.I will be entering the file name in selection screen in a parameter 'infile1'  and I am trying to upload these records into a internal table using function module GUI_UPLOAD.but i get a message saying that the filename given has a different field type .function module allows you to specify only fields of particualar type under filename. my code is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of period_rec,&lt;/P&gt;&lt;P&gt;          pval01(3),                   "version&lt;/P&gt;&lt;P&gt;          pval04(4),                   " fiscal year&lt;/P&gt;&lt;P&gt;          pval06(10),                  " cost centre&lt;/P&gt;&lt;P&gt;          pval12(10),                   " cost element&lt;/P&gt;&lt;P&gt;          bdc0301(15),                 " fixed cost period 01&lt;/P&gt;&lt;P&gt;          bdc0302(15),                 " fixed cost period 02&lt;/P&gt;&lt;P&gt;          bdc0303(15),                 " fixed cost period 03&lt;/P&gt;&lt;P&gt;          bdc0304(15),                 " fixed cost period 04&lt;/P&gt;&lt;P&gt;          bdc0305(15),                 " fixed cost period 05&lt;/P&gt;&lt;P&gt;          bdc0306(15),                 " fixed cost period 06&lt;/P&gt;&lt;P&gt;          bdc0307(15),                 " fixed cost period 07&lt;/P&gt;&lt;P&gt;          bdc0308(15),                 " fixed cost period 08&lt;/P&gt;&lt;P&gt;          bdc0309(15),                 " fixed cost period 09&lt;/P&gt;&lt;P&gt;          bdc0310(15),                 " fixed cost period 10&lt;/P&gt;&lt;P&gt;          bdc0311(15),                 " fixed cost period 11&lt;/P&gt;&lt;P&gt;          bdc0312(15),                 " fixed cost period 12&lt;/P&gt;&lt;P&gt;       end of period_rec.&lt;/P&gt;&lt;P&gt;parameters : infile1 like rlgrap-filename.&lt;/P&gt;&lt;P&gt;data: tab like period_rec occurs 10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename                      = infile2&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 09:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277186#M495420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T09:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277187#M495421</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;the infile2 should be declared as type STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277187#M495421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277188#M495422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: infile_up type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move infile1 to infile_up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass this to GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:02:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277188#M495422</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-05-29T10:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277189#M495423</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;As above said the filename for the FM is of String type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_filename type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277189#M495423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277190#M495424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  KURUVELLA ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:file1 type STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file1 = infile1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;filename = file1&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;data_tab = tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why because GUI_upload accepts only string type of var for parameter Filename in exporting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this solves ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Ravinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 10:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277190#M495424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T10:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from presentation server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277191#M495425</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;Chk ths:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as above posts just change infile1 to string and secondly u r giving infile2 which is not declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZMBJ_GUI_UPLOAD
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zmbj_gui_upload.

DATA: BEGIN OF period_rec,
pval01(3), "version
pval04(4), " fiscal year
pval06(10), " cost centre
pval12(10), " cost element
bdc0301(15), " fixed cost period 01
bdc0302(15), " fixed cost period 02
bdc0303(15), " fixed cost period 03
bdc0304(15), " fixed cost period 04
bdc0305(15), " fixed cost period 05
bdc0306(15), " fixed cost period 06
bdc0307(15), " fixed cost period 07
bdc0308(15), " fixed cost period 08
bdc0309(15), " fixed cost period 09
bdc0310(15), " fixed cost period 10
bdc0311(15), " fixed cost period 11
bdc0312(15), " fixed cost period 12
END OF period_rec.
PARAMETERS : infile1 type string.
DATA: tab LIKE period_rec OCCURS 10 WITH HEADER LINE.

CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename = infile1
    filetype = 'ASC'
  TABLES
    data_tab = tab.
* EXCEPTIONS
IF sy-subrc &amp;lt;&amp;gt; 0.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 11:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-presentation-server/m-p/2277191#M495425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T11:55:41Z</dc:date>
    </item>
  </channel>
</rss>

