Processing uploaded files

I need to upload photos to a site, I want to make sure that
they are only JPG files uploaded, plus restrict the size.
Is there anyway to check the filesize and type before
uploading? Or can somebody upload a 20meg EXE file that would hog
our bandwidth?
Also, how do I check the file extension to make sure it's
JPG? When I look at it I get TMP, and if I save it I seem to have
to specify an extension?
Thanks
Mark

ACS LLC wrote:
> I actually came across another issue We upload two
images from the previous
> page, so by checking the cgi content size it does not
work because if we want
> to restrict to 100k per file it actually adds up both
images, so it was have a
> 95k and an 80k both are technically acceptable, but the
total is under 100k for
> each. I could make it stop at 200k , but that then
allows users to manipulate
> the upload, they could upload a 190k and go back and
upload another 190k in the
> 2nd picture. I was also just told by somebody that is
still uploads the file
> in order to get the file size? Mark
>
in your case i would probably:
[all the below on the action page, obviously]
1) check the CGI.CONTENT_LENGTH to see if it is significantly
larger
than ([allowed file size]x[number of files being
uploaded])+[size of
form page]
2) if it is NOT significantly larger then use CFFILE.FILESIZE
after each
upload (in a cfloop, presumably) to check exact size of each
file and
delete the ones found to be too large.
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Similar Messages

  • GP: Creation of process for uploading file with approval or a rejection

    Problem: It is necessary to organise process of uploading files in KM repository with approval or a rejection.
    I have created process with two callable objects.
    1. File Input
    2. Interactive Form/File Approval
    Has grouped structure "File"
    In Runtime, during object performance "Interactive Form/File Approval" there is an error:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode
    It is one problem, the second problem consists in that how to organise a folder choice where the file will be loaded.

    Hi Pustovoytov Stanislav ,
    Check whether if the context attribute pdfsource is of binary type or any other type. It sbould be of binary type.
    And about the second one you can organize the folder structure in the KM administration.
    Thanks
    Satya

  • Upload and Process large files

    We have a SharePoint 2013 OnPrem installation and have a business application that provides an option to copy local files into UNC path and some processing logic applied before copying it into SharePoint library. The current implementation is
    1. Users opens the application and  clicks “Web Upload” link from left navigation. This will open a \Layouts custom page to select upload file and its properties
    2. User specifies the file details and chooses a Web Zip file from his local machine 
    3. Web Upload Page Submit Action will
         a. call WCF  Service to copy Zip file from local machine to a preconfigure UNC path
         b. Creates a list item to store its properties along with the UNC path details
    4. Timer Job executes in a periodic interval to
         a. Query the List to see the items that are NOT processed and finds the path of ZIP file folder
         b. Unzip the selected file 
         c. Loops of unzipped file content - Push it into SharePoint library 
         d. Updates list item in “Manual Upload List”
    Can someone suggest a different design approach that can manage the large file outside of SharePoint context? Something like
       1. Some option to initiate file copy from user local machine to UNC path when he submits the layouts page
       2. Instead of timer jobs, have external services that grab data from a UNC path and processes periodic intervals to push it into SharePoint.

    Hi,
    According to your post, my understanding is that you want to upload and process files for SharePoint 2013 server.
    The following suggestion for your reference:
    1.We can create a service to process the upload file and copy the files to the UNC folder.
    2.Create a upload file visual web part and call the process file service.
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • ICR Process 002  File Upload Error

    Hello,
              I am uploading items for Process 002 via a file. The system is, unlike process 003, not checking for existing documents but treating all records as new data. Hence i now have multiple duplicate records.
    Does anyone know where the problem could be.
    Kind regards

    Hello Dominic,
    This is the system design and is consistent with the way data selection works for process 002. All data supplied by data selection is treated as new data. If you cannot ensure that only new data is contained in the upload file you have to implement BADI method CHANGE_DATA_TABLE for one of the early events, check which data records already exist, update them if necessary and then only leave the new data records in the table. You can use the logic for processes 001 and 003 in CL_FBICRC_SERVICES~COMPLETE_DATA as a template.
    Best regards,
    Ralph

  • Uploaded File Processing

    Hello,
    I have been searching all day for a reasonable solution to my problem and have found many answers but I am not sure which is the best way. Here is my problem:
    I have a web app that allows a user to upload a csv, I do some validation on the file then write the file to disk. I process the file and when finished email the user a csv file.
    What I would like is to have the user upload the file and be done until they receive their email. How would I start processing the file without the user waiting for the processing to finish.
    Some files could take upwards of 40 minutes to process, so you can see why I don't want the user to wait for the results.
    I have tossed around the idea of starting new threads, backgrounds processes I am just not sure what the best way to do it is.
    I would appreciate thoughts from people who have done this themselves or have knowledge about the process.
    Thanks

    hfalaska wrote:
    I think I understand what you are saying, one thread that will process multiple files one at a time. I was thinking having maybe two or three threads running so in case an uploaded file contains a large amount of data to process(which will take time to process) I would have other threads able to process other files. This would keep the wait time down on users receiving their data.Understand that this is a trade-off. Multiple threads can potentially be less efficient, and for most tasks, a single thread running the tasks in sequence has greater throughput.
    You should also consider how CPU-intensive the process is in comparison the upload speed. If the server can keep up processing the files at the rate they are uploaded, then you're better off processing as the file is uploaded.
    I am stumped about one other thing, I have created my thread pool with three workers, I have my queue and am adding a file to the queue. But what has me scratching my head is I need to pass some parameters to the processing class and I am not sure how to do that. Any ideas?Create a Request object containing all the relevant data. If you're using a single thread with a queue, submit the Request objects to the queue. If you're using a pool of threads, make your Request object Runnable, or instantiate your Runnable with the given Request object and then pass the Runnable to the executor.

  • Sending uploaded file to the approver using GP Process

    Hai all,
    i my project i need to send the resource files for approver ...
    in my application i have created three actions under one sequencial block ..i need to send the user uploaded files to the three approvers .....

    Hi Ravi,
    You can send email with attachment to multiple approver's using webdynpro api. Please check below link -
    http://wiki.sdn.sap.com/wiki/display/WDJava/Sendmailwithattachmentusingwebdynpro+API%27s
    Regards,
    Sen

  • TS3694 uploading iOS 7 to iphone 5 and after it downloaded, it was at the end of processing the file when i received  and error (3004) .  what do i do

    was at the end of processing the file when i received  and error (3004) .  what do i do

    http://lmgtfy.com/?q=iPhone+error+code+3004

  • Delete an uploaded file (in custom table) from a report

    Hi,
    I have a report of uploaded files (the files are saved in my own table, not in APEX_APPLICATION_FILES) - I'd like to add a delete link to each file in my report so that the user can delete a particular file.
    How do I go about doing this?
    Thanks.

    Melissa,
    It is now working. You missed couple of things:
    1. javascript in the header
    2. you were pointing to the page 1 and your process was on the page 2
    3. you passed the value to a non existing item on the page 3
    4. the request which would fire the delete process was triggered by a wrong request
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Problem in uploading file from Application Server

    Hi everyone,
    i got a problem in uplaoding a file from application server.i am having two folder (one folder name is current and another one is processed)in application server. In current folder i am having N no of files.I want to upload all the files names into one internal table and i want to process one by one file.After processing each file the file should be moved to processed folder and the files should not exist in current folder.All these process must be done everyday.Please rectify my problem asap.

    Ramesh,
    Take authorization from basis guy.
    Use the below code to get the list of files from require directory
    *& Report  ZDIRFILES                                                   *
    REPORT  ZDIRFILES    .
    PARAMETER: p_fdir            type pfeflnamel DEFAULT '/usr/sap/tmp'.
    data: begin of it_filedir occurs 10.
            include structure salfldir.
    data: end of it_filedir.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Get Current Directory Listing for OUT Dir
      call function 'RZL_READ_DIR_LOCAL'
           exporting
                name     = p_fdir
           tables
                file_tbl = it_filedir.
    Now in internal table "it_filedir"  will have all your files.
    For moving and deleting
    report zrich_0001.
    Parameters: d1 type localfile default '/usr/sap/TST/SYS/fld1/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/fld2/Data1.txt'.
    data: begin of itab occurs 0,
          rec(20) type c,
          end of itab.
    data: wa(20) type c.
    start-of-selection.
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset d1.
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
      delete dataset d1.
    Check below FM if required
    To move the file to archive directoryuse FMs 'PFL_COPY_OS_FILE'
    To Delete 'EPS_DELETE_FILE'.
    Don't forgot to reward if useful

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • Is there a way to silently upload files?

    Ok, so I've taken the plunge. I've started working on an AIR
    app using Flash CS3. I'm putting together a little app that will
    keep my online store updated with all the product updates from our
    wholesaler. This includes parsing a csv file, downloading product
    images from the wholesaler, updating the database, and then
    uploading the images to our server.
    The problem is that AIR does not seem to have the
    functionality to silently upload files! Sure, I can use the
    file.reference object to fire off the browse method, which then
    opens the OS file browser window BUT I would really like the whole
    thing to be hands off. In the past, I've written these types of
    apps using Visual Studio but I haven't touched VS in two years.
    Has anyone run across a way to silently upload or ftp files
    in AIR?

    Hey Oliver,
    Thanks for your answer--the fact that it CAN be done has
    gotten me a lot further on finding a solution. Here's what I have
    so far. As it runs, I can see the progress and completion of the
    upload but I'm still not getting it saved. I'm uploading it to a
    ColdFusion processing page.
    AS3 Code:
    import flash.filesystem.*;
    import flash.net.URLRequest;
    //Silent File Upload (no browse window)
    function imageUpload(imageName,uploadPage):void
    trace('Starting Upload of ' + imageName + '\n');
    var myFile:File =
    File.applicationDirectory.resolvePath(imageName);
    var request:URLRequest = new URLRequest(uploadPage);
    request.method = URLRequestMethod.POST;
    myFile.addEventListener(ProgressEvent.PROGRESS,progressHandler);
    myFile.addEventListener(Event.COMPLETE,completeHandler);
    myFile.upload(request,"theFile");
    function progressHandler(event:ProgressEvent):void {
    var file:FileReference = FileReference(event.target);
    var pLoaded =
    Math.ceil(event.bytesLoaded/event.bytesTotal*100);
    trace(pLoaded + '% uploaded');
    function completeHandler(event:Event):void
    trace ('Upload complete.');
    var uploadPage = "
    http://www.aaronbday.com/upload_file.cfm";
    imageUpload("angelic_cat.jpg",uploadPage);
    Here's the CFM page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Upload File</title>
    </head>
    <body>
    <cfif isDefined("form.theFile")>
    <!---we only want images--->
    <cffile
    action="upload"
    destination="#ExpandPath("test/")#"
    filefield="theFile"
    nameconflict="overwrite"
    accept="image/jpg,image/jpeg,image/gif,image/pjpeg"
    >
    <cfoutput><img src="test/#cffile.serverFile#"
    /></cfoutput>
    <cfelse>
    <form method="post" action="upload_file.cfm"
    enctype="multipart/form-data">
    <input type="file" name="theFile" />
    <input type="submit" name="Submit" />
    </form>
    </cfif>
    </body>
    </html>
    Any ideas? Thanks!

  • Problem while uploading file from application server to internal tab in BG

    Hi all,
    When i see the file  in application server.data is like this
    #################00\);_(#####}#-#}###############################00\);_(#####}#-#}###############################00\);_(*#####}#-#}#########
    ###################}###}#############A#############???#00\);_(*#################;_(@_)  ########???#        ########???#        ########???###
    #######???#########}###}#############)##############}##00\);_(*#################;_(@_)  ############        ############        ##############
    ###################}#A#}#############:##############}##00\);_(#################;_(@_)  }###}##############################00\);_(*##########
    #######???#########}#-#}#############F#################00\);_(#####}###}#############@#################00\);_(#################;_(@_)  #####
    ###################}#-#}#############3#################00\);_(#####}#U#}#############E#################00\);_(#################;_(@_)  #####
    Because the csv which is uploaded has dropdowns and some formattings.
    when download from tcode cg3y i am getting correct file
    When try to use open(binary mode) and read dataset i getting data as it is (junk).
    i need to process in background.
    Any help.
    Rhea.

    upload file to string format
    begin of ty_tab,
    string type char200,
    end of ty_tab.
    loop at ty_tab into string
    use statement replace string into tab deliminated fromat(particular occurance in string)
    now call class to break string at tab into fields
    endloop.
    DATA : BEGIN OF i_data OCCURS 0,
            data(200)    TYPE c,       "To hold Upload file data
           END OF i_data.
    OPEN DATASET v_str FOR INPUT
                              IN TEXT MODE
                              ENCODING DEFAULT IGNORING CONVERSION ERRORS.
        IF sy-subrc EQ 0.
          DO.
    *Read a line from input file
            READ DATASET v_str INTO i_data-data.
            IF sy-subrc NE 0.
              EXIT.
            ENDIF.
    *Append record to an internal table
            APPEND i_data.
            CLEAR: i_data.
          ENDDO.
    *Close the file
          CLOSE DATASET v_str.
    *---Start of inserti
    LOOP AT i_data.
            REPLACE ALL OCCURRENCES OF '"' IN i_data WITH '#'.
            SPLIT i_data AT cl_abap_char_utilities=>horizontal_tab
                                INTO i_doc-pvaudt
                                     i_doc-pvpate
                                     i_doc-vecatc
                                     i_doc-vhvend
                                     i_doc-vhidt8
                                     i_doc-vhinvn
                                     i_doc-vhhexp
                                     i_doc-vhiref.

  • FI Upload file (Approval Workflow)

    Hi All,
    Need some assistance:
    Currently our company has a standard approval workflow built.  So when we receive an invoice without a PO, we manually post the invoice to a GL & Cost Centre.  Once the invoice is coded, It’s then sent to the GL owners to approve using the workflow currently in place.  All this works perfectly fine.
    My issue is FI Upload files……. As Upload files contain several GL accounts – we are currently attaching a manual email approval from the approver to the file upload so the Accounts Payable department could post without any further approvals in Workflow as an email approval is sufficient.
    We would like to build the same workflow approval cycle that we have already in place for Fi Invoices.
    Note – an upload file come in with 10 different GL accounts ( ideally we don’t want to send it to 10 different approvers) as this will slow down the process, so I was wondering if there is a better solution that you could share to eliminate the upload going to 10 approvers.
    Any Suggestions are greatly appreciated.
    Thanks
    Alex

    Hi All,
    Need some assistance:
    Currently our company has a standard approval workflow built.  So when we receive an invoice without a PO, we manually post the invoice to a GL & Cost Centre.  Once the invoice is coded, It’s then sent to the GL owners to approve using the workflow currently in place.  All this works perfectly fine.
    My issue is FI Upload files……. As Upload files contain several GL accounts – we are currently attaching a manual email approval from the approver to the file upload so the Accounts Payable department could post without any further approvals in Workflow as an email approval is sufficient.
    We would like to build the same workflow approval cycle that we have already in place for Fi Invoices.
    Note – an upload file come in with 10 different GL accounts ( ideally we don’t want to send it to 10 different approvers) as this will slow down the process, so I was wondering if there is a better solution that you could share to eliminate the upload going to 10 approvers.
    Any Suggestions are greatly appreciated.
    Thanks
    Alex

  • Using ABAP Webdynpr How to Upload File and download file in SAP R/3

    Hi SAP GURUS ,
                             I wanted to save employee profile from ESS to SAP so i am creating ESS Application .
    For that I go with BDS Approach and create test program for this  I got success while uploading file in my folder
    which i have created with the help of class and content repository . but when i Using ABAP Webdynpro , i got error FM "BDS_BUSINESSDOCUMENT_CREATEF"  message " error_kpro " .
                           Also I wanted to use KM for storage of Documents and wanted to retrive with help of ABAP Webdynpro .
                           So pls tell me / mailed me the process , approach and if you have examples .
        Thanks in Advance ,
         Vishwassap at gmail

    Hi Vishwas,
    Check out the thread [Efficient way of saving documents uploaded|Re: Efficient way of saving documents uploaded by users; and check the blog by Raja Thangamani.
    Also check the thread [Export Images through Function Modules   |Export Images through Function Modules;.
    Hope it helps you.

  • Error in Upload file-table or view does not exist-wwv_flow_file_objects$

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

Maybe you are looking for

  • Report form (rows covert in column)

    there are two table in scott schema emp: empno ename deptno 12121 dfsaf 10 78782 adfsd 20 dept: deptno 10 marketing 20 finance 30 advertising i want the out put like this deptno10 deptno 20 empno 121211 41744 means to convert the row of dept table in

  • Performance on Solaris 10 - Operating system paging

    Has anyone experience performance issues after an upgrade from Solaris 9 to Solaris 10 on SAP systems with limited memory? We have many systems that are on servers with 4 Gig of memory and ran well on Solaris 9.  After an upgrade to Solaris 10 we are

  • How do I report a repeatable 3G defect?

    I've noticed a repeatable defect with the 3G Iphone. Anyone know how to get this issue submitted to Apple so it can be fixed in the next release? The issue is that after you sync your Iphone, most of the 3rd party apps that you have installed no long

  • Do we can set any scroll option in the query designer?

    Hi, I would like to know is there any setting for scroll option at the query designer level. This is because if I look at some reports so I could see little ups and down (small up and down arrows) symbol at the column level, and is enabled for only f

  • SBBOD Question (yep, another one)

    Hi Community! I know there are thousand of topics about this issue (which makes me think WHY Apple haven't have fixed it YET!!!!! STEVEEE!!! I trusted on you!!! =( ) out there, but I have tried ALL the things suggested in EVERY single forum, web, etc