[sqlldr] upload number datatype from varchar2 datatype in ctl file

dear friends.
this is two files from my DAT file.
In the last field the data is: |3180.8| or |605.|
00000000|0|0601|2000082|6|20131023414|3378|1|MATUTE|40|C|MATUTE|CUADRA 17 DE ISABEL LA CATOLICA|11|03|150115|3180.8|
00000000|0|0601|2000082|1|20131023414|3378|1|MATUTE|40|C|MATUTE|CUADRA 17 DE ISABEL LA CATOLICA|11|03|150115|605.|
in the table destination the field have NUMBER(12,2) and i want to upload in this datatype in my control file.
I had read about portable and non-portable datatypes but i dont understand. This topic is refer about my problem?
In other ways, what will be the instruction in order to upload this datatype ???
Thanks a lot.
cesar
P.D. please apologize my english

A lot of thanks my friend...
i saw in your example that is function... but... please, would you describe me what is my specific error in my files ?
Example of my datfile is:
00000000|0|0601|2000082|6|20131023414|3378|1|MATUTE|40|C|MATUTE|CUADRA 17 DE ISABEL LA CATOLICA|11|03|150115|3180.8|
00000000|0|0601|2000082|1|20131023414|3378|1|MATUTE|40|C|MATUTE|CUADRA 17 DE ISABEL LA CATOLICA|11|03|150115|605.|
My CTL file is:
Load DATA
APPEND
INTO TABLE PLANELEC.PEMVX_DATOSCOMPDOM
fields terminated by "|" TRAILING NULLCOLS
V_NUMPAQTE,
V_NUMLOTE,
V_NUMFORM,
N_NUMORDEN,
V_CODDOCIDE,
V_NUMDOCIDE,
N_NUMCORAPO,
N_ESTASGHAB,
V_NOMBREVIA,
V_NUMEROVIA,
V_INTERIOR,
V_NOMZONA,
V_REFERNCIA,
V_CODTVIA,
V_CODZONA,
V_CODUBIGEO,
TEST_INTEGER CONSTANT 0,
TEST_NUMBER (this is ths field where i put the last field of datfile)
This is my sh. file:
# /bin/bash
export ORACLE_SID=plelpp
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
sqlldr USERID=system, CONTROL=T818COMP.ctl, LOG=T818COMP.log, data=10pemvx_datoscompdom_20080304165740.dat, bad=T818COMP.bad, discard=T818COMP.dsc
And finally, this is my *.log file that show errors when i execute my sh file:
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 6 07:50:46 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: T818COMP.ctl
Data File: 10pemvx_datoscompdom_20080304165740.dat
Bad File: T818COMP.bad
Discard File: T818COMP.dsc
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table PLANELEC.PEMVX_DATOSCOMPDOM, loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
V_NUMPAQTE FIRST * | CHARACTER
V_NUMLOTE NEXT * | CHARACTER
V_NUMFORM NEXT * | CHARACTER
N_NUMORDEN NEXT * | CHARACTER
V_CODDOCIDE NEXT * | CHARACTER
V_NUMDOCIDE NEXT * | CHARACTER
N_NUMCORAPO NEXT * | CHARACTER
N_ESTASGHAB NEXT * | CHARACTER
V_NOMBREVIA NEXT * | CHARACTER
V_NUMEROVIA NEXT * | CHARACTER
V_INTERIOR NEXT * | CHARACTER
V_NOMZONA NEXT * | CHARACTER
V_REFERNCIA NEXT * | CHARACTER
V_CODTVIA NEXT * | CHARACTER
V_CODZONA NEXT * | CHARACTER
V_CODUBIGEO NEXT * | CHARACTER
TEST_INTEGER CONSTANT
Value is '0'
TEST_NUMBER NEXT * | CHARACTER
value used for ROWS parameter changed from 64 to 58
Record 1: Rejected - Error on table PLANELEC.PEMVX_DATOSCOMPDOM, column TEST_NUMBER.
ORA-01722: numero no valido
Record 2: Rejected - Error on table PLANELEC.PEMVX_DATOSCOMPDOM, column TEST_NUMBER.
ORA-01722: numero no valido
Record 3: Rejected - Error on table PLANELEC.PEMVX_DATOSCOMPDOM, column TEST_NUMBER.
ORA-01722: numero no valido
Record 4: Rejected - Error on table PLANELEC.PEMVX_DATOSCOMPDOM, column TEST_NUMBER.
ORA-01722: numero no valido
Record 5: Rejected - Error on table PLANELEC.PEMVX_DATOSCOMPDOM, column TEST_NUMBER.
ORA-01722: numero no valido
Table PLANELEC.PEMVX_DATOSCOMPDOM:
0 Rows successfully loaded.
5 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 254504 bytes(58 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 5
Total logical records rejected: 5
Total logical records discarded: 0
Run began on Thu Mar 06 07:50:46 2008
Run ended on Thu Mar 06 07:50:49 2008
Elapsed time was: 00:00:02.95
CPU time was: 00:00:00.02
Please,
would you help me ? is very important.
a lot of thanks...
cesar

Similar Messages

  • Converting datatype from Varchar2 to BLOB ...how..???

    Hi i have to convert the datatype of a varchar2 column in one of my tables to BLOB...and i also have to preserve the data existing in the column in the process.
    Please guide .
    Thanks.

    first of all, I don't think that BLOB and VARCHAR2 are compatible, logically that is. BLOB is binary and VARCHAR2 is mere text.
    The way I'd do it is to have all the VARCHAR2 saved into text files and then stored in BLOB. Here is a hint:
    let's call your VARCHAR2 column 'X'
    1- create a new column in the table of type BLOB and call it 'Y'.
    2- using pl/sql text I/O, save each VARCHAR2 in a text file using the primary key of the table as file name.
    3- upload each file back to the table in it's corresponding record in column 'Y'.
    4- update the table setting 'X' in each table to NULL.
    5- alter table to delete column 'X'.
    6- alter table to rename 'Y' ---> 'X'
    finally, before doing any of these steps make sure you have enough disk space and that you really know how to deal with BLOB's as they need special insert and update commands.
    hope that helped
    Nasser Asiri

  • Change column datatype from varchar2 to number(10) and keep existing data

    Hi,
    I need to change the datatype on a column that already has data in it from a varchar2 to number(10). The data that is already there is not necessarily number data, however I must be able to keep the old data to. We are running 10g. Does anyone have any ideas? Thanks. Here's the current data.
    Current Values for From_Value
    T
    U
    T2
    K
    M
    A
    T
    T1
    O
    E
    S
    NSTU
    4

    Example of keeping the data in the current column and adding a new numeric column for numeric data:
    SQL> drop table t purge;
    Table dropped.
    SQL> create table t(i int, x varchar2(10));
    Table created.
    SQL> insert into t values(1, 'T1');
    1 row created.
    SQL> insert into t values(2, 2);
    1 row created.
    SQL> --
    SQL> alter table t add (xn number);
    Table altered.
    SQL> --
    SQL> begin
      2  for c in (select i, x from t)
      3  loop
      4   begin
      5   update t set xn = to_number(c.x) where i = c.i;
      6   exception
      7    when invalid_number then null;
      8   end;
      9  end loop;
    10  end;
    11  /
    PL/SQL procedure successfully completed.
    SQL> show errors
    No errors.
    SQL> select * from t;
             I X                  XN
             1 T1
             2 2                   2

  • Run time error INVALID DATATYPE from package

    Hi,
    I compiled the package spec. and body. But, when I issue select mytest_pack.get_res_set from dual, oracle return invalid data type error.
    My requirement to develop packaged function need to return multiple rows by using record type. This can be achieved by using pipe lined function or
    sys refcursor. But, I would like the packaged function return must return record type.
    Can you pl. correct this package code.
    Thanks,
    Murali
    create or replace package mytest_pack as
    Type lvr_type is Record
              id number,
              email varchar(50)
    type lvr_recs is table of lvr_type;
         function get_res_set return lvr_recs;
    end mytest_pack;
    create or replace package body mytest_pack as
         function get_res_set return lvr_recs is     
              t_test lvr_recs := lvr_recs();
              r_test lvr_type;
              cursor c1 is select row_id, email from mytable;
         begin
              for rec in ( select row_id, email from mytable )
              loop
                        t_test.extend;
                        r_test.id           := rec.row_id;
                        r_test.email           := rec.email;
                        t_test(t_test.count) := r_Test;
                   end loop;      
         return t_test;
         end get_res_set;     
    end mytest_pack;
    Table mytable script script is
    CREATE TABLE MYTABLE
    (Row_id NUMBER,
    Email VARCHAR2(50),
    Option_Name VARCHAR2(2000),
    Option_Value_1 VARCHAR2(2000),
    Option_Value_2 VARCHAR2(2000),
    Last_Update_Date DATE
    insert into mytable values (1, '[email protected]', 'XOPT 1', 'OPT 2', 'OPT 3', sysdate);
    insert into mytable values (2, '[email protected]', 'YOPT 1', 'OPT 2', 'OPT 3', sysdate);

    I dont see any problem with your code.
    The problem is with "select mytest_pack.get_res_set from dual"
    You cannot select complex datatypes from dual.
    Why dont you try an anonymous pl/sql block and try assigning the record values into another record or table.
    select xxx into xxx ...

  • How to convert number datatype to raw datatype for use in data warehouse?

    I am picking up the work of another grad student who assembled the initial data for a data warehouse, mapped out a dimensional dw and then created then initial fact and dimension tables. I am using oracle enterprise 11gR2. The student was new to oracle and used datatypes of NUMBER (without a length - defaulting to number(38) for dimension keys. The dw has 1 fact table and about 20 dimension tables at this point.
    Before refining the dw further, I have to translate all these dimension tables and convert all columns of Number and Number(n) (where n=1-38) to raw datatype with a length. The goal is to compact the size of the dw database significantly. With only a few exceptions every number column is a dimension key or attribute.
    The entire dw db is now sitting in a datapump dmp file. this has to be imported to the db instance and then somehow converted so all occurrences of a number datatype into raw datatypes. BTW, there are other datatypes present such as varchar2 and date.
    I discovered that datapump cannot convert number to raw in an import or export, so the instance tables once loaded using impdp will be the starting point.
    I found there is a utl_raw package delivered with oracle to facilitate using the raw datatype. This has a numbertoraw function. Never used it and am unsure how to incorporate this in the table conversions. I also hope to use OWB capabilities at some point but I have never used it and only know that it has a lot of analytical capabilities. As a preliminary step I have done partial imports and determined the max length of every number column so I can alter the present schema number columns tp be an apporpriate max length for each column in each table.
    Right now I am not sure what the next step is. Any suggestions for the data conversion steps would be appreciated.

    Hi there,
    The post about "Convert Numbers" might help in your case. You might also interested in "Anydata cast" or transformations.
    Thanks,

  • How to get a time part from Date datatype

    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? If my input is '27-SEP-2011 23:59:00' I need the output as 23:59:00. I am surprised to see that there are no in-built functions for this or may be I am wrong. Basically I need to remove the date part from DATE data type and get the time.Please assist.
    -Thanks
    Edited by: user9546145 on Sep 27, 2011 2:24 PM
    Edited by: user9546145 on Sep 27, 2011 2:25 PM

    Hi,
    user9546145 wrote:
    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? Be careful! In Oracle, TIMESTAMP means a datatype, similar to but distinct from DATE. You'll avoid confusion if you don't use the word "timestamp" to mean anything else.
    There is a built-in function, TO_CHAR:
    TO_CHAR (dt_col, 'HH24:MI:SS')Depending on how you plan to use the time, TRUNC is another handy built-in function:
    dt_col - TRUNC (dt_col)is a NUMBER (not less than 0, but less than 1) which is suitable for many tasks, such as finding the average time.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • Convert Varchar2 datatype Date Value To Date Datatype

    Hello,
    I have a date value like the following as varchar2 datatype.
    31-DEC-10 08.40.53 AMI would like to convert this to_date as date datatype.
    How could I do this?

    Use the right format mask?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions183.htm#SQLRF06132
    SQL> select to_date('31-DEC-10 08.40.53 AM', 'dd-mon-yy hh.mi.ss am')
      2  from  dual;
    TO_DATE('31-DEC-100
    31-12-2010 08:40:53
    1 row selected.
    SQL> declare
      2    dt date;
      3  begin
      4    dt := to_date('31-DEC-10 08.40.53 AM', 'dd-mon-yy hh.mi.ss am');
      5    dbms_output.put_line(to_char(dt, 'dd-mm-yyyy hh24:mi:ss'));
      6  end;
      7  /
    31-12-2010 08:40:53
    PL/SQL procedure successfully completed.

  • Difference between CHAR and VARCHAR2 datatype

    Difference between CHAR and VARCHAR2 datatype
    CHAR datatype
    If you have an employee name column with size 10; ename CHAR(10) and If a column value 'JOHN' is inserted, 6 empty spaces will be inserted to the right of the value. If this was a VARCHAR column; ename VARCHAR2(10). How would it handle the column value 'JOHN' ?

    The CHAR datatype stores fixed-length character strings, and Oracle compares CHAR values using blank-padded comparison semantics.
    Where as the VARCHAR2 datatype stores variable-length character strings, and Oracle compares VARCHAR2 values using nonpadded comparison semantics.
    This is important when comparing or joining on the columns having these datatypes;
    SQL*Plus: Release 10.2.0.1.0 - Production on Pzt Au 6 09:16:45 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn hr/hr
    Connected.
    SQL> set serveroutput on
    SQL> DECLARE
    2 last_name1 VARCHAR2(10) := 'TONGUC';
    3 last_name2 CHAR(10) := 'TONGUC';
    4 BEGIN
    5 IF last_name1 = last_name2 THEN
    6 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is equal to -' || last_name2
    || '-');
    7 ELSE
    8 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is NOT equal to -' || last_n
    ame2 || '-');
    9 END IF;
    10 END;
    11 /
    -TONGUC- is NOT equal to -TONGUC -
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2 last_name1 CHAR(6) := 'TONGUC';
    3 last_name2 CHAR(10) := 'TONGUC';
    4 BEGIN
    5 IF last_name1 = last_name2 THEN
    6 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is equal to -' || last_name2
    || '-');
    7 ELSE
    8 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is NOT equal to -' || last_n
    ame2 || '-');
    9 END IF;
    10 END;
    11 /
    -TONGUC- is equal to -TONGUC -
    PL/SQL procedure successfully completed.
    Also you may want to read related asktom thread - "Char Vs Varchar" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1542606219593
    and http://tahitiviews.blogspot.com/2007/05/less-is-more-more-or-less.html
    Best regards.

  • Anyone know why uploads contacts disappear from the iPhone 5? Half of my number is suddenly gone, and this happens over and over again? Kata-*******-stroff! Grateful for answers?

    IPHONE 5
    Anyone know why uploads contacts disappear from the iPhone 5?
    Half of my number is suddenly gone, and this happens over and over again?
    Kata-*******-stroff! Grateful for answers?

    do you sync your contacts with an application in your computer? or use iCloud?
    I can't tell you why the contacts disappear but you can get them back without much hassle by syncing through iTunes with your computer.
    do you regularly make backups?  if so, you can restore your iPhone using the backups and get your contacts back in your iPhone.
    It is strange that half of your contacts are gone over and over again.  Do you have Groups that are unchecked in your iPhone?  If so, the contacts in those groups will not appear in your contacts list but they are in your iPhone and be recovered by re-checking the group name.

  • Help changing all PK and FK datatypes from uniqueidentifier to nvarchar(128)

    Is there a simple script to iterate through all my tables and change my PK and FK datatypes to nvarchar(128)? I don't want to have to go through each table manually, remove relationships, and change each key one by one. Here is my db schema if it helps.

    Hi Man_Cat,
    According to your description, you are looking for the script to update all the PK and FK datatypes from uniqueidentifier to nvarchar(128), right?
    Based on my research, we cannot change the data type of the Primary Key and Foreign Key directly as Tom said. However, we can drop the PK and FK and recreate them use the query below.
    --This will drop the primary key temporarily
    ALTER TABLE MyTable
    drop CONSTRAINT PK_MyTable
    --change data type
    ALTER TABLE MyTable
    ALTER COLUMN PrimaryKeyID BigInt
    --add primary key
    ALTER TABLE MyTable
    ADD CONSTRAINT PK_MyTable PRIMARY KEY (PrimaryKeyID)
    Reference
    http://forums.asp.net/t/1528279.aspx?Alter+script+to+change+the+Primarykey+Column+datatype
    Regards,
    Charlie Liao
    TechNet Community Support

  • Unpacking DOUBLE datatype from UNIX

    In a SQL LOADER control file, we are trying to unpack a DOUBLE datatype from UNIX and put it into Oracle (8.1.7) database. Can we use the same ASCII function that we would use for a Long datatype?
    null

    CAR 399895 discussed in this thread has been fixed in LabVIEW 2013. For a more complete list of bugs fixed in LabVIEW 2013, check the LabVIEW 2013 Bug Fixes. You can download an evaluation copy of LabVIEW 2013 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.
    Jeff Peacock
    Product Support Engineer | LabVIEW R&D | National Instruments

  • Substring to convert from varchar2 to number

    Hello all,
    I have a little question..
    columnA
    '123 d'
    '98-f'
    '34.4'
    How is it possible to get only the fist number characters of the column?
    select substr(columnA,1,instr(columnA, non number char ) from dual ..
    Anyone can help me ?
    tnx Ludo

    Hi, Ravi,
    ravikumar.sv wrote:
    Ludock wrote:
    Hello all,
    I have a little question..
    columnA
    '123 d'
    '98-f'
    '34.4'
    since decimals are also there in your data....You're right! I missed that.
    select REGEXP_SUBSTR ( val1, '[[:digit:]]+\.?[[:digit:]]+')that requires there to be at least one digit before the decimal point and at least one digit after the decimal point.
    Even worse, it ignores single-digit numbers unless they are followed by a decimal point and at least one more digit.
    Unfortunately, to really check for numbers (including optional decimal points) is much messier.
    For example:
    TO_NUMBER (REGEXP_SUBSTR ( columna
                          , '[+-]?'          ||     -- Optional sign
                      '('               ||     -- choice: either
                        '[0-9]+'     ||     --   (1) 1 or more digits
                        '\.?'          ||     --         then an optional decimal point
                            '[0-9]*'     ||     --         then 0 or more digits
                      '|'               ||     -- or
                        '\.'          ||     --   (2) a decimal point
                        '[0-9]+'     ||     --         followed by 1 or more digits
              )            )Edited by: Frank Kulash on Oct 30, 2009 8:18 AM

  • How do I upload the contacts from my iPhone 5S to the Bluetooth device on my Toyota RAV4.  The car manual says to consult the phone's bluetooth instruction manual, but I don't have one.

    How do I upload the contacts from my iPhone 5S to the Bluetooth device on my Toyota RAV4?  The car manual says to consult the phone's Bluetooth instruction manual, but I don't have a manual for that.

    That is very strange... I wonder if it has something to do with the firmware or some sort of error. I haven't ran into this but at the shop I work at I've ran into several firmware errors on iPhone 4 all the way through the 5s. Maybe its something as simple as putting a different part of the code into iTunes... I know you can something of this extent. I would look up error 1669, I know you have tried a number of things but look it up on the forum and see what fixes are available so that you may be able to restore it properly without all this garbage you are running into. Just a thought for you.

  • Upload data from excel (not the excle file) into SAP

    Guys,
    how can we upload data from excel sheet into SAP? I mean just the data not the entire file,
    I have a requirement where user press a button in excel sheet and the data in the sheet will get uploaded into SAP.
    I am sure we have to use BAPI and some VB programming for macros, I will really appriciate if anyone can help how to achive this.
    some sample code exampe will help.
    Cheers!

    I think u r writing BDC for Uploading the data from excel flile to sap. for this is the code I am sending u can use then for Uploading data from excel to sap.
    DATA: lv_filename TYPE rlgrap-filename.
    FIELD-SYMBOLS : <fs>.
    DATA : l_intern TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA : l_index TYPE i.
    PARAMETERS : startcol TYPE i ,
          startrow TYPE i ,
          endcol TYPE i ,
          endrow TYPE i .
    PARAMETERS: p_flnam LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam.
      CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       program_name        = sy-repid
      FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_flnam .
      MOVE p_flnam TO lv_filename.
    Uploading the flat file from the desktop
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                      = lv_filename
          i_begin_col                   = startcol
          i_begin_row                   = startrow
          i_end_col                     = endcol
          i_end_row                     = endrow
        TABLES
          intern                        = l_intern
    EXCEPTIONS
      INCONSISTENT_PARAMETERS       = 1
      UPLOAD_OLE                    = 2
      OTHERS                        = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT l_intern BY row col.
      LOOP AT l_intern.
        MOVE l_intern-col TO l_index.
        ASSIGN COMPONENT l_index OF STRUCTURE itab TO <fs>.
        MOVE l_intern-value TO <fs>.
        AT END OF row.
          APPEND itab.
          CLEAR itab.
        ENDAT.
      ENDLOOP.
    I hope it will help u.
    Regards
    Nayan

  • Problem in the BDC program to upload the data from a flat file.

    Hi,
    I am required to write a BDC program to upload the data from a flat file. The conditions are as mentioned below:-
    1) Selection Screen will be prompted to user and user needs to provide:- File Path on presentation server (with F4 help for this obligatory parameter) and File Separator e.g. @,#,$,%,... etc(fields in the file will be separated by using this special character) or fields may be separated by tab(tab delimited).
    2) Finally after the data is uploaded, following messages need to be displayed:-
    a) Total Number of records successfully uploaded.
    b) Session Name
    c) Number of Sessions created.
    Problem is when each record is fetched from flat file, the record needs to be split into individual fields separated by delimiter or in case tab separated, then proceeding in usual manner.
    It would be great if you provide me either the logic, pseudocode, or sample code for this BDC program.
    Thanks,

    Here is an example program,  if you require the delimitor to be a TAB, then enter TAB on the selection screen, if you require the delimitor to be a comma, slash, pipe, whatever, then simply enter that value.  This example is simply the uploading of the file, not the BDC, I assume that you know what to do once you have the data into the internal table.
    REPORT zrich_0001.
    TYPES: BEGIN OF ttab,
            rec TYPE string,
           END OF ttab.
    TYPES: BEGIN OF tdat,
           fld1(10) TYPE c,
           fld2(10) TYPE c,
           fld3(10) TYPE c,
           fld4(10) TYPE c,
           END OF tdat.
    DATA: itab TYPE TABLE OF ttab.
    data: xtab like line of itab.
    DATA: idat TYPE TABLE OF tdat.
    data: xdat like line of idat.
    DATA: file_str TYPE string.
    DATA: delimitor TYPE string.
    PARAMETERS: p_file TYPE localfile.
    PARAMETERS: p_del(5) TYPE c.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      DATA: ifiletab TYPE filetable.
      DATA: xfiletab LIKE LINE OF ifiletab.
      DATA: rc TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        CHANGING
          file_table = ifiletab
          rc         = rc.
      READ TABLE ifiletab INTO xfiletab INDEX 1.
      IF sy-subrc = 0.
        p_file = xfiletab-filename.
      ENDIF.
    START-OF-SELECTION.
      TRANSLATE p_del TO UPPER CASE.
      CASE p_del.
        WHEN 'TAB'.
          delimitor = cl_abap_char_utilities=>horizontal_tab.
        WHEN others.
          delimitor = p_del.
      ENDCASE.
      file_str = p_file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename = file_str
        CHANGING
          data_tab = itab.
      LOOP AT itab into xtab.
        CLEAR xdat.
        SPLIT xtab-rec AT delimitor INTO xdat-fld1
                                         xdat-fld2
                                         xdat-fld3
                                         xdat-fld4.
        APPEND xdat to idat.
      ENDLOOP.
      LOOP AT idat into xdat.
        WRITE:/ xdat-fld1, xdat-fld2, xdat-fld3, xdat-fld4.
      ENDLOOP.
    Regards,
    Rich Heilman

Maybe you are looking for

  • DVD drive does not play some DVDs properly

    Hi, My Macbook was purchased in 2007; So it is a bit old. I haven't used the DVD drive very often. I bought two new DVDs from Amazon recently. However, when I played them in my Macbook using DVD Player, the disk pauses and skips very often, making it

  • Can´t use my paid MUSE CC ....

    Well, i downloaded the Testversion of muse with my old adobe account and want to go on with this program, because i liked it... Now some months later i made a new adobe account and bought muse for 1 year... So i deleted the old creative cloud and dow

  • Where are my Photos stored if I want to access them through a third party

    Hello! I want to be able to back up my photos from the new Photos for OS X using a third party - such as Google+ Auto Backup.  I am trying to point Google+ to the source of my photos, but can not figure out where they are located in the Finder!! The

  • What is the port for FTPS communication in File Adapter

    Hi All,          For FTP communication the port is 21, whats the port for FTPS communication. XIer

  • Virus on my macbook

    I went to school the other day and the computers there detected a virus on my flash drive. I came home got Norton and scanned the computer. It found about 3 instances of some form of "hacktool." At the same time my computer had been running really sl