Gui_upload for csv file with numeric n date fields

Hi ,
  i searched on net on how to use GUI_UPLOAD for csv files using split function but the spilt function requires that the data type of all fields of the internal table should be character whereas in my case there is a numeric n data field too.So kindly help me how to do it.
One way ppl might suggest that give all the fields as char in the internal n after recieving the data in the internal convert the required fields back to data n numeric n then finally insert to the database but if i have 80 fields u would really dont want to do that as it requires precision to convert it to the same type n length as in the original database for all the fields.

yeah i guess that would be a bit longer if i m having more no of fields (80) compared to ORACLE where this can be done in a shorter way.
SO i shall use 2 internal tables here rite?? i mean first one(with all fields as char) for storing the split function values and the other one (with actual data types) .CAN u plz tell me how to convert or cast from one data type to another n while moving values from 1st internal table to another  which way shall i do.
Thanks for ur help n can u suggest if there is any other method for uploading csv also other than this split method n whether this method is better n faster than others.
THANX

Similar Messages

  • Uploading csv file with number type data to database using apex

    hi
    am trying to upload csv file to oracle database using apex when i select the file using file browser and click on the button.
    my table looks like
    coloumn type
    col1 number(2)
    col2 number(2)
    col3 number(2)
    col4 number(2)
    please tell me the steps i need to follow
    urgent requirement

    This thread should help - Load CSV file into a table when a button is clicked by the user

  • Sender FCC for CSV file with Reoccuring Record Structures

    Hello,
    I am trying to use FCC to bring in an X12850 Purchase Order file layout WITHOUT using seeburger, etc.
    The Configuration I have in place works if the text file is:
    Heading1
    Heading2
    detail1
    detail2
    detail3
    Footer1
    OR the text file contains:
    Heading1
    Heading2
    detail1
    detail1
    detail2
    detail2
    detail3
    detail3
    Footer1
    Unfortunately, the file I need to work has the format:
    Heading1
    Heading2
    detail1
    detail2
    detail3
    detail1
    detail2
    detail3
    Footer1
    When I try to send process this file I get the error ERROR consistency check in recordset structure validation (line no.6 : missing structure(s) before type detail1
    Is it possible via FCC to bring in this file as XML?

    If you change the record sequence to variable it works.

  • How to import data from CSV file with columns separated by semicolon?

    I migrate database from MS SQL 2008 to ORACLE 11g
    I export data to CSV file from MS SQL
    then I try to import it to Oracle
    several tables goes fine using Import data option in the SQL Developer
    Standard CSV files with data separated by comma were imported.
    chars, date (with format string), and integer data are imported via import wizard without problems
    the problems were when I try to import table with noninteger numbers with modal part separated by comma not by dot
    comma is the standard separator for columns in CSV file
    so I must change the standard separator to semicolon
    then the import wizard have problem to correct recognize the columns data because it use only standard CSV comma separator :-/
    In SQL Developer 1.5.3 Tools -> Preferences -> Migration -> Data Move Options
    I change "End of Column Delimiter" to ; but it doens't work
    Is this possible to change the standard column separator for import data wizzard in SQL Developer 1.5.3?
    Or maybe someone know how to import data in SQL Developer 1.5.3 from CSV when CSV colunn separator is set to semicolon?

    A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.

  • How to upload .csv file with tab as delimiter.

    HI,
    I want to upload a .csv file with tab as delimiter to unix path in background.                                                                                                             
    I know there is function module 'GUI_UPLOAD', but in my case data is available in an internal table .
    upload the *.CSV :
    OPEN DATASET lv_filename
             FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc = 0.
      *     Write  file records into file on application server
          LOOP AT gt_datatab INTO gs_datatab.
            TRANSFER gs_datatab TO lv_filename.
          ENDLOOP.
    CLOSE DATASET lv_filename.

    Bhanu,
    Define a local variable of type CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    LV_TAB TYPE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
    LOOP AT  GT_DATATAB INTO GS_DATATAB.
    CONCATENATE GS_DATATAB-FIELD1
                             GS_DATATAB-FIELD2
                             GS_DATATAB-FIELDN
                             INTO LV_STRING SEPARATED BY LV_TAB.
    TRANSFER LV_STRING TO lv_filename.
    ENDLOOP.
    Thanks,
    Vikram.M

  • Is there a way to open CSV files with more than 255 columns?

    I have a CSV file with more than 255 columns of data.  It's a fairly standard export of social media data that shows volume of posts by day for the past year, from which I can analyze the data and publish customized charts. Very easy in Excel but I'm hitting the Numbers limit of 255 columns per table. Is there a way to work around the limitation? Perhaps splitting the CSV in two? The data shows up in the CSV file when I open via TextEdit, so it's there. Just can't access it in Numbers. And it's not very usable/useful for me in TextEdit.
    Regards,
    Tim

    You might be better off with Excel. Even if you could find a way to easily split the CSV file into two tables, it would be two tables when you want only one.  You said you want to make charts from this data.  While a series on a chart can be constructed from data in two different tables, to do so takes a few extra steps for each series on the chart.
    For a test to see if you want to proceed, make two small tables with data spanning the tables and make a chart from that data.  Make the chart the normal way using the data in the first table then repeat the following steps for each series
    Select the series in the chart
    Go to Format sidebar
    Click in the "Value" box
    Add a comma then select the data for this series from the second chart
    Press Return
    If there is an easier way to do this, maybe someone else will chime in with that info.

  • Unable to Load CSV file with comma inside the column(Sql Server 2008)

    Hi,
    I am not able load an CSV file with Comma inside a column. 
    Here is sample File:(First row contain the column names)
    _id,qp,c
    "1","[ ""0"", ""0"", ""0"" ]","helloworld"
    "1","[ ""0"", ""0"", ""0"" ]","helloworld"
    When i specify the Text Qualifier as "(Double quotes) it work in SQL Server 2012, where as fail in the SQL Server 2008, complaining with error:
    TITLE: Microsoft Visual Studio
    The preview sample contains embedded text qualifiers ("). The flat file parser does not support embedding text qualifiers in data. Parsing columns that contain data with text qualifiers will fail at run time.
    BUTTONS:
    OK
    I need to do this in sql server 2008 R2 with Service pack 2, my build version is 10.50.1600.1.
    Can someone let me know it is possible in do the same way it is handle in SQL Server 2012?
    Or
    It got resolved in any successive Cumulative update after 10.50.1600.1?
    Regards Harsh

    Hello,
    If you have CSV with double quotes inside double quotes and with SSIS 2008, I suggest:
    in your data flow you use a script transformation component as Source, then define the ouput columns id signed int, Gp unicode string and C unicode string. e.g. Ouput 0 output colmuns
    Id - four-byte signed
    gp - unicode string
    cc - unicode string
    Do not use a flat file connection, but use a user variable in which you store the name of the flat file (this could be inside a for each file loop).
    The user variable is supplied as a a readonly variable argument to the script component in your dataflow.
    In the script component inMain.CreateNewOutputRows use a System.IO.Streamreader with the user variable name to read the file and use the outputbuffer addrow method to add each line to the output of the script component.
    Between the ReadLine instraction and the addrow instruction you have to add your code to extract the 3 column values.
    public override void CreateNewOutputRows()
    Add rows by calling the AddRow method on the member variable named "<Output Name>Buffer".
    For example, call MyOutputBuffer.AddRow() if your output was named "MyOutput".
    string line;
    System.IO.StreamReader file = new System.IO.StreamReader( Variables.CsvFilename);
    while ((line = file.ReadLine()) != null)
    System.Windows.Forms.MessageBox.Show(line);
    if (line.StartsWith("_id,qp,c") != true) //skip header line
    Output0Buffer.AddRow();
    string[] mydata = Yourlineconversionher(line);
    Output0Buffer.Id = Convert.ToInt32(mydata[0]);
    Output0Buffer.gp = mydata[1];
    Output0Buffer.cc = mydata[2];
    file.Close();
    Jan D'Hondt - SQL server BI development

  • I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I would also recommend to write the description into the meta data. This would allow to place a text frame above the image and it is possible to add meta information and file name automatically together with the image, when you place it or even in a prepared template.
    Meta data information can be written easily in Bridge in the Meta File Workspace.

  • Reading a csv file with a large number of columns

    Hello
    I have been attempting to read data from large csv files with 38 columns by reading a line using readline and scanning the linebuffer using scan.
    The file size can be up to 100 MB.
    Scan does not seem support the large number of fields.
    Any suggestions on reading the 38 comma separated fields. There is one header line in the file.
    Thanks
    Solved!
    Go to Solution.

    see if strtok() is useful  http://www.elook.org/programming/c/strtok.html

  • Directory for archiving files with errors

    HI ,
    My Scenario is file to RFC Asynch.
    when ever the PI picks file from the source directory that file need to delete from the path and need to be archived to some other patch.
    And if the file has wrong data it need to archive to error archive folder.
    For this I used  Archive processing in filesender adapter and I also used directory for archiving files with errors(for wrong data files).
    Now the files are arching successfully in the given archive folder for successful messages. But the error files (wrong data which are throwing mapping error in MONI) are also archiving in the same archive folder.
    But these error files need to archive in error archive folder.
    How can I achieve this?
    Thanks in Adv..
    Vankadoath.

    you can use raja's logic ..........in addition in second receiver do a simple mapping UDF to delete the file from the SUCCESS folder. otherwise your file will be archived in both the folder success and errror
    see this code.
    DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
                         inputFileName = conf.get(keyFileName1);
      *File f1 = new File("/usr/sap/XX/"+keyFileName1);*
      *boolean success = f1.delete();*
      *if (!success){*
      *System.out.println("Deletion failed.");*
      *System.exit(0);*
      *}else{*
      *System.out.println("File deleted.");*

  • How to generate a second csv file with different report columns selected?

    Hi. Everybody:
    How to generate a second csv file with different report columns selected?
    The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
    (The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
    Thank you for any help!
    MZ

    Hello,
    I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
    in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
    You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
    The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
    An example code would be something like
    PROCEDURE srn_brief_mitglieder (
         p_start_mg_nr IN NUMBER,
         p_ende_mg_nr IN NUMBER
    AS
    export_file          UTL_FILE.FILE_TYPE;
    l_line               VARCHAR2(20000);
    l_lfd               NUMBER;
    l_dateiname          VARCHAR2(100);
    l_datum               VARCHAR2(20);
    l_hilfe               VARCHAR2(20);
    CURSOR c1 IS
    SELECT
    MG_NR
    ,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
    ,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
    ,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
    FROM MITGLIEDER
    WHERE MG_NR >= p_start_mg_nr
    AND MG_NR <= p_ende_mg_nr
    --WHERE ROWNUM < 10
    ORDER BY MG_NR;
    BEGIN
    SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
    SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
    l_datum := l_datum||'_'||l_hilfe;
    --DBMS_OUTPUT.PUT_LINE ( l_datum);
    l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
    --DBMS_OUTPUT.PUT_LINE ( l_dateiname);
    export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
    l_line := '';
    --HEADER
    l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
    l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
         UTL_FILE.PUT_LINE(export_file, l_line);
    FOR rec IN c1
    LOOP
         l_line :=  '"'||rec.MG_NR||'"';     
         l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
         l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';     
         l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';          
    --     DBMS_OUTPUT.PUT_LINE (l_line);
    -- in datei schreiben
         UTL_FILE.PUT_LINE(export_file, l_line);
    END LOOP;
    UTL_FILE.FCLOSE(export_file);
    END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM

  • Change Open With for all files with a specific extension

    Hi, I've been using OS X for quite some time, but more recently cannot see how you do the following which is proving frustrating:
    * Open Get Info for a file,
    * Use the drop down under Open With to choose Other,
    * Select an appropriate application that wasn't on the drop down list (in this case Smultron text editor for CSV files),
    * Press the Change All button and the drop down turns back to Excel which was the previous default.
    So basically, how do I change all files with CSV extension to Smultron when Smultron wasn't in the list of Open With items and I have to use Other from the list. This is repeatable for any file type with any application that isn't listed and is on both my iMac and my work's MacBook. Try it yourself and you'll see what I mean!!
    Thanks

    Stuart Mchattie wrote:
    Thanks NeroWolf,
    Your solution does work for that single file, but doesn't change the system wide association of that file extension with a particular application. It is because this works that I believe the problem I am having is uncircumventable and is in fact a bug in the OS. Could anyone else confirm this?
    Cheers,
    Stuart
    It might be a bug. What I found is that the icon does not change unless I log out/in or reboot, even when the app normally puts an icon on the file.
    For example if I change an audio file to always open with VLC, it does even though the icon remains as before. However, even though clicking plays the audio with VLC, if I right click the file and select "Open With" it still says iTunes (app) default which is incorrect.
    Message was edited by: nerowolfe

  • Write the results script of results log pane to XLS or CSV file with VBA.

    Hi,
    How can I write the results script of results log pane to XLS or CSV file with VBA code or something? I tried so hard but i can't.
    Thanks

    MoGas,
    This is actually not a trivial process. You need to use the results object and code it to write to your file (it is described in the help files).
    e-Tester automatically saves the results log as a text file so you may just want to stick with that for simplicity.

  • Opening up csv file with Excel

    There is a file that is comma separated values. When I open this file in Windows, I get Excel. When I open the same file in the Mac, I get a text file. How can I make it a default for csv files to open in Excel?

    Select the file then press COMMAND-I to open the Get Info window. In the section titled "Open With" select Excel from the dropdown menu. If you want all CSV files to be opened by Excel, then click on the "Change All" button.
    A better solution is to run Excel and import this particular file. Then save as a standard spreadsheet file.

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

Maybe you are looking for