Error in Upload CSV file

Hi All
I am getting wrong data in my table column.
I am having one table ABC(A_TEST1 VARCHAR(250) , A_TEST2VARCHAR(250));
In my file data is
COL 1, COL 2
A,"A,A"
B,
C,"C,C"
D,
E,"E,E"
The code which i am using for upload data is below.
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_id NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
v_approval char(1) :='N';
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
v_err varchar(10) := NULL;
v_rows NUMBER;
v_sr_no NUMBER;
begin
-- Read data from wwv_flow_files</span>
select blob_content into v_blob_data from APEX_APPLICATION_FILES where name = :P4_UPLOAD;
select ID into v_id from APEX_APPLICATION_FILES where name= :P4_UPLOAD;
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char</span>
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved </span>
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities </span>
v_line := REPLACE (v_line, ',', ':');
-- Convert each column separated by : into array of data </span>
v_data_array := wwv_flow_utilities.string_to_table (v_line);
-- Insert data into target table </span>
EXECUTE IMMEDIATE 'insert into ABC(a_test1,a_test2)
values (:1,:2)'
USING
v_data_array(1),
v_data_array(2);
-- -- Clear out
v_line := NULL;
v_sr_no := v_sr_no + 1;
END IF;
END LOOP;
COMMIT;
end;
Please help me in this Issue.
Thanks,
Anu.

Hi,
Your code do not handle data where is separators even you optionally enclosed value.
You need program logic that can handle your data and optionally enclosed values.
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Edited by: jarola on Dec 6, 2011 11:26 AM
You can find solution that handle enclosed data from here
http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:11000346061523

Similar Messages

  • Error in upload CSV file format ?

    Hi everyone !
    What to do in this case when I've to upload my CSV file
    (Report 2.14MB & Form 430KB), getting error.Can anybody help me in this regard when the values stored (Numeric+character), my data is considerably long,What I can do that in this respect?
    "Error ORA-20001:Unable to create collection
    Error ORA-06502:numeric or value error"
    Helps in helping you !
    Thanks in advance
    Oracle is not just a Database, it's the lifestyle

    hi muhammad--
    though your initial post seemed to suggest that you were trying to upload a very large spreadsheet into a table via our DataWorkshop (for which i'd still run with holger's suggestion above), your follow up seems to ask about enabling spreadsheet upload/download from within your app. you probably know by now that it's a pretty simple matter to turn on the ability for your report regions in htmldb to output to csv format. there's a "CSV Output" region on the report attributes page to let you control that stuff. regarding the ability to upload spreadsheet data into a table within HTML DB, there's no functionality built into htmldb for facilitate this for you. i'm still not sure if this is what you're looking for, but i explained a little about what it would take to implement one method of excel data upload functionality into one's app at the bottom of...
    Bulk Insert, SQL*Loader style
    ...hope this helps,
    raj

  • Error uploading csv file

    Hello,
    I'm trying to upload a CSV file with the next format but i receive the following error in the slg1 transaction of SRM.
    Error in the CSV file in the following line:
    tent;;;;;;;;;;;;;;;
    The CSV file format is this:
    SAP CATALOG CSV 2.0 <;> update;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Defaults;ES;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1. catalog export for /CCM/MASTER_CATALOG by user XE06241 at 08.10.2008 12:13:31 (CET)
    Model;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1. Catalog;CatalogID;CatalogType;Catalog Characteristic(s);Catalog short text(s);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Catalog;IMP_CAT_PROVEEDORES;2;cat_prov;{ES-ES}IMP_CAT_PROVEEDORES;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Content;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    #;Texto materal;Activo;Divisa;GLG Responsable;Nombre Proveedor;Texto pedido;Unidad;U.M.B. Maestro de materiales;Posición de contrato;Número de contrato;Plazo de entrega;Texto largo de material;Unidad de medida del pedido;Grupo de artículos;URL;Tipo de objeto MIME;Código del fabricante;núm. material del fabricante;ID de Proveedor;ID del material;Material del proveedor;Núm. anterior del material;Descripción breve del material;Texto adicional;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;Vista;
    ItemValuation;Comment;ACTIVO;WAERS;GLGRESPONSABLE;NAME1;TEXTOPEDIDO;UNIDAD;/CCM/BASE_UOM;/CCM/CONTRACT_ITEM_ID;/CCM/CONTRACT_ID;/CCM/LEAD_TIME;/CCM/LONG_DESCRIPTION;/CCM/ORDER_UNIT;/CCM/PRODUCT_GROUP;/CCM/PICTURE#/CCM/URL;/CCM/PICTURE#/CCM/MIME_TYPE;/CCM/MNFCTR_ID;/CCM/MNFCTR_PART_NO;/CCM/SUPPLIER_ID;/CCM/PRODUCT_ID;/CCM/SUPPLIER_PART_NO;CODIGOANTIGUO;SHORT_DESCRIPTION;TEXTOADICIONAL;T_DAR_S;T_DAR_N;T_DAR_E;T_DAR_NW;T_DAR_CAN;T_DAR_CEN;T_DAR_CAT;S_BCL;S_FACTORING;FINANZIA_RED;FINANZIA_SSCC;FINANZIA_UNOE;NAVIDAD;INSTITUCIONAL;SSCC;OPERACIONES;ORGANIZACION;ALMACEN;RED;INMUEBLES;
    000000000000000112;Prueba Catálogo;TRUE;EUR;INMUEBLES;PROVEEDOR000726;Texto pedido de este material y ocupa las 2 líneas que me permite la tr.;Unidad;Unidad;00010;4610000045;005;Este texto pertenece al texto de datos básicos del material, que debe ser leído por el proceso para ser incluído en el campos del fichero LONG_DESCRIP;Unidad;110100500;
    REDCARPETAUBICACION.GIF;GIF;0020000060;9017829237282939373987393873987375610917;0010000782;000000000000000112;21789123784973849734893748934789347;123456789012345678;Prueba Catálogo;GRANO FINO, CALIDAD ALTA;FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;

    You might be best to open a support incident about this so you can work directly with an engineer on this.  Infoview is using the Java SDK, its possible there is an issue with the .NET SDK that needs to be looked at.

  • Upload Csv files with infopackages - Error 1

    Hello again,
    i'm trying to upload csv file into a infopackage with master data text but the sistem sends a error message "Error 1 uploading external data".
    Infopackage settings:
    source system: PC
    file type: data file
    csv file
    data separator ;
    ESC signal "
    a created a txt file with data separated with ; and later converted txt file into a csv file.
    can anybody help me pls?
    Thanks
    Silvia Marques

    Hi Silvia,
    If the fields are correct in the transfer structure (only 2 fields). Then check whether the field length and type has been defined correctly for both the fields.
    If thats not a problem then try to load only upto PSA.
    If you are using IDOC as your transfer method then go to the "details" tab of the monitor of the error request and see the details. It will give you the correct picture of the error.
    Bye
    Dinesh.

  • Error message when CSV file link to datasource(CSV file upload to BW)

    hello friends,
    I have met one problem when i upload CSV file to BW, i want to show the error screenshot, how can i show it in this website?
    Please help me analysis it base below error message;
    tks;
    below is my steps
    1.create datasource;
    2.general info tab, input description
    3. extraction tab, input file name, value of data format is separated with separator (for example CSV),data separator is ,
    4.proposal tab, click "load example data",it can show correct data the same as CSV file;
    5.when i click fields tab, Popup show"field list no longer corresponds to dafault copy change? "Yes" or "NO" button"
    6.Click Yes, fields tab show correct data;
    7.click "read preview data " in preview Tab, show error infomation;
    ---Runtime error -description of exception;
    Runtime errors           Data_length_negative
    Except.                       CX_XY_RANGE_OUT_OF_BOUNDS
    short text             Invailid partial field access :length negative
    what happened  Errpr in the ABAP application  program
                                The current Abap program "CL_RSAR_PSA==============CP " has to be terminated bacause it has
                                come across a statement that unfortunately can't be executed.
    Error analysis
       An exception occured that is

    Please see the error message;
    Runtime Errors         DATA_LENGTH_NEGATIVE
    Except.                CX_SY_RANGE_OUT_OF_BOUNDS
    Date and Time          09/04/2009 21:34:14
    Short text
    Invalid partial field access: Length negative
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_RSAR_PSA===================CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not
    caught in
    procedure "_GET_DDIC_STRUCTURE" "(METHOD)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    In the executed program "CL_RSAR_PSA===================CP", the system
    attempted to access the field
    "ME->P_PSA_TECHNAME" using the length "-3".
    However, a partial field access with a negative length specification is
    not allowed.
    How to correct the error
    Use a positive length specification if a part of the field "ME->P_PSA_TECHNAME"
    is to be
    accessed.
    If the error occurred in your own ABAP program or in an SAP
    program you modified, try to remove the error.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DATA_LENGTH_NEGATIVE" "CX_SY_RANGE_OUT_OF_BOUNDS"
    "CL_RSAR_PSA===================CP" or "CL_RSAR_PSA===================CM00A"
    "_GET_DDIC_STRUCTURE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "_GET_DDIC_STRUCTURE" "(METHOD)", or its possible occurrence must be declared
    in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:

  • Uploading CSV file problem

    Hello everyone.
    I have a minor problem in uploading CSV file to HTMLDB.
    I don't know the exact reason, but HTMLDB threw
    "ORA-20001: Unable to create collection: ORA-06502: PL/SQL: numeric or value error" whenever I tried to upload my csv file. after a few repetition of deleting potential problem-causing columns and trying again, I found out the following:
    when numeric value and character value are stored together in single column, the upload fails. For example, we have a column which stores the employee number. The employee number is just a sequential numeric value, however temporary employees have 'T' in front of their employee number, so it begins something like T0032 and so on.
    So, then, I tried to enclose all the employee numbers which start with numeric value with " character, but that would just simply take too long to do it manually, and excel does not seem to support enclosing the values with " when it's saving the spreadsheet with CSV format.
    So, I'm kind of stuck right now.
    Can anyone give me a good way to deal it?
    THANK YOU!

    Thanks for updating my forum setting, my name is now clearly visible :-)
    anyway.. I went back and tested couple of things...
    It now appears that the problem is not caused from values inside the column... instead..
    I believe the size of csv file with certain character set is the issue here...
    This is a rough estimate, but file size larger than about 31.7 ~ 9kb caused errors IF THEY CONTAINED OTHER CHARACTER SET THAN ENGLISH.
    here are informations about my setting:
    1. Oracle database: initially 9.2.0.1 -> patched upgrade to 9.2.0.4
    2. HTMLDB: 1.4.0.00.21c (downloaded from otn)
    3. db character set : UTF-8
    4. OS: windows 2000 (with up-todate service pack and
    security patches and etc..)
    5. system: toshiba tecra 2100 with 1GB ram and 40GB hdd
    6. operation system locale: korean, south korea
    I tried uploading many other files in both english and korean, which is my national language. The english csv file worked beautifully, without any file size limitations. However, when I tried to upload a file with
    KOREAN characters in it, it failed.
    Intrigued by this behavior I started to test the file upload with various excel files, and found out that..
    1. english csv files caused absolutely no errors.
    2. engilsh file with single korean character immediately
    threw the error, if the size exceeded 31.8kb (or I
    think the size is 32kb)
    3. I tested korean file mixed english file, caused
    the same error if the size exceeded 32kb.
    the distribution of korean characters inside the
    csv file did not matter, just don't go beyond 32kb!
    Please reproduce this behavior (but I presume that some efforts will be required in order to reproduce this error perfectly, since it is not easy to obtain foreign OS in US regions.. is it?)
    anyway, thanks for your quick reply, and
    I hope this problem gets fixed, because in this manner,
    I have to split my file into 32kb chunks!
    - Howard

  • Error in uploading CSV (comma delimited) to database!!!!

    Hello,
    I'm karthik. We have a application with 10g database and we're using Ms-office 2007 in Windows XP system.
    While uploading csv files in Ms- office 2007 format it is good in uploading files to database.
    Most of our systems are upgraded to windows 7 and while we use Ms-office 2010 to do the same upload we found error in uploading.
    Its ora: ORA DATA NOT FOUND.
    So I uninstalled MS-office 2010 and installed Ms-Office 2007 and found some errors to do upload. The errors like some column is missing!!!
    Can you give me a way to fix these errors???????????

    You might be best to open a support incident about this so you can work directly with an engineer on this.  Infoview is using the Java SDK, its possible there is an issue with the .NET SDK that needs to be looked at.

  • Uploading csv file into database using apex

    Dear all
    I am using apex 4 and oracle express 10g, i need to upload .csv file into the database for one of my appls, i have referred discussion forum for solutions, i found also, but some how its not working for me.
    below mentioned is error and the code
    ERROR:
    ORA-06550: line 38, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 38, column 8: PL/SQL: Statement ignored ORA-06550: line 39, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 39, column 8: PL/SQL: Statement ignored ORA-06550: line 40, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 40, column 8: PL/SQL: Statement ignored ORA-06550: line 41, column 8: PLS-00221: 'V_DATA_ARRAY' is not a proc
    Error
    OK
    CODE:
    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    BEGIN
    -- Read data from wwv_flow_files
    select blob_content into v_blob_data
    from wwv_flow_files where filename = 'DDNEW.csv';
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    -- Insert data into target table
    EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
    values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
    USING
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4);
    v_data_array(5);
    v_data_array(6);
    v_data_array(7);
    v_data_array(8);
    v_data_array(9);
    v_data_array(10);
    v_data_array(11);
    -- Clear out
    v_line := NULL;
    END IF;
    END LOOP;
    END;
    what i understand from this is system does not identify v_data_array as array for some reasons, please help me.
    initially system was giving error for hex_to_decimal, but i managed to get this function on discussion forum and now it seems to be ok. but v_data_array problem is still there.
    thanks in advance
    regards
    Uday

    Hi,
    Mistakes in your sample I did correct
    Problem 1
    select blob_content into v_blob_data
    from wwv_flow_files where filename = 'DDNEW.csv'; to
    select blob_content into v_blob_data
    from wwv_flow_files where name = :P1_FILE;Problem 2
    EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
    values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
    USING
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4);
    v_data_array(5);
    v_data_array(6);
    v_data_array(7);
    v_data_array(8);
    v_data_array(9);
    v_data_array(10);
    v_data_array(11);  to
    EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
    values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
    USING
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4),
    v_data_array(5),
    v_data_array(6),
    v_data_array(7),
    v_data_array(8),
    v_data_array(9),
    v_data_array(10),
    v_data_array(11);  And I did create missing table
    CREATE TABLE TABLE_X
        v1  VARCHAR2(255),
        v2  VARCHAR2(255),
        v3  VARCHAR2(255),
        v4  VARCHAR2(255),
        v5  VARCHAR2(255),
        v6  VARCHAR2(255),
        v7  VARCHAR2(255),
        v8  VARCHAR2(255),
        v9  VARCHAR2(255),
        v10 VARCHAR2(255),
        v11 VARCHAR2(255)
      );Regards,
    Jari
    Edited by: jarola on Nov 19, 2010 3:03 PM

  • Issue when I upload CSV file for insert contact list on Cisco Attendant Console Advanced

    Hi Friends,
    I have error "Provided file is not valid CSV File" when I upload CSV file to Cisco Attendant Console Advanced system. I'm not sure what happen about my CSV. My purpose is insert contact list to system and create CSV base on documentation.
    Anyone have idea to solve this issue please kindly help me.
    Thanks

    You are right, whenever Cisco device boots, the IOS files gets loaded on the DRAM.
    But in this process, some temporary files are also generated which gets saved in the flash/Disk, that’s the only reason you got these error messages. It’s not recommended at all to have less space in the Flash than what is recommended on Cisco.com. I would say please remove some files from Disk and have minimum 256 MB flash otherwise your router may drop into rommon mode at the time of next reload.
    Well, it’s good to upgrade the bootstarp image too. Currently you are running 15.X IOS code, I would say run 15.X bootstarp image on the box.
    You may download bootstarp image for 7206VRX NPEG2 from the link below:-
    http://software.cisco.com/download/release.html?mdfid=282188585&flowid=1380&softwareid=280805685&release=15.2.4S4&relind=AVAILABLE&rellifecycle=ED&reltype=latest
    If you want to know the procedure of the upgrade, click the link mentioned below:-
    http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/frf010.html#wp1017654
    -Amant

  • Upload csv files with infopackages

    Hello,
    I want to upload csv files for an infopackage in BW System and when i execute the infopackage, the system sends the error message "Role for scan virus /SCET/GUI_UPLOAD is not active".
    Can anybody help me?
    Thanks
    Silvia Marques

    Hi Silvia,
    You can check OSS note: 841387. Other relevant notes are :803637, 797108 and 807989.
    Hope this helps...

  • Upload csv file to sap in background

    Dear Expert,
    Please help me I want to record vendor data in background mode for this i used SHDB and has done recordings then i used gui_upload function in program and successfully uploaded CSV file without any error, then i have created session when i am running session with foreground or display error checkbox it is running correctly, as i want to run in background then i clicked on background checkbox  for process it gives information message 1 session transferred to background processing but when i am checking log there it is showing trasaction read 0, transaction processed 0, transaction with error 0, transactions deleted 0.
    Please tell me cant i upload csv file in background with this method?
    Is it manadatory to use open datset, read data set for uploading file in background?

    Hello Sir,
    During opening dataset it is opening only one record from excel file that is first row. It is not reading rest rows, I tried to used it like this...
    do 10 times.
      perform open_dataset using dataset.
      read dataset dataset into record.
      if sy-subrc <> 0.
        exit.
      endif.
      append record.
    enddo.
    First time it reads first row second time at open_dataset it is giving dump given below.
    The file "D:\vendor.csv" is already open.
    What happened?
    Error in ABAP application program.
    The current ABAP program "ZNEWTEST" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    Please resolve my problem....

  • Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

    Hi All,
    In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
    Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
    3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
    Error within screenshot are : status Code : 409
    status Text :conflict
    For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
    my code is
    function PerformUpload(listName, fileName, listItem, fileData)
        var urlOfAttachment="";
       // var itemId = listItem.get_id();
        urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
        // use the request executor (cross domain library) to perform the upload
        var reqExecutor = new SP.RequestExecutor(appWebUrl);
        reqExecutor.executeAsync({
            url: urlOfAttachment,
            method: "POST",
            headers: {
                "Accept": "application/json; odata=verbose",
                "X-RequestDigest": digest              
            contentType: "application/json;odata=verbose",
            binaryStringRequestBody: true,
            body: fileData,
            success: function (x, y, z) {
                alert("Success!");
            error: function (x, y, z) {
                alert(z);

    Hi,
    THis is common issue if your file size exceeds 
     upload a document of size more than 1mb. worksss well for kb files.
    https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
    or try the below method
    https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Error while uploading .xml file for Customer/Vendor List for Italy

    Hi All,
    We are facing problem while uploading the .xml file in DMEE transaction for the new Customer/Vendor List for Italy.
    We have followed the entire process given in the OSS Note(1090857).
    We have SAP 4.6c and followed the below steps:
    1. Created ID-FI-IT Development class
    2. Added domains
    3. Added Data elements
    4. Tried to upload the given .xml file and got any error saying ".xml file could not be interpreted".
    Also there is a .SAR file mentioned to upload if we receive any errors while uploading .xml file.
    Tried uploading the .SAR file also. STill we are recieving the same Error.
    Can any one of you help us out.
    Thanks in Advance.
    Ramesh

    Ok, we upload .SAR file in this way:
    1. unpack .SAR file with SAPCAR.EXE program. Yuo obtain 2 files
    R492445.P9C and K492445.P9C
    2. put K492445.P9C in directory \SAPMNT\TRANS\COFILES and put R492445.P9C in directory \SAPMNT\TRANS\DATA of your system (DEV, TST or PRD)
    3. Use Tx STMS. If You want create DMEE tree in DEV system, go to DEV import queue. Choose menu Extras | Other requests | Add. Insert P9CK492445 in Transp. request field.
    4. Import the request. This creates the DMEE tree. You don't need ti upload XML file after. You can see the DMEE tree created with Tx DMEE and inserting
    Tree type        UMS1            
    Format tree     IT_CUST_VEN_LIST
    5. after continue follow the note
    I hope this help you
    Roberto

  • Error while uploading tiff file using report "RSTXLDMC"

    Hi Experts,
    I am trying to upload .tif file into SAP usinf report "RSTXLDMC".
    Getting below error.
    Uploading TIFF Files to SAPscript Texts
    Load File
    c:\file.tif
    The file contains    134,412  bytes
    This is a TIFF file with MOTOROLA byte order
    First IFD offset:                                        8
    Reading IFD from offset          8  Number of Tags         13
    ImageWidth:                                          5,120
    ImageLength:                                         6,590
    Compression:                                             2
    Photometric Interpretation:                              0
    Number of StripOffsets:                                  5
    RowsPerStrip:                                        1,636
    Number of StripByteCounts:                               5
    XResolution:                                           600  /          1
    YResolution:                                           600  /          1
    ResolutionUnit:                                          2
    This is a baseline TIFF 6.0 BILEVEL file
    TIFF upload not possible, compression type 2 not supported
    How to solve this ????
    Please help.
    Regards,
    SVS

    Dear Vijay,
    I have one tiff 6.0 image which i am passing to program "RSTXLDMC".
    I have not done any conversion or changes in the file.
    Regards,
    Sagar Sontakke

  • How to upload .CSV file from Application Server

    Hi Experts,
        How to upload .CSV file separated by ',' from Application server to an internal table.
    Invoice No,Cust No,Item Type,Invoice Date,days,Discount Amount,Gross Amount,Sales Amount,Customer Order No.,Group,Pay Terms
    546162,3233,1,9/4/2007,11,26.79,5358.75,5358.75,11264,HRS,11
    546163,2645,1,9/4/2007,11,3.07,305.25,305.25,10781,C,11
    Actually I read some already answered posts. But still I have some doubts.
    Can anybody please send me the code.
    Thanks in Advance.

    Hi Priya,
    Check this code
    Yhe logic used here is as follows,
    Get all the data into an internal table in the simple format ie: a row with one field contains an entire line
    After getting the data, we split each line of the table on every occurrence of the delimiter (comma in your case)
    Here, I have named the fields as field01, field02 etc, you could use your own names according to your requirement
    parameters: p_file(512).
      DATA : BEGIN OF ITAB OCCURS 0,
              COL1(1024) TYPE C,
             END OF ITAB,
             WA_ITAB LIKE LINE OF ITAB.
      DATA: BEGIN OF ITAB_2 OCCURS 0,
        FIELD01(256),
        FIELD02(256),
        FIELD03(256),
        FIELD04(256),
        FIELD05(256),
        FIELD06(256),
        FIELD07(256),
        FIELD08(256),
        FIELD09(256),
        FIELD10(256),
        FIELD11(256),
        FIELD12(256),
        FIELD13(256),
        FIELD14(256),
        FIELD15(256),
        FIELD16(256),
       END OF ITAB_2.
      DATA: WA_2 LIKE LINE OF ITAB_2.
        OPEN DATASET p_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
        IF SY-SUBRC = 8.
          WRITE:/ 'File' , p_FILE , 'cannot be opened'.
          LV_LEAVEPGM = 'X'.
          EXIT.
        ENDIF.
        WHILE SY-SUBRC <> 4.
          READ DATASET p_FILE INTO WA_ITAB.
          APPEND WA_ITAB TO ITAB.
        ENDWHILE.
        CLOSE DATASET p_FILE.
      LOOP AT ITAB INTO WA_ITAB.
        SPLIT WA_ITAB-COL1 AT ','    " where comma is ur demiliter
         INTO WA_2-FIELD01 WA_2-FIELD02 WA_2-FIELD03 WA_2-FIELD04
         WA_2-FIELD05 WA_2-FIELD06 WA_2-FIELD07 WA_2-FIELD08 WA_2-FIELD09
         WA_2-FIELD10 WA_2-FIELD11 WA_2-FIELD12 WA_2-FIELD13 WA_2-FIELD14
         WA_2-FIELD15 WA_2-FIELD16.
        APPEND WA_2 TO ITAB_2.
        CLEAR WA_2.
      ENDLOOP.
    Message was edited by:
            Kris Donald

Maybe you are looking for

  • Recording a DVD stops before movie is done

    My sequence is fine and complete and I make a Quicktime movie however when I burn it I do not get the complete movie. It stops early but again plays completed in the movie and timeline? Thank you for your help.

  • Mapping with the Customized Model

    Hi, How can I check the extra field that I have added in the view of the Personal Data infotype of the ESS package,  and I need to do Mapping of that, do I have to create the new model for the same or can we use the existing model (standard-provided

  • Switching Audio-Out to internal speaker with Audio still plugged in?

    Hello, unfortunately I snapped my optical audio plug in my iMac and now it's stuck in the jack. What a mess. Until I take it to the service, I would like to use my internal speakers. Most unfortunately, as the part of the plug is still stuck in the j

  • Hi i have an iphone 3 gs and recently i try to restore but i couldn't do it and is giving me a an error

    hi, i have an iphone 3gs and recently i try to restore it but it not work is giving me an error that read 3194 error does anyone can help me with this i would appreciate it a lot

  • ZEN usb 2.0 quite old from 2

    i have just bought this item and during my excitement have reset it and now it will not go past the EAX start-up screen. is there any way i can force format this itemMessage Edited by ashrooster on 08-25-2007:57 AM