<?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 OO Prog in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041836#M1350933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this error, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error : Literals that take up more than one linenot permitted.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZLCL_SAMPLE no standard page heading
                       line-size 100
                       line-count 100               .

data : begin of wa_file,
        name(30) type c,
        mobile(12) type c,
       end of wa_file.

data : it_file like table of wa_file.

class lcl_file definition.

public section.

methods : upload importing im_file type string
                           im_sep type c
                  changing it_contact like it_file.
endclass.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**** class implementation
class lcl_file implementation.

***method implemenation
method upload.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
   FILENAME = 'C:\Documents and Settings\Administrator\Desktop\file.txt'
   HAS_FIELD_SEPARATOR           = im_sep
  TABLES
    DATA_TAB                      = it_contact.

endmethod.
endclass.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;start-of-selection.

data : o_file type ref to lcl_file.

create object o_file .

call method o_file-&amp;gt;upload exporting im_file = 'C:\Documents and Settings\Administrator
\Desktop\file.txt'
        im_sep = 'X'   changing
       it_contact = it_file.

loop at it_file into wa_file.
  write:/ wa_file-name,wa_file-mobile.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jyotsna dm on Aug 1, 2009 7:29 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Aug 1, 2009 12:35 PM - removed comments for formatting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Aug 2009 05:29:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-01T05:29:41Z</dc:date>
    <item>
      <title>OO Prog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041836#M1350933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this error, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error : Literals that take up more than one linenot permitted.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZLCL_SAMPLE no standard page heading
                       line-size 100
                       line-count 100               .

data : begin of wa_file,
        name(30) type c,
        mobile(12) type c,
       end of wa_file.

data : it_file like table of wa_file.

class lcl_file definition.

public section.

methods : upload importing im_file type string
                           im_sep type c
                  changing it_contact like it_file.
endclass.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**** class implementation
class lcl_file implementation.

***method implemenation
method upload.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
   FILENAME = 'C:\Documents and Settings\Administrator\Desktop\file.txt'
   HAS_FIELD_SEPARATOR           = im_sep
  TABLES
    DATA_TAB                      = it_contact.

endmethod.
endclass.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;start-of-selection.

data : o_file type ref to lcl_file.

create object o_file .

call method o_file-&amp;gt;upload exporting im_file = 'C:\Documents and Settings\Administrator
\Desktop\file.txt'
        im_sep = 'X'   changing
       it_contact = it_file.

loop at it_file into wa_file.
  write:/ wa_file-name,wa_file-mobile.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jyotsna dm on Aug 1, 2009 7:29 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Aug 1, 2009 12:35 PM - removed comments for formatting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 05:29:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041836#M1350933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T05:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: OO Prog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041837#M1350934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i checked your code but I am not getting teh error.&lt;/P&gt;&lt;P&gt;I think the problem is beacause of the filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are giving your filename within quotes with a line break.&lt;/P&gt;&lt;P&gt;So you get that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all do not pass such long texts within quotes to the filename parameter.&lt;/P&gt;&lt;P&gt;Declare a variable and pass to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the file browser feature in windows then use method 'FILE_OPEN_DIALOG' of class CL_GUI_FRONTEND_SERVICES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 08:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041837#M1350934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T08:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: OO Prog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041838#M1350935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Please use a meaningful subject in future&lt;/SPAN&gt;&lt;/STRONG&gt;  There is a limit of around 2500 characters to a post.  If you wish to retain formatting, you need to removed any code not germane to the issue.  This I have done for you.  And immediately I see that Ankur Parab is correct: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;You are giving your filename within quotes with a line break.&lt;/P&gt;&lt;P&gt;&amp;gt;so you get that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can follow his suggestions.  Or you may want to check the settings on your editor, which may be limited to 72 char rows.  With most recent systems, you can have much longer rows than that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 10:40:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041838#M1350935</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-08-01T10:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: OO Prog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041839#M1350936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, issue solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 12:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oo-prog/m-p/6041839#M1350936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T12:08:44Z</dc:date>
    </item>
  </channel>
</rss>

