[urgent] Upload presentation server files in parts

Hi,
I want to read presentation server files.
I can use FM GUI_UPLOAD. But my problem is i want to read this file in parts.
Like i have 1 lakh records in file. So i want to red this file in parts of 10000 each.
In GUI_UPLOAD there is a parameter READ_BY_LINE but its is not solving my problem.
Is it possibe to do upload file from presentation server?
Also i have to upload file from application server in parts as above. I am planning to do it using
DO XXXX times.
read by index.
enddo.
Is this way optimised or any beter way also ?
Points will be rewarded!!
Thanks,
Ashish Gupta

Hi,
Presentation server file:
Using GUI_UPLOAD reading required no. of records is not possible. Better option is read all the data into internal table and use it according to the requirement.
If the upload file in excel file, then use FM :ALSM_EXCEL_TO_INTERNAL_TABLE. This FM has option of fetching the required records from the file.
Like, 1st record - 1000th record.. etc
Application server file:
  Yeah you can fetch the records as you specified.
Do  xxx times.
   Read dataset zxxxx.....
   If sy-subrc <> 0.
     Exit.
   endif.
enddo.

Similar Messages

  • How to schedule the background job if report have Presentation server files

    Hi All,
    I have searched the forums and found , the way for the scheduling the background job if report selection screen have the presentation server file input.
    1. Using the Open data set method.
    And my client is not OK with Open dataset way, it there any other way to do this, As we are using the EXCEL file.
    Thanks and Regards,
    Bharani

    Hi,
    As said above it is generally not possible. Since your client most obviously doesn't like graphical background I would recomend storing data as till now, but show it with your own report in more userfriendly way. For example:
    - as ALV Grid
    - in excel with use of OLE either as embedded in SAP or new window (check transaction OLE for example)
    - with use of webdynpro
    BR
    Marcin Cholewczuk

  • Accessing presentation server file in background

    Hi gurus,
    my requirement is to access presentation server file in background mode.
    I got the below documentation regarding this ,but i'm not able to complete the setup as mentioned in this document.
    please help .
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/communication%20to%20presentation%20server%20in%20background%20mode.doc]
    As per documentation i need rfc.car and car.exe file in my system. I cant see any rfcsdk folder in my system. Please help.
    any other solutions ,please suggest.
    sastry.
    Edited by: prssastry on Oct 15, 2008 7:13 AM

    Hi,
    In general practice we don't access a file from presentation server in background because at that point of time i might not logon to SAP server, so it is always preferable to access the file from Application layer incase of background processing.
    Unless it is a client requirement, don't access files from the presentation layer in background./
    thanks,
    Mahesh.

  • Urgent : Uploading an excel file to an internal table

    Hi All
    M problem is simple ..i have to upload an excel file from my PC which is containing 2 cols to an internal table which is having two fields .. I am using GUI_UPLOAD function module for this and using FILELD_SEPARATOR as 'X" .. But i am not able to upload anything .it gives some junk content to my internal tble .
    please help me out
    Regards
    rohan

    Hi Rohan,
    Use the following code.
    DATA: IT_MAIN LIKE STANDARD TABLE OF ALSMEX_TABLINE WITH HEADER LINE.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = 'c:\test.xls'
        i_begin_col                   = 1
        i_begin_row                   = 1
        i_end_col                     = 4
        i_end_row                     = 4
      tables
        intern                        = IT_MAIN
    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.
    LOOP AT IT_MAIN.
      WRITE:/ IT_MAIN-ROW, '   ',
              IT_MAIN-COL, '   ',
              IT_MAIN-VALUE, '   '.
    ENDLOOP.
    The field VALUE of internal table IT_MAIN will contain the data. The first row will contain data from the first column, second for the second column and so on... In your case, the third row will contain 2nd row data from the first column of your excel sheet and so on.
    Hopw this helps,
    Cheers,
    Madhur

  • Image: display from local drive, upload to server file system, and display from server

    Hello,
    I am using jdev 11.1.2.4.0...
    The requirement is that users would like to upload images from their local drive to server drive and they would like display images from server drive later.
    We don't want to keep images in database. I am not sure what the solution should be; however, I plan to ....
    1. create a table to keep an information of images -- image_id, image_location (server drive), image_filename
    2. create a page where users can enter image information and specific filename from a local drive (I think I will use inputFile component) and provide the preview button to display an image on screen before save it. To save data is to save information to the database and copy an image file to the server drive (the destination location for image files is predefined.)
    3. create another page where users can browse information from the database and display an image for a selected record by getting from the server.
    I need suggestions on...
    1. how to display an image on page from the local drive?
    2. how to copy a file from a local drive to a server?
    3. how to display an image on page from the server drive?
    Thank you.
    nat

    See:
    http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-1/
    http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
    http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
    Where Timo saves images to the database, you save it to the file system (examples on how to do this from Java are available plenty if you just Google for it). Similar to Timo you then use the image tag to display images. The difference is that you can directly add the URL from the database table.
    The benefit of using a database to host images is that you are not dependent on file server structures though
    Frank

  • Webvpn upload to server - file truncated

    hi.
    We've been using vpnclient and and webvpn with some success on our 3005. I'm seeing trouble with file uploads "copy file to server" from the webvpn interface, uploading, say, a large graphic file to a directory on a cifs share. The interface doesn't show a failure, and it takes a long time to finish, but the file is quite short after uploading (20,479 bytes rather than 15Megs, say). Subsequent upload attempts result in identically short files with no differences.
    I'm looking for clues on how to understand why and to make the file uploads complete succcessfully.
    What might I want to trace with increased logging? any other suggestions? thanks.
    John

    I've checked the Ethernet settings for
    private/public and they are set 100/Full
    as are the connected switches. I don't believe
    we have any link issues. Are these the duplex
    settings you are referring to?
    thanks
    John

  • Unable to download to presentation server file

    i am trying to use ws_download to download the customer master data to a file.when i check in the internal table the data is present but i am unable to download to a file.

    WS_download is an obsolete function module.
    Try using GUI_DOWNLOAD instead.
    Also try to see the Sy-subrc returned by the function module. This will give you an idea as to which exception is being raised by the function module.
    Hope this helps
    Puneet

  • Reading file from the presentation server in the background

    Hi,
    I am trying to read a .csv file from the presentation server into an internal table in the background. what should I do for it? In the foreground it works fine.
    I have declared a selection parameter 'p_file' that has the path of the file. It wokrs fine in the foreground and how to set it up in the background?
    Any thoughts would be helpful. Thanks in advance,
    VG

    hii
    did you achieved the required functionality , i,e, accessing presentation server file i nbackground .
    I too got the same requirement, can you explain the process.
    There is no way you can do it... The best method is to put the file on Appln server and then call it in the background mode.
    Regards,
    Vishwa.

  • How to upload the local file of the external sytem with same LAN

    HI
    My requirement is to upload a presentation server file (For ex: C:\test.txt) from the external system with in the same LAN into my sap (system)
    Thnaks in advance
    Mallik

    HI Roger
    My requirement is to upload a file from the other system into my system (both are with in the same LAN).
    Ex: two systems are there A and B (both belongs to same LAN)
    in A system's c drive one file is there ( i.e.: C:\test.txt)
    and iam using B system and i need to upload the file from the A system in SAP
    Please do help if u have clues

  • Regarding Application server file path browsing

    Hi All,
    I have a issue regarding Application Server File Path browsing.
    Actually in my selection-screen i will declare a parameter as <b>Application Server File Path</b> now when i press F4 in that field it should be able to browse through <b>Application Server Path's</b>.
    Just like <b>F4_FILENAME</b> in the case of <b>Presentation Server File Path</b> Browsing.
    Can anybody solve my issue.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi Shaik,
    Just copy and paste:
    Here is the code for retrieving list of files contained within specific Application server directory(SAP).
    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.
    Get Current Directory Listing for OUT Dir
    call function 'RZL_READ_DIR_LOCAL'
    exporting
    name = p_fdir
    tables
    file_tbl = it_filedir.
    List of files are contained within table it_filedir
    loop at it_filedir.
    write: / it_filedir-NAME.
    endloop.
    Hope this will help you.
    Let me know incase of any concerns.
    EDIT:
    There are few FM for ur refernce :
    RZL_READ_DIR_LOCAL
    SUBST_GET_FILE_LIST Return table with file list for the given directory (pattern allowed)
    F4_DXFILENAME_TOPRECURSION Popup to select one file from the given application server directory
    TH_SERVER_LIST Returns list of application servers.
    EPS_GET_DIRECTORY_LISTING – Lists filenames from the application server .
    Cheers
    Sunny
    Rewrd points, if found helpful
    Message was edited by: Sunny

  • Storing in presentation server

    Hi Experts,
        I have requirement in my project, inwhich I have to search all the custom development program which are storing files in presentation server.
        Then I have to generalize the path of storing in all the programs like ( C:\XXXX ) only.
    For this first of all I have to find which are the program doing presentation server file saving.
    I did where used list using the keyword 'GUI_DOWNLOAD', 'FILE_SAVE_DIALOG'.
    Can you suggest some other function module or some other OO functions which will be helpful keywords to search more program.
    Thanks and regards,
    Venkat

    Use the table: TRDIRT for finding the custom program name (u may develope ALV and can copy source codes at required location by clicking on program name)
    use READ REPORT [customer report name] INTO [internal table]
    to copy the sourse code in internal table.
    and then use gui_download
    Thank You,
    Ganesh

  • Upload a set of files from presentation server to app server.

    Hello,
    I need an urgent help.
    I know how to use GUI_UPLOAD fm for simple file uploading.
    However, my requirement is that in my report program(on selection screen) I give the source directory(presentation server) and the target directory
    (application server). The report has to get all the files from the presentation server (from this source directory) and has to upload each file to the application server in the target directory.
    Could anyone please help me in this?
    It would be very helpful if anyone can put the code / standard example if there is any mechanism in ABAP to get the set of files from the presentation server, given the directory name.
    THanks a lot for your help,
    Best Regards,
    Pramod S.

    HI Pramod,
      After you get the data into the internal table, you need to pass the internal table, record by record into the application server.
    data: wa_file type string.
    data: tab_file like table of wa_file,
    pcount type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
    exporting
    DIRECTORY = 'C:\test'
    FILTER = '.'
    FILES_ONLY = 'X'
    DIRECTORIES_ONLY
    changing
    FILE_TABLE = tab_file
    count = pcount.
    loop at tab_file into wa_file.
    clear it_data.
    refresh it_data.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    exporting
    FILENAME = wa_file
    changing
    data_tab = it_data.
    open dataset <filename> for output in text mode encoding default.
    if sy-subrc = 0.
    loop at it_data.
    transfer it_data to <filename>.
    endloop.
    close dataset.
    endif.
    endloop.
    Thanks,
    Ravi Kanth

  • How do I upload only a few lines of a file from the presentation server?

    Hi there guys,
    I'd like to upload the contents of a file on my HD (presentation server) to an internal table. I know this can be achieved by using the GUI_UPLOAD function module. But what if I only want to upload a part of the file, not the whole thing? Like the first 100 bytes or 10 lines or something like that. Some files are just way too big to upload them as a whole. I tried using the OPEN DATASET statement, but that seems to work only for files on the application server. If I try to open 'C:     emp     est.txt' (for example) with OPEN DATASET, I get an error. Do I have to put the filename differently or am I totally wrong with OPEN DATASET? I'm kinda stuck here and I'd appreciate your help.
    Cheers,
    Björn.

    Hi Shashi,
    thanks for your reply. If I understand you correctly, this means I will have to wait for GUI_UPLOAD to upload the whole file and afterwards filter into another table. I don't want to upload the whole thing because it's that big, I'd like to only upload a portion of it in the first place. Can this be done?
    Cheers,
    Björn.

  • How to get the files in presentation server while uploading?

    how to get the files in presentation server while uploading?
    give me the function module name

    Hi,
    PARAMETERS:  P_FILE LIKE RLGRAP-FILENAME DEFAULT C_PRES.  "Prsnt Srvr
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          DEF_PATH         = P_FILE
          MASK             = ',..'
          MODE             = '0 '
          TITLE            = 'Choose File'
        IMPORTING
          FILENAME         = P_FILE
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.

  • File Upload and Download From Presentation server

    I have a requirement to provide a selection option to user to upload a big file from presentation server.
    Not sure whther we can a upload the entire file at one short from presentation server. PLease provide some sample code to upload a huge file from presentation server and downlaod a file to presentation server.

    Hi,
    Try this code for download----
    TABLES:
      kna1.                                " General Data in Customer Master
    TYPES:
      BEGIN OF type_s_kna1,
        kunnr TYPE kna1-kunnr,             " Customer Number
        adrnr TYPE kna1-adrnr,             " Address
        anred TYPE kna1-anred,             " Title
        erdat TYPE kna1-erdat,             " Date on which record created
        ernam TYPE kna1-ernam,             " Name of Person who Created the
                                           " Object
    END OF type_s_kna1.
    DATA:
      fs_kna1 TYPE type_s_kna1.
    DATA:
        t_kna1 LIKE
      STANDARD TABLE
            OF fs_kna1.
    " Select-options----
    SELECT-OPTIONS:
      s_kunnr FOR kna1-kunnr.              " Customer Number
    AT SELECTION-SCREEN ON s_kunnr.
      SELECT kunnr                         " Customer number
        FROM kna1
        INTO s_kunnr UP TO 1 ROWS.
      ENDSELECT.
      IF sy-subrc NE 0.
        MESSAGE 'No such customer exists' TYPE 'S'.
      ENDIF.                               " IF SY-SUBRC NE 0
    START-OF-SELECTION.
      PERFORM customer_selection.
    FORM customer_selection .
      SELECT kunnr                         " Customer Number
             adrnr                         " Address
             anred                         " Title
             erdat                         " Date of record creation
             ernam                         " Person who created object
        FROM kna1
        INTO TABLE t_kna1
       WHERE kunnr IN s_kunnr.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                  =
          filename                      = 'C:\TEMP\CUSTOMER.TXT'
        FILETYPE                      = 'ASC'
         write_field_separator         = 'X'
        HEADER                        = '00'
        WRITE_LF                      = 'X'
         col_select                    = 'X'
         col_select_mask               = 'XXXXX'
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
      IMPORTING
        FILELENGTH                    =
        TABLES
          data_tab                      = t_kna1
       EXCEPTIONS
               dataprovider_exception        = 20
         control_flush_error           = 21
         OTHERS                        = 22
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " FORM CUSTOMER_SELECTION.
    for upload----
    " Table declarations----
    TABLES:
      bkpf.                                " Accounting Document Header
    TYPES:
      BEGIN OF type_s_bkpf,
        bukrs TYPE bkpf-bukrs,             " Company code
        belnr TYPE bkpf-belnr,             " Accounting Document Number
        gjahr TYPE bkpf-gjahr,             " Fiscal Year
        blart TYPE bkpf-blart,             " Document type
        bldat TYPE bkpf-bldat,             " Document Date in Document
      END OF type_s_bkpf.
    DATA:
      fs_bkpf TYPE type_s_bkpf.
    DATA:
      fname(10) TYPE c VALUE 'ACCOUNTING'  .
    DATA:
        t_bkpf LIKE
      STANDARD TABLE
            OF fs_bkpf.
    *" Select-options----
    SELECT-OPTIONS:
      s_bukrs FOR bkpf-bukrs,              " Company code
      s_gjahr FOR bkpf-gjahr.              " Fiscal year
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE .
    PERFORM account_selection.
    LOOP AT t_bkpf INTO fs_bkpf.
      TRANSFER fs_bkpf TO fname.
    ENDLOOP.                               " LOOP T_BKPF
    CLOSE DATASET fname.
    FORM account_selection .
      SELECT bukrs                         " Company code
             belnr                         " Accounting document number
             gjahr                         " Fiscal year
             blart                         " Document year
             bldat                         " Document date
        FROM bkpf
        INTO TABLE t_bkpf
       WHERE bukrs IN s_bukrs
         AND gjahr IN s_gjahr.
    ENDFORM.                               " FORM ACCOUNT_SELECTION
    also try
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\TEMP\CUSTOMER.TXT'
      FILETYPE                      = 'ASC'
       has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        data_tab                      = t_kna1
    EXCEPTIONS
          disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17
    IF sy-subrc EQ 0.
      PERFORM customer_display.
    ELSE.
      MESSAGE 'No customer file exists'(006) TYPE 'S'.
    ENDIF.                                 " IF SU-SUBRC EQ 0
    Regards,
    jaya
    Edited by: Jayapradha Neeli on May 28, 2009 11:38 AM

Maybe you are looking for

  • Short Dump ASSIGN_TYPE_CONFLICT in Virtual KF implementation

    Hi Iam getting a short dump in my virtual KF code. Here is the code that I have written. If I have only bill date it works fine. The minute I add company code it gives the short dump. Can you pls let me know what is it that Iam doing wrong. any help

  • 2nd Generation iPod Nano Dead?

    My 2nd generation iPod Nano was working fine this morning. Played music as it did for all these years. Later this afternoon I turned it on and the display would not light up. No music played. Seems like the battery is totally drained. Plugged into US

  • Media Manager

    I have a sequence in Pro Res HQ. It's a 3 camera multiclip. My sequesnce is connected yet the Multiclip has a red x on it. I moved my media from sata drive 3 to sata drive one. My sequence is actually made up of two pieces of multiclips. MC 2 is conn

  • Two Problems with Purchased Songs

    I've run into two problems recently. The first is that today my iPod stopped playing purchased music, the second is that my computer died so the only place I have my purchased music is on my computer. Will iPod's stop playing purchased music after a

  • How do I disable firefox going forward and back with four finger swipe?

    Whenever I swipe with 4 fingers on my mac, firefox goes forward or back depending on the direction. I want it to stop doing this. How do I make it so?