Folder in Presentation Server

There are several files within a folder . i will just mention the folder path and program will retreive data from all the files within that flder .

You can try
  CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
    EXPORTING
      directory  = p_pres
    IMPORTING
      file_count = file_count
    TABLES
      file_table = it_file
      dir_table  = dir_table
    EXCEPTIONS
      cntl_error = 1
      OTHERS     = 2.
  LOOP AT it_file .
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = it_file-pathname
    TABLES
      data_tab                = gt_upload
endloop.

Similar Messages

  • How to create the folder in presentation server through pop-up(

    Hi Experts,
    Can u give me the solution , how to create the folder in presentation server through pop-up(means dynamically, after executing the program , pop-up has to come to create the folderand path)
    regards
    ram.

    Use the methods -> DIRECTORY_BROWSE & DIRECTORY_CREATE of the class CL_GUI_FRONTEND_SERVICES
    DATA: path TYPE string,
          rc TYPE i,
    dir_name TYPE string value 'HI'.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
        CHANGING
          SELECTED_FOLDER      = path
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    concatenate path '\' dir_name into path.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
        EXPORTING
          DIRECTORY                = path
        CHANGING
          RC                       = rc
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Edited by: Kartik Tarla on Sep 23, 2009 5:54 PM

  • Is there any way to create a folder in presentation server - webdynpro abap

    Hello,
    My requirement is to create a folder in presentation server using webdynpro abap..
    I tried on this CL_GUI_FRONTEND_SERVICRES classes ..but its getting an short dump.
    Is there any way to create folder using classes / FM..
    Regards,
    Praveen kumar reddy s.

    Hi PRaveen,
    Check this.. WD_TEST_APPL_ACFEXECUTE
    Check Thamos article..
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    go for help..
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b91539878a2d67e10000000a42189c/content.htm
    Cheers,
    Kris.
    Edited by: kissnas on May 10, 2011 2:24 PM

  • Folder list presentation server

    Hi,
    I want to display help  for directory list in presentation server.
    User can select the directory where they want to store data.
    If they entered a directory then how to check existence of that directory in presentation server.
    1) FM to diaplay and select list of directories in presentation server
    2) How to check given directory exist in presentation server or not.
    Thanks,
    Balamurugan.R

    Hi Bala,
    Use the function module F4_FILENAME.
    CALL FUNCTION 'F4_FILENAME'
    * EXPORTING
    *   PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
    IMPORTING
       file_name           = file_path.
    Declare file_path  of TYPE ibipparms-path.
    Check this link for sample code.
    http://www.sap-img.com/abap/using-function-modules-f4-filename.htm
    Hope this helps you.
    regards,
    Chandra Sekhar

  • Select folder on presentation not file

    HI to all,
    How to select Folder on presentation server, no need to select file, need to select folder.
    is there any FM or is there any method to do it
    pls help me
    regards
    raadha

    I want to create folder, i dont want to create files in that or i dont want to use existing files in that.
    once the uesr executes the program, we need to create folder, after that the program will crete files in that folder automatically.
    I want to provide the F4 help for folder or i want to create folder.
    for example DIRECTORY_BROWSE can provide F4 help for folder, but we cant create folder here, we can select only already created file.
    can any one pls help me
    regards
    raadha

  • F4 Help for Presentation Server Folder Name .

    Hi Experts,
    I want show the F4 help on the presentation server.
    If the file is selected REquirement is that , on clicking the F4, the dialog box should open.
    If we choose the file , then file should be selected , but if we select the folder then folder should be selected.
    Normal function modules or methods present in SAP opens the folder containt  in the folder.
    Kindly provide anyFM name or class method name o achieve the functiknality .
    Thanks in advance.

    HI,
    Please paste this code,You will get F4 help.
       DATA:  lt_filetable  TYPE filetable,
               lwa_filetable TYPE file_table,
               l_rc          TYPE i.
      REFRESH lt_filetable[].
      CLEAR:lwa_filetable.
    * Open file
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        CHANGING
          file_table              = lt_filetable
          rc                      = l_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        READ TABLE lt_filetable INTO lwa_filetable INDEX 1.
        IF sy-subrc = 0.
          p_sap1 = lwa_filetable-filename.
        ENDIF.
      ENDIF.

  • To create folder in Application server

    hi,
    How to create folder in application server from presentation server??
    how is the program it??
    reply me soon...
    thx,
    s.suresh.

    hi Suresh
    Hope u r having nice day
    here i am sending a sample report which can upload the file to Application Server which inturn automatically create folder .
    REPORT  ZSHR_UPLOAD_TO_APPLICATION              .
    DATA : BEGIN OF IT_MAT OCCURS 0,
              MBRSH LIKE MARA-MBRSH,
              MTART LIKE MARA-MTART,
              MAKTX LIKE MAKT-MAKTX,
              MEINS LIKE MARA-MEINS,
           END OF IT_MAT.
    DATA : W_DIR(40).
    MOVE 'D:\usr\sap\DEV\DVEBMGS00\work\SHR' TO W_DIR.
    "SHR" IS A FOLDER NAME TO BE CREATED
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                     = 'C:\MAT.TXT'
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = IT_MAT
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17.
    OPEN DATASET W_DIR FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
      IF SY-SUBRC EQ 0.
        LOOP AT IT_MAT.
           TRANSFER IT_MAT TO W_DIR.
        ENDLOOP.
      ENDIF.
    CLOSE DATASET W_DIR.
    IF USEFUL AWARD POINTS.
    REGARDS
    HEMASEKHARA REDDY S

  • File copy from SHARED folder to Application server

    Hi
    I have a file which is in a shared folder. My requirement is to copy this file into the application server.
    The function module C13Z_FILE_UPLOAD_BINARY is working fine with local files. But I could not use it to copy the file in shared folder.
    Please help me out.
    Points will be awarded for sure !!
    Thanks

    hi,
    use OPEN DATASET ... TRANSFER ... CLOSE DATASET to transfter the data on to the required file path ... else use transaction
    CG3Z - to upload file from presentation server to application server.
    Regards,
    Santosh

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • I have to upload a folder to the server

    Hi all,
    My requirement is i have to upload a folder through jsp page to the tomcat server, but i am not aware of that, i know only file uploading using html tal type=file, so can any one please send me the code to upload a folder to the server(specified place). Means i want to place the folder in the specified position in the server(how can i specify the path) and after that i have to read the contents(jpeg images) present in that folder(now how can i get the path) and place them in the DB, so can any body kindly send me the coding for this requirement. Send me all the necessary required files for this including (jsp file, java bean(if necessary .java file for that jsp page)).
    Waiting for the reply.
    sasi.

    giyf.... amongst many others
    http://www.jguru.com/faq/view.jsp?EID=160

  • Error while downloading the PDF file on presentation server

    Hi all,
    i have converted OTF file into PDF one and then downloading it to the presentation server . But it gives the error as follows
    'Access to file denied'    . Can anyone tell me what may be the issue ? Below is my code
    DATA: i_lines TYPE tline OCCURS 0 WITH HEADER LINE.
    DATA: ws_bin_size TYPE i.
    DATA: t_otf  TYPE TABLE OF itcoo,
                ws_filename TYPE string.
      t_otf[] = wa_job_info-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format        = 'PDF'
          max_linewidth = 132
        IMPORTING
          bin_filesize  = ws_bin_size
        TABLES
          otf           = t_otf
          lines         = i_lines.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = ws_bin_size
          filename     = 'C:\ABC.PDF'
          filetype     = 'BIN'
        TABLES
          data_tab     = i_lines.

    Hi Sayeed,
          You may not having the permissions to create files in 'C' folder. Change the path and try again.

  • "Bad data format" when reading txt file from the presentation server

    Hello,
    I have a piece of code which reads a txt file from the presentation server to an internal table like below:
    DATA : lv_filename type string.
    lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
    CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
       FILENAME              = lv_filename
    CHANGING
       DATA_TAB            = lt_tsd. " lt_tab has the exact same fields as the Test.txt's. Test.txt has only one line, tab delimited.
    When running this code, exception BAD_DATA_FORMAT is issued.
    Is it because of the file encoding or delimiter or other reason?
    Thanks,
    Yang

    Hello,
    If its tab delimited then use the has_field_seperator parameter and check
    DATA : lv_filename type string.
    lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
    CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
       FILENAME                = lv_filename
       FILETYPE                 = 'ASC'
       HAS_FIELD_SEPARATOR          = u2018Xu2019
    CHANGING
       DATA_TAB            = lt_tsd.
    Vikranth

  • 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.

  • Any FM to choose the path on Presentation server while GUI_Download

    Hi Friends,
    Is there any FM to choose the folder path while downloading a file on to presentation server.
    I am using GUI_Download with a fixed path to store but user wants to choose the path where to store.(functionality similar to what we use if we download any thing form our lotusnotes mail or downlaoding anything from net)
    I fixed it to c:/ but user wants it to control, so is there any FM for this.
    I need a FM like KD_GET_FILENAME_ON_F4 but while downloading.
    Any inputs are highly appreciated.
    Regards,
    Simha

    Hi,
    this may help u...
      DATA:   w_file_name TYPE string,
              w_file_path TYPE string,
              full_path type string,
              action type i.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          window_title         = name
          initial_directory    = 'c:\Documents and Settings\2q\Desktop'
          prompt_on_overwrite  = 'X'
          default_extension    = 'XLS'
          default_file_name    = name
        CHANGING
          filename             = w_file_name
          path                 = w_file_path
          fullpath             = full_path
          user_action          = action
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      IF action EQ 0.
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = w_file_name
            filetype                = 'DAT'
          CHANGING
            data_tab                = <tab>
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.
      ENDIF.

  • Browse users presentation server directory and save a text file in it

    Hi All,
    We have a requirement in which I need to provide two buttons Browse and Export in CRM web UI with following functionality:-
    1) On click of browse button user should have an option to browse and select a folder(not file) from presentation server(useru2019s computer).
    2)Once user selects a folder and click export button, I need to save a text file in this folder.
    Any help on any of the above two requirements will be highly appreciated.
    Regards,
    Vimal

    Hey Vimal,
    did you find a solution for your problem?
    Actually I'am facing exactly the same issue.
    Thank you very much.
    Regards
    Marc

Maybe you are looking for

  • WLC 5508 H-REAP config problem

    Hello, I have a problem with H-REAP configuration. I have a 5508 controller in HQ and a lot of 1242 lap in remote sites. I have only one SSID (used only in remote sites) and only default vlan 1 in all sites.(a big subnet for every site). I created on

  • Iphoto won't let me import photos from my iphone5

    I go to iPhoto on my Mac Desktop (Version 10.9.3) and plug in my iPhone 5 and it recognizes my phone. But when i go to click to import photos, none of my photos will show up even after hours of waiting. Other iPhone 5's in the house have the same pro

  • How to make a fullscreen background changeable?

    Hello, I am working on a site where I have made a fullscreen background image, which scale with the size of the browser window. I would like to make it change to a new pic ( also fullscreen ) when clicking links. Any suggestions how to do this? This

  • KEFC Transactions / Cost Objects

    I changed the inbound structure to include two more cost objetcs. However, when I execute KEFC, the new objects are there on the output, but the values are blank. Is there something else I need to do to pull in the two new cost values besides add the

  • Photoshop or Illustrator for A4 printed brochures?

    I prefer Photoshop for designing and I am far more experienced with it meaning I can get design jobs done quickly, but should I learn to love Illustrator (or even InDesign) for my new job designing brochures (usually no larger than A4) for print?? If