<?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: Problem reading Input file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017683#M1497634</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;See this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : T_UPTAB LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF T_DATA OCCURS 0,&lt;/P&gt;&lt;P&gt;   01 text&lt;/P&gt;&lt;P&gt;03 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;04 text&lt;/P&gt;&lt;P&gt;02 text&lt;/P&gt;&lt;P&gt;end of t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF NOT P_FILE1 IS INITIAL."P_FILE1 is path in selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              FILENAME                = P_FILE1&lt;/P&gt;&lt;P&gt;              I_BEGIN_COL             = 1&lt;/P&gt;&lt;P&gt;              I_BEGIN_ROW             = 2&lt;/P&gt;&lt;P&gt;              I_END_COL               = 37                  &lt;/P&gt;&lt;P&gt;              I_END_ROW               = 5000&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              INTERN                  = T_UPTAB&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              INCONSISTENT_PARAMETERS = 1&lt;/P&gt;&lt;P&gt;              UPLOAD_OLE              = 2&lt;/P&gt;&lt;P&gt;              OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'Successfully Uploaded the File'.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE E208(00) WITH 'Error in the Uploaded file formate'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE T_UPTAB WHERE VALUE IS INITIAL.    &lt;/P&gt;&lt;P&gt; LOOP AT T_UPTAB .&lt;/P&gt;&lt;P&gt;      AT NEW ROW .&lt;/P&gt;&lt;P&gt;        CLEAR : T_DATA.&lt;/P&gt;&lt;P&gt;      ENDAT .&lt;/P&gt;&lt;P&gt;IF T_UPTAB-COL     = 1 .&lt;/P&gt;&lt;P&gt;        T_DATA-01   =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 2 .&lt;/P&gt;&lt;P&gt;        T_DATA-02    =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 3 .&lt;/P&gt;&lt;P&gt;        T_DATA-03    =  T_UPTAB-VALUE.&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 4 .&lt;/P&gt;&lt;P&gt;        T_DATA-04   =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt; AT END OF ROW.&lt;/P&gt;&lt;P&gt;        APPEND T_DATA.&lt;/P&gt;&lt;P&gt;      ENDAT.&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;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jun 2010 06:17:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-12T06:17:37Z</dc:date>
    <item>
      <title>Problem reading Input file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017681#M1497632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a req. in which i have to read file of format given below:&lt;/P&gt;&lt;P&gt;01 text&lt;/P&gt;&lt;P&gt;03 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;04 text&lt;/P&gt;&lt;P&gt;02 text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 01, 03, 09, 08,04,02 are record types and 01,03, 04,02 are header and footer records and 09, 08 are the record types from which actual data has to be read .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For one employee some data has to be read from 09 record and some from 08 record. My problem is to how to read this data and get into an internal table (i.e . when to append the data in an internal table?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aleria Thomson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 04:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017681#M1497632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-12T04:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading Input file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017682#M1497633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;    Please specifyin detail .&lt;/P&gt;&lt;P&gt;If  r u uploading a file with the file format given then use   FM  GUI_UPLOAD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 05:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017682#M1497633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-12T05:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading Input file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017683#M1497634</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;See this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : T_UPTAB LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF T_DATA OCCURS 0,&lt;/P&gt;&lt;P&gt;   01 text&lt;/P&gt;&lt;P&gt;03 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;09 text&lt;/P&gt;&lt;P&gt;08 text&lt;/P&gt;&lt;P&gt;04 text&lt;/P&gt;&lt;P&gt;02 text&lt;/P&gt;&lt;P&gt;end of t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF NOT P_FILE1 IS INITIAL."P_FILE1 is path in selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              FILENAME                = P_FILE1&lt;/P&gt;&lt;P&gt;              I_BEGIN_COL             = 1&lt;/P&gt;&lt;P&gt;              I_BEGIN_ROW             = 2&lt;/P&gt;&lt;P&gt;              I_END_COL               = 37                  &lt;/P&gt;&lt;P&gt;              I_END_ROW               = 5000&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              INTERN                  = T_UPTAB&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              INCONSISTENT_PARAMETERS = 1&lt;/P&gt;&lt;P&gt;              UPLOAD_OLE              = 2&lt;/P&gt;&lt;P&gt;              OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;      MESSAGE S208(00) WITH 'Successfully Uploaded the File'.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE E208(00) WITH 'Error in the Uploaded file formate'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE T_UPTAB WHERE VALUE IS INITIAL.    &lt;/P&gt;&lt;P&gt; LOOP AT T_UPTAB .&lt;/P&gt;&lt;P&gt;      AT NEW ROW .&lt;/P&gt;&lt;P&gt;        CLEAR : T_DATA.&lt;/P&gt;&lt;P&gt;      ENDAT .&lt;/P&gt;&lt;P&gt;IF T_UPTAB-COL     = 1 .&lt;/P&gt;&lt;P&gt;        T_DATA-01   =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 2 .&lt;/P&gt;&lt;P&gt;        T_DATA-02    =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 3 .&lt;/P&gt;&lt;P&gt;        T_DATA-03    =  T_UPTAB-VALUE.&lt;/P&gt;&lt;P&gt;      ELSEIF T_UPTAB-COL = 4 .&lt;/P&gt;&lt;P&gt;        T_DATA-04   =  T_UPTAB-VALUE .&lt;/P&gt;&lt;P&gt; AT END OF ROW.&lt;/P&gt;&lt;P&gt;        APPEND T_DATA.&lt;/P&gt;&lt;P&gt;      ENDAT.&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;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jun 2010 06:17:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-input-file/m-p/7017683#M1497634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-12T06:17:37Z</dc:date>
    </item>
  </channel>
</rss>

