Upload  comma seperated file

Hi,
I have to upload a text file which  has 12 fields seperated by commas and each of the character field is enclosed by quotes(" ").I tried uploading using GUI_UPLOAD but it is going for short dump.
First row of the file is as below:
1,"ALU",0,"7","21-MAY-2008 15",,"000017088656","00919074","L-130912-02-001","05-Feb-2007",0.70,""
I used the FM as below:
  CALL FUNCTION 'GUI_UPLOAD'
     EXPORTING
       FILENAME                      = fileup
     FILETYPE                      = 'ASC'
     HAS_FIELD_SEPARATOR           = 'X'
     HEADER_LENGTH                 = 0
     READ_BY_LINE                  = 'X'
     DAT_MODE                      = ' '
     CODEPAGE                      = ' '
     IGNORE_CERR                   = ABAP_TRUE
     REPLACEMENT                   = '#'
     CHECK_BOM                     = ' '
     VIRUS_SCAN_PROFILE            =
     NO_AUTH_CHECK                 = ' '
   IMPORTING
     FILELENGTH                    =
     HEADER                        =
     TABLES
       DATA_TAB                      = i_REF
   EXCEPTIONS
Please solve this problem

Hi,
try to use the quotes in the below way..
and maintain the paramets as CSV as well....
loop at i_final_data_tmp into wa_final_data_tmp.
   concatenate :
          `"` wa_final_data_tmp-f1  `",`
          `"` wa_final_data_tmp-f2  `",`
          `"` wa_final_data_tmp-f3  `",`
          `"` wa_final_data_tmp-f4  `",`
          `"` wa_final_data_tmp-f5  `",`
          `"` wa_final_data_tmp-f6  `",`
          `"` wa_final_data_tmp-f7  `",`
          `"` wa_final_data_tmp-f8  `",`
          `"` wa_final_data_tmp-f9  `",`
          `"` wa_final_data_tmp-f10 `"`.
   append wa_csv_data to i_csv_data.
   clear wa_csv_data.
endloop.

Similar Messages

  • Comma seperated file uploading

    Hi ,
    i want to upload comma seperated file into sap.
    iam using 'GUI_UPLOAD' fm.
    problem is flat file currency field it is also contains comma.
    i can't change file type comma to tab.
    How can i upload currency fields with comma.
    Regards,
    Suresh.

    You can upload your file into a string table. Now split it:
    split uploadtab at ',' into table items.
    if you have
    a,b,c,11,d,e,f
    your tables items contains 7 elements now.
    if you have
    a,b,c,11,22,d,e,f
    your table contains 8 elements now. In that case you now that you have splitted a number with a comma and need to do some actions, e.g. merge elements 4 and 5 together to get 11,22 again and shift the 6th to 5th, the 7th to 5th and the 8th to 7th element.
    After that you number is again in item 4.
    An easier way is to enforce you customer to put values into apostrophes or quotes. If this is not possible, you have to check if an unwanted split was taken in place and act as shown above.
    But: this will work only if one item with a comma in between. If oyu have more components you can not evaulate where the unwanted split is in effect.

  • Generate an Upload the current table to a comma seperated file

    Hi Freaks,
    i want to generate a comma seperated file from the current table (which was modified in the current Apex Window) and also upload the file to a file server.
    What is the best practice?
    Thanks a lot
    Wolle

    Hello Wolle,
    In the APEX SQL Workshop -> Object browser, when you select a table, and select the Data tab. There's a link at the bottom of the table, "Download". This will automatically generate a csv file for you.
    Alternatively you can use a client like toad or sql developer to generate a csv.
    Greetings,
    Rutger
    http://rutgerderuiter.blogspot.com/
    ===============================================================================
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • 9iJSP Report output to a comma seperated file

    Hi,
    Is it possible to create a comma seperated file with output data from a 9iJSP report. If yes, can anyone tell me how ??
    thanks in advance
    Unmesh

    Hello Unmesh,
    If your JSP report has a paper layout, then you can use Reports Builder or the client/servlet/runtime executables to generate the paper layout to CSV formatted output with the DESFORMAT=DELIMITEDDATA and DELIMITER=, command-line options. If you have only a web layout , it will generate its output only in HTML format.
    You can add a paper/web layout to your JSP report, if it already doesn't have one, by opening it in Reports Builder, and inserting a report block in the paper layout view/web source view. This JSP report can then be used both to generate to CSV format using rwservlet, and to the web when deployed as a JSP.
    Thanks,
    The Oracle Reports Team.

  • Comma Seperated Files

    I am trying to read in data from a .CSV file.
    The CSV file contains a list of questions and answers in the
    format;
    Question, option1, option2,option3,option4, correct answer
    My problem is that I can get the whole line into an array but
    I can't find a way of getting each element of the comma seperated
    file into a multi dimensioned array.
    I need to be able to use MyArray[1,1] is equal to
    Question and MyArray[1,2] is equal to
    option1 etc etc
    Hope this makes sense
    Paul

    In your routine you have two loops.
    Either one will work on thier own but as soon i nest them
    then it just stops working........
    The below data is stored as a Data.csv file (Obviously it
    contains a lot more these are the first 3 records.) **Can't count =
    4 records lol)
    ,,B,,,,Lorry,,,,,X,,,,,CC5001 ,Mark one answer,,under 7.5
    tonnes maximum authorised mass,over 7.5 tonnes maximum authorised
    mass,over 7.5 metres overall height,under 7.5 metres overall
    height,,,1111,This sign means no entry for goods
    vehicles,TS4619.eps,CC5001.gif ,Vehicle Weights and Dimensions
    ,,B,,,,Lorry,,,,,X,,,,,CC5002 ,Mark one answer,,either the
    left-hand or middle lane,only the left-hand lane,only the middle
    lane,any of the lanes,,,1111,Your lorry is over 7.5 tonnes maximum
    authorised mass. This sign means you may use,TS4545.eps,CC5002.gif
    ,Vehicle Weights and Dimensions
    ,,C,,,,Lorry,,,,,,X,,,,CC5003,Mark one answer,,30 mph,40
    mph,50 mph,60 mph,,,1111,You are driving a lorry with a maximum
    authorised mass of 7 tonnes. What is the maximum speed limit on a
    single carriageway?,,,Vehicle Weights and Dimensions
    ,,B,,,,Lorry,,,,,X,,,,,CC5004,Mark one answer,,30 mph,40
    mph,50 mph,60 mph,,,1111,What is the national speed limit on a
    single carriageway road for a rigid lorry weighing more than 7.5
    tonnes maximum authorised mass?,,,Vehicle Weights and
    Dimensions

  • How to make comma seperated file

    hi
    I have a select statement that looks like below. I want to make comma seperated file for the selected columns. How to write it?
    SELECT MM.DAL_NUMBER,
    '19-NOV-2009' as WSS_CE,
    CPN_INT,
    TRADE_DATE,
    MX_DATE "LAST_DATE",
    CUSTOMER_SPECIF CUST_GID,
    NAME_SHORT CUST_NAME_SHORT
    from my_table;
    if you could provide me with exact query.
    Thanks

    Slightly more generic approach...
    As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /As myuser:
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;This allows for the header row and the data to be written to seperate files if required.
    e.g.
    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    PL/SQL procedure successfully completed.Output.txt file contains:
    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
    Adapt to output different datatypes and styles are required.

  • Comma Seperated File

    Is there a way that I can bring a comma seperated file into an oracle table?

    If you are using Oracle 9i and above, you may also want to consider using external tables.
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90192/ch11.htm#1656

  • Create datastore for complex comma seperated file

    I am trying to integrate a comma seperated file to an Oracle database. The files contain multiple record types each of which have different number of fields and a different order of datatypes within those fields. The order that the records types are listed in the file determines the relationship between them, e.g.
    The file could contained the following record types in the order shown:
    Segment
    Fixture
    Position
    Position
    Segment
    Segment
    Fixture
    Position
    Position
    Position
    So there is a parent-child relationship between the Segement record and the Fixture record that immediately follows it and similarly the position records are child records to the Fixture record.
    How can I create datastores that represents this relationship when there is no parent field in the child record types?

    I dont think ODI would be able to help you much with Out of the box functionality. You will need to modify the LKM (SQLLDR) to achieve this.
    The following entry illustrates the logic:
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7526680049479]
    Hope that helps

  • Send mail as comma seperated file from abap

    Hi,
    i need to send mail from my program...as a comma seperated file...can u help me out.
    regards
    shankar

    See function module SO_NEW_DOCUMENT_ATT_SEND_API1, there is an example in the documentation. The example is for a .BMP file but you should be able to use the similar code for a text file (you might need to use object RAW). The content of comma-separated file must be in an internal table when you'll call this function module.
    There are also lots of examples available all over the Internet, use search by FM name.

  • How to upload comm seperated flate file into sap r/3?

    plz send me any simple report program

    Hi,
    Please refer code below:
    data : begin of itab1 occurs 0,
            values(1000) type c,
           end of itab1.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    DATA : filename TYPE string.
    DATA : w_textout LIKE t100-text.
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    data : begin of itab occurs 0,
               BLDAT(10) TYPE C,
               BLART(2) TYPE C,
               BUKRS(4) TYPE C,
               BUDAT(10) TYPE C,
               MONAT(2) TYPE C,
               WAERS(5) TYPE C,
               NEWBS(2) TYPE C,
               NEWKO(17) TYPE C,
               WRBTR(13) TYPE C,
               SGTXT(50) TYPE C,
               GSBER(4) TYPE C,
               KOSTL(10) TYPE C,
               AUFNR(10) TYPE C,
               TNEWBS(2) TYPE C,
               TNEWKO(17) TYPE C,
               TWRBTR(13) TYPE C,
           end of itab.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR p_file.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_file.
    start-of-selection.
      filename = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
         FILENAME                      = filename
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
        TABLES
          DATA_TAB                      = itab1
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
      LOOP AT ITAB1.
          SPLIT ITAB1 AT ',' INTO ITAB-BLDAT ITAB-BLART ITAB-BUKRS ITAB-BUDAT ITAB-MONAT
                             ITAB-WAERS ITAB-NEWBS ITAB-NEWKO ITAB-WRBTR ITAB-SGTXT ITAB-GSBER ITAB-KOSTL ITAB-AUFNR.
        APPEND ITAB.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • Function module to read Comma Seperated File (CSV)

    Hi,
    Is there any Function module to read CSV file from presentation server or Application server?
    Regards,
    Madhu

    Hi madhukeshwar,
    1. Exactly for this purpose,
    i have developed an independent FORM
    where we give inputs
    a) file name (eg. abcd.txt)
    b) separator (eg , COMMA in your case)
    c) internal table (eg. t001)
    2. It will provide the data
    in proper format
    (no matter what the separator)
    (it can work with any kind of separator)
    3. just copy paste in new program.
    REPORT abc.
    change your table declaration and file name
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    PERFORM myupload TABLES t001 USING 'd:\t001.txt' ','.
    BREAK-POINT.
    in debug see t001
    INDEPENDENT FORM
    FORM myupload TABLES orgtab
    USING filename separator.
    Data
    DATA : BEGIN OF itab OCCURS 0,
    myline(1000) TYPE c,
    END OF itab.
    DATA : extension(5) TYPE c.
    DATA : name(100) TYPE c.
    DATA : newfilename TYPE string.
    Step 1
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = filename
    TABLES
    data_tab = itab.
    Step 2
    LOOP AT itab.
    REPLACE ALL OCCURRENCES OF separator IN itab-myline WITH
    cl_abap_char_utilities=>horizontal_tab.
    MODIFY itab.
    ENDLOOP.
    Step 3
    DATA : path LIKE pcfile-path.
    path = filename.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    extension = extension
    name = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    invalid_drive = 1
    invalid_extension = 2
    invalid_name = 3
    invalid_path = 4
    OTHERS = 5
    Step 4
    newfilename = filename.
    REPLACE name IN newfilename WITH 'temp'.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = newfilename
    TABLES
    data_tab = itab
    FIELDNAMES =
    Step 5
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = newfilename
    has_field_separator = 'X'
    TABLES
    data_tab = orgtab.
    ENDFORM. "myupload
    3.
    regards,
    amit m.

  • How to upload pipe seperated file

    hi friends,
    i want to upload the pipe delimited file (which generated from unix server) for bdc program.
    can you please tell me how can i upload this file?
    can i use 'open dataset'??
    thanks in advance
    ankit

    If you are uploading from the application server, then you would use the OPEN DATASET,  if you uploading from the frontend(pc),  then you would use GUI_UPLOAD.
    Here is an example program which is uploading from the frontend.
    report zrich_0001.
    types: begin of ttab,
           rec(1000) type c,
           end of ttab.
    types: begin of tdat,
           fld1(10) type c,
           fld2(10) type c,
           fld3(10) type c,
           end of tdat.
    data: itab type table of ttab with header line.
    data: idat type table of tdat with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      file_str = p_file.
      call function 'GUI_UPLOAD'
           exporting
                filename                = file_str
           tables
                data_tab                = itab
           exceptions
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                others                  = 17.
      loop at itab.
        clear idat.
        split itab-rec at '|' into idat-fld1
                                   idat-fld2
                                   idat-fld3.
        append idat.
      endloop.
      loop at idat.
        write:/ idat-fld1, idat-fld2, idat-fld3.
      endloop.
    Regards,
    Rich Heilman

  • Excel comma seperated .csv files save as semicolon seperated

    Hi
    I work with excel 360 student version danish and i'm trying to convert an siemens .xmls generated file to an .csv comma seperated file but excel save it as an semi colon though it's written in help file it should save it as an comma seperated file.
    Any solution on that what i would call a bug thats been there for over a year?

    Kent, I think you're posting a complaint about Excel, which is off topic for the TechNet Website Feedback forum. The best place to post that would be over at http://answers.microsoft.com in the office section.  Below is some boilerplate that
    I've written up that might also help you.
    Thanks,
    Mike
    Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription.  This is only one forum among the many that are on the TechNet Discussion Forums, and given
    your post, you likely chose the wrong forum.  This is a standard response I’ve written up in advance to help many people (thousands, really.) who post their question in this forum in error, but please don’t ignore it.  The links I share below I’ve
    collected to help you get right where you need to go with your issue.
    For technical issues with Microsoft products that you would run into as an
    end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an
    IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots
    of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you!  It’s called the Where is the forum for…? forum and it’s here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Moving to off topic. 
    Thanks, Mike
    MSDN and TechNet Subscriptions Support
    Did Microsoft call you out of the blue about your computer?
    No, they didn't.

  • Upload Comma separated Text file.

    Hi all ,
    i would like to upload a comma seperated text file into an internal table using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD but am not able to load correctly. Please let me know any aditional parameters should be pass to this FM.
    data **********
    060000012,1001,01052005,2.5,C123,0198345678912
    08000001,1001,01052005,5.0,C123,016545678912
    08000001,1002,02052005,2.5,C234,012345678912
    types  : Begin of ty_itab,
    pernr(10),
    ABS_ATT_TYPE(4),
    REC_CCTR(10),
    work_order(12),
    date(8),
    hours(8).
    types: end of ty_itab.
    data : itab type standard table of ty_itab with header line .
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
      EXPORTING
        FILENAME                = 'C:\LOAD.TXT'
         FILETYPE                = 'ASC'
        HAS_FIELD_SEPARATOR     = 'X'
       HEADER_LENGTH           = 0
       DAT_MODE                = SPACE
       CODEPAGE                = SPACE
       IGNORE_CERR             = ABAP_TRUE
       REPLACEMENT             = '#'
       READ_BY_LINE            = 'X'
    IMPORTING
       FILELENGTH              =
       HEADER                  =
      CHANGING
        DATA_TAB                = itab[]
      EXCEPTIONS
        FILE_OPEN_ERROR         = 1
        FILE_READ_ERROR         = 2
        NO_BATCH                = 3
        GUI_REFUSE_FILETRANSFER = 4
        INVALID_TYPE            = 5
        NO_AUTHORITY            = 6
        UNKNOWN_ERROR           = 7
        BAD_DATA_FORMAT         = 8
        HEADER_NOT_ALLOWED      = 9
        SEPARATOR_NOT_ALLOWED   = 10
        HEADER_TOO_LONG         = 11
        UNKNOWN_DP_ERROR        = 12
        ACCESS_DENIED           = 13
        DP_OUT_OF_MEMORY        = 14
        DISK_FULL               = 15
        DP_TIMEOUT              = 16
        NOT_SUPPORTED_BY_GUI    = 17
        ERROR_NO_GUI            = 18
        others                  = 19
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thx
    Palani

    as you are telling that is comma delimited then save the file as comma delimited,
    this can be done uisng excel , open the text fiel with excel and save it as .csv file. and try ...
    or else i will tell another solution for it...
    Data: begin of itab occurs 0,
          rec(1000) type c,
          end of itab.
    Data: begin of itab2 occurs 0,
          matnr type mara-matnr
          werks type marc-werks
          quant(10) type c.
          end of itab2.
      file = 'C:test.txt'.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        filetype                = 'ASC'
         has_field_separator     = 'X'
        changing
          data_tab                = itab
      exceptions
        others                  = 17
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Loop at itab.
    clear itab2.
    split itab-rec at ',' into itab2-matnr
                               itab2-werks
                               itab2-quant.
    append itab2.
    endloop.
    you can do using any of the one...

  • Regarding semi colon seperated file for upload

    Hi Friends,
    I have an requirement where in to upload text files from presentation server which is semi colon seperated.
    I am able to upload to the internal table using GUI_UPLOAD, but the problem is sometimes in the text file one line can be in two lines where in the system takes it as two different lines of records.
    Could anyone suggest a logic to correct this.

    Hi,
    Use the below blog, it may help you...
    http://abaplog.wordpress.com/2007/08/15/reading-a-comma-delimited-file-in-abap-aka-csv-file/
    http://www.kyusl.com/ilya/csv.html
    You may need to adopt it to parse semicolon.
    Regards
    Karthik D

Maybe you are looking for

  • How do I find music purchased from iTunes on my home computer's music library

    I'm using iTunes to purchase music which I want to download on to my Sony Walkman. When I use Windows Media Player to sync from iTunes to the Walkman I do not see the music I purchased. Where do I find the music I purchased, on my computer, to be abl

  • Iweb updated page does not display correctly in firefox or safari

    www.rohanstevenson.com tried to update my site with a couple of cues and the wheels have completely come off. i cannot get the site to display correctly. it looks a bit better if i open the page directly from the computer, but after sending it to ftp

  • MacBook Pro or iMac 21"?

    I not sure wether to buy a MacBook Pro 15" or an iMac 21" i don't what would be better with what i do Can someone help?

  • IDVD won't Transition the finished project...

    Hello, I just saved my project using the "Flip" transition setting. After the project is burned the DVD plays the "None" transition setting. Has anyone ever had this problem before or know how to fix my problem? Thanks in advance! -Brad

  • Alpha layers in photoshop elements 5

    hello i am trying to figure out how to work with layers in elements 5 can it do alpha channels if so how do it do it have tried looking in the faq's must be missing somthing i have the manual for elements 5 and i still am unable to understand can any