<?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: CSV to Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015922#M959576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha ha ha  LOL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with you kumar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only need guidance and definitely not someone who will write the whole code for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok.  Here is some thing I tried  and got the following message---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the code to----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_tab type standard table of flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the short dump I got---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; It was tried to transfer internal table "DATA_TAB " to the formal parameter "I_TAB_RAW_DATA". In doing so, a type conflict occured between formal and the actual parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition flagged below have been violated:&lt;/P&gt;&lt;P&gt;("   ") the access type specified for the table are not compatible. The compatibility rules are defined by the following hierarchy:&lt;/P&gt;&lt;P&gt;ANY TABLE(INDEX_TABLE(STANDARD_TABLE, SORTED TABLE), HASHED TABLE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A fixed acess type is only compatible with it's predecessors in the hierarchy. &lt;/P&gt;&lt;P&gt;(Example: STANDARD_TABLE) is compatible with INDEX_TABLE and ANY_TABLE, but is not compatible with HASED TABLE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;("X") The row type of the two tables are not compatible.&lt;/P&gt;&lt;P&gt;("X") The table keys of the two tables donot match.&lt;/P&gt;&lt;P&gt;("    ") One  of the two tables is defined with a  unique key(UNIQUE); the other is defined with a non-unique key (NON-UINQUE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar, the following are the fields in PTRV_KMSUM.----&lt;/P&gt;&lt;P&gt;        mandt ,&lt;/P&gt;&lt;P&gt;        pernr,&lt;/P&gt;&lt;P&gt;        perna,&lt;/P&gt;&lt;P&gt;        zland ,&lt;/P&gt;&lt;P&gt;        hrgio ,&lt;/P&gt;&lt;P&gt;        pkwkl,&lt;/P&gt;&lt;P&gt;        kzpmf,&lt;/P&gt;&lt;P&gt;        sivgl ,&lt;/P&gt;&lt;P&gt;        kmsum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving data in my CSV file for the above fields including MANDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a record of mine in my CSV file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;240,00012047,2009,08,,PET,P,,1060&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't passed data for couple of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to pass similar data using GUI _upload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will be trying your code and get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2008 16:00:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-16T16:00:24Z</dc:date>
    <item>
      <title>CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015909#M959563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at my code.&lt;/P&gt;&lt;P&gt;The basic requirement is to load into table PTRV_KMSUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to do that using GUI upload FM from a notepad .&lt;/P&gt;&lt;P&gt;But now the requirement is using a CSV file to load into PTRV_KMSUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zhr_t_ptrv_kmsum  NO STANDARD PAGE HEADING LINE-SIZE 200.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                   .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERNAL TABLE DECLARATION *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;TYPES : BEGIN OF flat_itab,&lt;/P&gt;&lt;P&gt;rec(500) TYPE c,&lt;/P&gt;&lt;P&gt;END OF flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: data_tab TYPE TABLE OF flat_itab WITH HEADER LINE.  " Internal table to hold CSV file data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_kmsum TYPE STANDARD TABLE OF ptrv_kmsum WITH HEADER LINE.&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;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SPECIFY THE FILE LOCATION *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_file TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROGRAM_NAME = SYST-CPROG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELD_NAME = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_name = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE p_file TO v_file.&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;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POPULATE THE INTERNAL TABLE FROM THE CSV FILE *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;   I_FIELD_SEPERATOR          = ','&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_tab_raw_data             = data_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I_FILENAME                 = v_file&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    i_tab_converted_data       = it_kmsum&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_FAILED          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&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;&lt;P&gt;&lt;STRONG&gt;NOW LOAD INTO THE TABLE PTRV_KMSUM FROM THE INTERNAL TABLE&lt;/STRONG&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;CALL FUNCTION 'TRIPS_WRITE_KMSUM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kmsum = it_kmsum&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODIFY_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Note:- I am getting the following error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module interface allows you to specify only fieldsd of a particular type under 'I_FILENAME'.&lt;/P&gt;&lt;P&gt;The  field 'V_FILE' specified here is a different field type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:38:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015909#M959563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015910#M959564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can load the csv file and then pass it to the table using split.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015910#M959564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015911#M959565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;take v_file name as RLGRAP-FILENAME&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015911#M959565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015912#M959566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For TEXT_CONVERT_CSV_TO_SAP&lt;/P&gt;&lt;P&gt;You have to define v_file as RLGRAP-FILENAME and not as a string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015912#M959566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015913#M959567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make the type of V_FILE to RLGRAP-FILENAME (now it is string).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015913#M959567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015914#M959568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Declare the field v_file of type RLGRAP-FILENAME instead of STRING. It solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Bobbala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015914#M959568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015915#M959569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me try it out .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will get back to you all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015915#M959569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015916#M959570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friends,&lt;/P&gt;&lt;P&gt; I tried the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I commented  v_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have kept p_file from my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I passed that in fm"TEXT_CONVERT_CSV_TO_SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Didn't get the earlier error message. But got the following one....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module interface allows you to specify only fields of a particular type under  "I_TAB_RAW_DATA".&lt;/P&gt;&lt;P&gt;The field "DATA_TAB" specified here is a different field type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inputs please,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015916#M959570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T14:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015917#M959571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here's the changed code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zhr_t_ptrv_kmsum NO STANDARD PAGE HEADING LINE-SIZE 200.&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTERNAL TABLE DECLARATION * &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF flat_itab,&lt;/P&gt;&lt;P&gt;rec(500) TYPE c,&lt;/P&gt;&lt;P&gt;END OF flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: data_tab TYPE TABLE OF flat_itab WITH HEADER LINE. " Internal table to hold CSV file data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_kmsum TYPE STANDARD TABLE OF ptrv_kmsum WITH HEADER LINE.&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPECIFY THE FILE LOCATION * &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM_NAME = SYST-CPROG &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DYNPRO_NUMBER = SYST-DYNNR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD_NAME = ' ' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_name = p_file.&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POPULATE THE INTERNAL TABLE FROM THE CSV FILE * &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_FIELD_SEPERATOR = ','&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_LINE_HEADER = &lt;/P&gt;&lt;P&gt;i_tab_raw_data = data_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_FILENAME = p_file&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;i_tab_converted_data = it_kmsum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;CONVERSION_FAILED = 1 &lt;/P&gt;&lt;P&gt;OTHERS = 2 &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &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;&lt;/P&gt;&lt;P&gt;NOW LOAD INTO THE TABLE PTRV_KMSUM FROM THE INTERNAL TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TRIPS_WRITE_KMSUM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kmsum = it_kmsum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY_ERROR = 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OTHERS = 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015917#M959571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015918#M959572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;inputs please....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:12:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015918#M959572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015919#M959573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(change the data type) in place of the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF flat_itab,&lt;/P&gt;&lt;P&gt;rec(500) TYPE c,&lt;/P&gt;&lt;P&gt;END OF flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: data_tab TYPE TABLE OF flat_itab WITH HEADER LINE. " Internal table to hold CSV file data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;place this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this table with out header line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; data_tab type TRUXS_T_TEXT_DATA,  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;work area for the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wa_data_tab(4096) type c .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: S.r.v.r.Kumar on Jun 16, 2008 8:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015919#M959573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015920#M959574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit it in my code and just paste it back.&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:37:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015920#M959574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015921#M959575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste the below code&lt;/P&gt;&lt;P&gt;*************************************************&lt;/P&gt;&lt;P&gt;TYPE-POOLS truxs.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; data_tab TYPE truxs_t_text_data,&lt;/P&gt;&lt;P&gt; wa_data_tab(4096) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;delete the below code from ur program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF flat_itab,&lt;/P&gt;&lt;P&gt;rec(500) TYPE c,&lt;/P&gt;&lt;P&gt;END OF flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: data_tab TYPE TABLE OF flat_itab WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will not change all the program, if you have any dought ask me i will give answers.&lt;/P&gt;&lt;P&gt;i am not worried about points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i write the whole code what you will do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015921#M959575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015922#M959576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha ha ha  LOL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with you kumar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only need guidance and definitely not someone who will write the whole code for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok.  Here is some thing I tried  and got the following message---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the code to----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_tab type standard table of flat_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the short dump I got---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; It was tried to transfer internal table "DATA_TAB " to the formal parameter "I_TAB_RAW_DATA". In doing so, a type conflict occured between formal and the actual parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition flagged below have been violated:&lt;/P&gt;&lt;P&gt;("   ") the access type specified for the table are not compatible. The compatibility rules are defined by the following hierarchy:&lt;/P&gt;&lt;P&gt;ANY TABLE(INDEX_TABLE(STANDARD_TABLE, SORTED TABLE), HASHED TABLE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A fixed acess type is only compatible with it's predecessors in the hierarchy. &lt;/P&gt;&lt;P&gt;(Example: STANDARD_TABLE) is compatible with INDEX_TABLE and ANY_TABLE, but is not compatible with HASED TABLE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;("X") The row type of the two tables are not compatible.&lt;/P&gt;&lt;P&gt;("X") The table keys of the two tables donot match.&lt;/P&gt;&lt;P&gt;("    ") One  of the two tables is defined with a  unique key(UNIQUE); the other is defined with a non-unique key (NON-UINQUE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar, the following are the fields in PTRV_KMSUM.----&lt;/P&gt;&lt;P&gt;        mandt ,&lt;/P&gt;&lt;P&gt;        pernr,&lt;/P&gt;&lt;P&gt;        perna,&lt;/P&gt;&lt;P&gt;        zland ,&lt;/P&gt;&lt;P&gt;        hrgio ,&lt;/P&gt;&lt;P&gt;        pkwkl,&lt;/P&gt;&lt;P&gt;        kzpmf,&lt;/P&gt;&lt;P&gt;        sivgl ,&lt;/P&gt;&lt;P&gt;        kmsum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving data in my CSV file for the above fields including MANDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a record of mine in my CSV file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;240,00012047,2009,08,,PET,P,,1060&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't passed data for couple of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to pass similar data using GUI _upload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will be trying your code and get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 16:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015922#M959576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T16:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015923#M959577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Made the changes you asked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no error now.&lt;/P&gt;&lt;P&gt;But when I executed it and checked the table PTRV_KMSUM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data is not getting placed.  &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure , if the changes you asked are all I need to do or do I need to do something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code now-------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zhr_t_ptrv_kmsum  NO STANDARD PAGE HEADING LINE-SIZE 200.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                     MESSAGE-ID /rpm/migration.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS truxs.&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERNAL TABLE DECLARATION *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;*TYPES : BEGIN OF flat_itab,&lt;/P&gt;&lt;P&gt;*rec(500) TYPE c,&lt;/P&gt;&lt;P&gt;*END OF flat_itab.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: data_tab type TRUXS_T_TEXT_DATA,&lt;/P&gt;&lt;P&gt;wa_data_tab(4096) type c .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: data_tab TYPE standard table of flat_itab." WITH *HEADER LINE.  " Internal table to hold flat file data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_kmsum TYPE STANDARD TABLE OF ptrv_kmsum." "WITH HEADER LINE.&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;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SPECIFY THE FILE LOCATION *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: v_file(75) TYPE c. "string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROGRAM_NAME = SYST-CPROG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELD_NAME = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_name = p_file.&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;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POPULATE THE INTERNAL TABLE FROM THE CSV FILE***************************************************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;   I_FIELD_SEPERATOR          = ','&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_tab_raw_data             = data_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I_FILENAME                 = p_file&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    i_tab_converted_data       = it_kmsum&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_FAILED          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&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;&lt;P&gt;&lt;STRONG&gt;NOW LOAD INTO THE TABLE PTRV_KMSUM FROM THE INTERNAL TABLE&lt;/STRONG&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;CALL FUNCTION 'TRIPS_WRITE_KMSUM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kmsum = it_kmsum&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODIFY_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Hari  Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 16:16:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015923#M959577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T16:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015924#M959578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT zhr_t_ptrv_kmsum NO STANDARD PAGE HEADING LINE-SIZE 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MESSAGE-ID /rpm/migration.&lt;/P&gt;&lt;P&gt;TYPE-POOLS truxs.&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;*INTERNAL TABLE DECLARATION *&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;&lt;P&gt;data: i_tab_raw_data type TRUXS_T_TEXT_DATA,&lt;/P&gt;&lt;P&gt;wa_data_tab(4096) type c .&lt;/P&gt;&lt;P&gt;data:g_file type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_kmsum TYPE STANDARD TABLE OF ptrv_kmsum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:i_tab_converted_data type STANDARD TABLE OF PTRV_KMSUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;*SPECIFY THE FILE LOCATION *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM_NAME = SYST-CPROG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD_NAME = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_name = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;g_file = p_file.&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                      = g_file&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                      = i_tab_raw_data&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_TEX_TO_SAP'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;   I_FIELD_SEPERATOR          = ','&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              = I_LINE_HEADER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_tab_raw_data             = i_tab_raw_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_FILENAME                 = I_FILENAME&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    i_tab_converted_data       = i_tab_converted_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_FAILED          = 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;*NOW LOAD INTO THE TABLE PTRV_KMSUM FROM THE INTERNAL TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TRIPS_WRITE_KMSUM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kmsum = i_tab_converted_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY_ERROR = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 16:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015924#M959578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015925#M959579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no syntax error nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything looks great.It executed.&lt;/P&gt;&lt;P&gt; I got the  green colored "Nike"symbol or "ok" symbol&lt;/P&gt;&lt;P&gt;in status bar with 0.00 besides it when I executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But data didn't get placed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a doubt In GUI _UPLOAD.&lt;/P&gt;&lt;P&gt;You didnt give the file type???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank  you so much once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 17:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015925#M959579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T17:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015926#M959580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write a break-point before the statement CALL FUNCTION 'TRIPS_WRITE_KMSUM'. and check data in  table i_tab_converted_data.  you will get all the data that is there in ur file, i think there is a problem in 'TRIPS_WRITE_KMSUM' function module or data in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no need to pass file type in GUI uplode if the file is notepad &lt;/P&gt;&lt;P&gt;by the by what is ur file type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: S.r.v.r.Kumar on Jun 17, 2008 1:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015926#M959580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T07:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015927#M959581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Kumar for the late reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had to go home last night. It was getting late.&lt;/P&gt;&lt;P&gt;Just logged in now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ya, I will place the breakpoint and check if data is getting placed in the Internal table or not. That will clear a lot of things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I will be given a CSV file , with  '~' as the field separator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already loaded data into PTRV_KMSUM table from notepad.Didn't have much problem doping that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is with this CSV loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 11:47:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015927#M959581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T11:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: CSV to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015928#M959582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'TEXT_CONVERT_TEXT_TO_SAP' will load the CSV file into the internal Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't need to use GUI Upload then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in your code  you used GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;Guess , that needs to be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try out that Break point and see if data is getting placed in the internal table from the CSV file or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply soon,&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt; Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 13:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-to-internal-table/m-p/4015928#M959582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T13:23:32Z</dc:date>
    </item>
  </channel>
</rss>

