How to zip the folder in application server?

how to zip the folder in application server?

You can use
open dataset with filter
link:[http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_OS_ADDITION.htm#!ABAP_ADDITION_2@2@]

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

  • How to bring the data from application server to presentation server

    hi,
    i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this  topic.folowing is the code .
    *& Report  ZPFA_HIER_LOAD
    REPORT  ZFPA_HIER_LOAD.
    *---- Declaration of Oracle connectioN
    DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
    DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
    DATA : mfilename type string.
    data: begin of matab1 occurs 0,
          MFL1(9) TYPE C,
          MFL2(5) TYPE C,
          MFL3(9) TYPE C,
          MFL4(2) TYPE C,
          MFL5(8) TYPE C  ,
         end of matab1 .
    data: setid(8) type c.
    data: begin of source occurs 0,
          setid(8) type c,
          end of source.
    *PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
    *PARAMETERS : m_bsenty(8). " type c obligatory.
    *mfilename = P_PFILE.
    EXEC SQL.
      SET CONNECTION :con_name
    ENDEXEC.
    EXEC SQL.
      CONNECT TO :con_name
    ENDEXEC.
    EXEC SQL PERFORMING get_source.
      SELECT set_id FROM UNIT_SET INTO
      :setid
      ORDER BY SET_ID
    ENDEXEC.
    start-of-selection.
    LOOP AT SOURCE.
      REFRESH matab1. CLEAR matab1.
      EXEC SQL PERFORMING evaluate.
    SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
    :MFL5
    where set_id = :SOURCE-SETID ORDER BY MEM_ID
      ENDEXEC.
      if SOURCE-SETID = '80000000'.
       mfilename = '/tmp/aesorg'.
      elseif SOURCE-SETID = '80000006'.
       mfilename = '/tmp/Consolidation_Manager'.
      elseif SOURCE-SETID = '80000010'.
       mfilename = '/tmp/10org'.
      elseif SOURCE-SETID = '80000012'.
       mfilename = '/tmp/20org'.
      elseif SOURCE-SETID = '80000018'.
       mfilename = '/tmp/30org'.
      elseif SOURCE-SETID = '80000025'.
       mfilename = '/tmp/40org'.
      Endif.
      mfilename = '/usr/test.dat'.
    ************************This was i tried***********************
      open dataset mfilename for output in text mode encoding default." IN
    *TEXT MODE ENCODING DEFAULT.
    if sy-subrc <> 0.
    exit.
    endif.
    close dataset mfilename.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME         = MFILENAME
         FILETYPE         = 'ASC'
       TABLES
         data_tab         = matab1
       EXCEPTIONS
         file_write_error = 1
         invalid_type     = 2
         no_authority     = 3
         unknown_error    = 4
         OTHERS           = 10.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
      clear matab1.
    ENDLOOP.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
    close dataset mfilename.
         MFL5 = '0'.
       CLEAR MFL5.
    FORM evaluate.
      if MFL5 = -1.
        MFL5 = ''.
      ENDIF.
      concatenate MFL1 ','   into MFL1.
      concatenate MFL1 ','   into MFL3.
      matab1-MFL1 = MFL1.
      matab1-MFL2 = 'ZBUE,'.
      matab1-MFL3 = MFL3.
      matab1-MFL4 = ' ,'.
      matab1-MFL5 = MFL5.
      append matab1 .
      CLEAR MFL1.
      CLEAR MFL2.
      CLEAR MFL3.
      CLEAR MFL4.
      CLEAR MFL5.
    ENDFORM.
                     "evaluate
    *&      Form  GET_SOURCE
          text
    FORM GET_SOURCE.
      source-setid = setid.
      append source.
      clear source.
    ENDFORM.                    "GET_SOURCE

    Hi Rammohan,
    You cannot use OPEN DATASET to transfer data from application server to presentation server.
    You can do the following :
    <b>Do 1st point in BACKGROUND</b>
    1. Read the data file from application server into an internal table using OPEN DATASET
    <b>Do 2nd point in Foreground</b>
    2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
    You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
    Best regards,
    Prashant

  • How to delete the Folder from sql server 2008

    Hi all,
    I was trying to delete the folder from sql server 2008 with the below script
    DECLARE @path VARCHAR(256) -- path for backup files
    DECLARE @cmd VARCHAR(8000)
    DECLARE @folderName VARCHAR(256) -- filename for backup
    SET @folderName = + (CONVERT(varchar(10), GETDATE()-7, 112))  -- 7 days back date folder name
    SET @path = 'I:\Backup_Test\' + @folderName -- Folder path
    SET @cmd = 'del ' + @path -- Delete
    EXEC master..xp_cmdshell @cmd
    --Print @cmd
    This is not working it was asking the Confirmation (I:\Backup_Test\20100629\*, Are you sure (Y/N)? ) what will i do to the delete the folder.
    Thanks,
    Prasad R.

    I would notice   you that T-SQL does not play well to do things like that. Do not you want using .net language to delete folders?
    Old method is
    declare @HR int, @CFOLDER varchar(255),@FSO int
        set @CFOLDER='D:\folder\'
        EXEC @HR = sp_OACreate 'Scripting.FileSystemObject', @FSO OUT
        EXEC @HR = sp_OAMethod @FSO, null, 'DeleteFolder', @CFOLDER 
    Now regarding to your second question please examine xp_fileexist  system stored procedure
    CREATE FUNCTION dbo.fn_file_exists(@filename VARCHAR(300))
      RETURNS INT
    AS
    BEGIN
      DECLARE @file_exists AS INT
      EXEC master..xp_fileexist @filename, @file_exists OUTPUT
      RETURN @file_exists
    END
    GO
    -- test
    SELECT dbo.fn_file_exists('c:\a.txt')
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

  • How to send the file in *application server* as an email?

    Hi,
    I have a file in application server and I want to send that file as an email from application server.
    Please let me know how to do it.

    Hi Suman,
    look here:
    Re: How to send an email from Application server?
    Regards, Dieter

  • How to run the report via application server

    Report not running?
    hi All,
    I am calling the report via forms, In application server i had recompiled the reports in two different format too.
    1. myreports.rep
    2. myreports.jsp
    I have called the report from the menu and i used code like below
    Declare
          V_id Varchar2(100);
    Begin
        V_id := Run_Report_Object('myreports');
    End;but i am getting following error.
    Frm-41219:Cannot find report:Invalid ID.and subsequently an another too.
    Frm-40738:Argument 1 to builtin RUN_REPORT_OBJECT cannot be null.please guide me
    kanish

    I using Forms 10g R2, i store the recompile version in Application server.
    Good, so you can refer to the metalink note I mentioned above, as per storing the reports in the application server, the default place for running reports is not a folder in the FORMS_PATH, the REPORTS_PATH is set in the $ORACLE_HOME/bin/reports.sh file, pointing by default to the sample folder - $ORACLE_HOME/reports/samples/demo, for testing purposes you can put your report there and try it again, or you can modify the REPORTS_PATH variable in the reports.sh file to point to the directory you were mentioning.
    Note: I am calling the report throug menu using the eariler posting code.
    I would recommend to create a Form to call the Report, I am not sure if there are restrictions about invoking a report directly from the menu.
    About the code, you are missing a lot there, refer to metalink note mentioned above, here is an excerpt from that document.
    PROCEDURE TEST_REPORT IS
      repid      REPORT_OBJECT; 
      v_rep      VARCHAR2(100); 
      rep_status VARCHAR2(50); 
    BEGIN 
      repid := find_report_object('report5');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH); 
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:dept.deptno);
      v_rep := RUN_REPORT_OBJECT(repid); 
      rep_status := REPORT_OBJECT_STATUS(v_rep); 
      WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
        LOOP
          rep_status := report_object_status(v_rep);
        END LOOP;
      IF rep_status = 'FINISHED' THEN
        /*Display report in the browser*/
        WEB.SHOW_DOCUMENT('http://<YourServerName:8888/reports/rwservlet/getjobid'||
       substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
      ELSE 
        message('Error when running report'); 
      END IF; 
    END;
    In my eariler version 6i (2 tier) when i call the report it invoke parameter form. will 10g also behave same like 6i?
    Yes, there is still a parameter Form which runs in an HTML page.
    *1. Should i want to create any Report_Path, Report_classpath ? if yes ,where should i ?* It will depend on your configuration, the easiest way is to setup the REPORTS_PATH in the $ORACLE_HOME/bin/reports.sh file, if you are configuring the reports server to use environment ids, that would not work and you would need to setup the REPORTS_PATH directly in the reports engine configuration file .. $ORACLE_HOME/reports/conf/rwserver.template.
    Edited by: Rodolfo Ferrari on Jun 3, 2009 3:19 PM

  • How to see the logs of application server

    Hi ,
    I deployed my application on the dev server and want to find out whats goin on for a certain page . I was wondering where , what directory will have these log files for application server.
    I am new .. so any other suggestions to get the log information is also welcomed ..
    thanks

    These threads would help
    Re: App server Logs
    Re: CommonAM not releasing JDBC connection
    Thanks
    Tapash

  • How to rename a file in Application server

    Hi All,
    Here I have a issue with  the present file which is being generated in application server.
    Before the completion of the file the EDI tool is extracting the file from the app server.So here I would like to generate the file with a temp name and then rename to the actual file name which EDI recognises and fetches.
    Please correct me If I am wrong and let me know how to rename the file in application server.
    Thanks,
    Vijay N

    you can try using unix command , if your application server is unix.
    use move command
    mv   <source>  <target>
    REPORT ZUNIX line-size 400
                    no standard page heading.
    data: unixcom like   rlgrap-filename.  
    unixcom = 'mv file1 file2'.
    data: begin of tabl occurs 500,
            line(400),
          end of tabl.
    data: lines type i.
    start-of-selection.
      refresh tabl.
      call 'SYSTEM' id 'COMMAND' field unixcom
                    id 'TAB'     field tabl[].
    or else you can open dataset/ read the dataset and move it to another file and delete the old file.

  • How to read list of all files in folder on application server?

    How to read list of all files in folder on application server?

    Hi,
    First get the files in application server using the following function module.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
          EXPORTING
            name     = loc_fdir
          TABLES
            file_tbl = int_filedir.
    Here loc_fdir contains the application server path.
    int_filedir contains all the file names in that particular path.
    Now loop at int_filedir.
    OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
    MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
    endif.
    close datset int_filedir-name.
    endloop.

  • Reading all the files from Application Server in a specific folder

    Hi,
    I want to read all the files present in a folder on Application Server ( AL11 ). My problem is that I do not know the name of the file but I know the folder path where files are present.
    I need to go to this folder and pick up all the files present in this folder and then process these files in my program.
    Can any one help me in this!
    Regards,
    Lalit

    You can use a call to
    C_DIR_READ_START'
    and
    CALL 'C_DIR_READ_NEXT'
    Regards,
    John.

  • How can I know the version of Application Server Java Virtual Machine

    How can I know the version of Application Server Java Virtual Machine?
    Thanks a lot.

    Thats easy. Your jdk/jre are located in the App Server home directory. Just run the java command under the jdk directory with the "-version" switch and it will provide you with detailed information about your VM.
    For example if you're doing it at command prompt it will be something like
    java -versionI hope this will be useful to you.
    Regards,
    Wasif

  • How to ZIP the files and folders/sub folder files using java

    HI All,
    I'm New to this Forum, Could anybody tell me how to zip the files and folders/sub folders using java. For example I have a folder with the name testfolder and side that folder I have some files and some sub folders inside subfolders I have some other files. I need to ZIP the files and folders as they are in same hierarchy.
    Any pointers or help wolud be appritiated.
    Thanks,
    Rajeshbabu V

    [http://www.devx.com/tips/Tip/14049]

  • How to provide the F4 functionality to the files on application server

    Hi,
    How to provide the F4 functionality to the files on application server at selection screen.as it is F4_FILENAME for files on desktop , is there any Function module for this purpose also. I did a search in R/3 but didnt get any FM .Please advise.
    Regards,
    sam.

    You can get to it  using frontend class CL_GUI_FRONTEND_SERVICES if you know the host name and have the correct permissions, for example, this program works great for me in my system.
    report zrich_0001 .
    data: ifiletable type filetable.
    data: xfiletable like line of ifiletable.
    data: rc type i.
    parameters: p_file1 type localfile default'\sapprdusr'.
    at selection-screen on value-request for p_file1.
    call method cl_gui_frontend_services=>file_open_dialog
       EXPORTING
    *    WINDOW_TITLE            =
    *    DEFAULT_EXTENSION       =
    *    DEFAULT_FILENAME        =
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = '\sapprdusr'
    *    MULTISELECTION          =
      changing
        file_table              = ifiletable
        rc                      = rc
    *    USER_ACTION             =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        others                  = 4.
    read table ifiletable into xfiletable index 1.
    if sy-subrc = 0.
      p_file1 = xfiletable-FILENAME.
    endif.
    Regards,
    Rich Heilman

  • How to Down load Data in Application server into the Internal Table

    hi freinds,
    iam having a file in the application server.
    now i need to send the data in the file to the internal table.
    is there any Function Module?
    i need with out using the OPEN DATA SET and CLOSE DATA SET Keywords.
    is there any possible?
    Regard's,
    Ranjith.

    Hi,
    There is no other option for uploading the data from the application server to the internal table without using OPEN DATASET and CLOSE DATASET. Even if you find the FM internal logic in FM uses these keywords to read the data from Application server.

  • How can I download the data to Application Server and Network Drive

    Hi Experts
    I am having problem with download the data to Application Server and Network Drive in back ground. its working in foregorund but not in back ground.please suggest me . Thanks for advance.
    Thanks & Regards
    Raghava

    Hi Experts
    I am using like this
    P_Back is a check box on the selection-screen.
    it_fihrst_out-its internal table
    sy-batch -Program is running in the background
    IF sy-batch IS INITIAL.
        IF p_back = 'X'.
          OPEN DATASET file_01 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc = 0.
            LOOP AT it_fihrst_out.
              TRANSFER it_fihrst_out TO file_01.
            ENDLOOP.
          ENDIF.
          CLOSE DATASET file_01.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ELSE.
          CALL FUNCTION 'WS_DOWNLOAD'
            EXPORTING
              filename                = file_01
              filetype                = 'ASC'
            TABLES
              data_tab                = it_fihrst_out
            EXCEPTIONS
              file_open_error         = 1
              file_write_error        = 2
              invalid_filesize        = 3
              invalid_type            = 4
              no_batch                = 5
              unknown_error           = 6
              invalid_table_width     = 7
              gui_refuse_filetransfer = 8
              customer_error          = 9
              OTHERS                  = 10.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN 2.
              WRITE: / file_01, 'Output Error: File still open'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ENDIF.
      ELSE.
        LOOP AT it_fihrst_out.
          WRITE:/ it_fihrst_out.
        ENDLOOP.
      ENDIF.
    This is the code .

Maybe you are looking for

  • IPhone 4 not recognized by PC

    Hi For some time now my iPhone is not recgnized by my pc( I get a message saying device not recognized). I have tried every suggestion I saw including updating and reinstalling the driver. Checking it on other computers ( Mac and pc) - it was not rec

  • Can't get OCISvcCtxToLda to work

    I'm hacking PERL DBD::Oracle to be able to switch from OCI 8 to OCI 7 and back. This effort is mostly to keep old code that is blob_read()ing LONGs working and at the same time be able to read CLOBs while the database is in transition. So far so good

  • Hi All,What is the concept of table control in bdc

    Hi All,What is the concept of table control in bdc .Can u please explain in brief.How we have to handle the logic for va01 transaction . Thanks&regards. Bharat

  • How to debug XML&&XSLT?

    Now I use XSLT to transform xml.I meet many problem.I can't find a best way to debug my program. who can help me? thanks.

  • Toplink and VPD

    Hi, In a three-tier architecture, has anyone successfully implemented VPD in combination with Toplink and a ConnectionPool? When all my web-users are connecting to the database with the same (connection pool) credentials, how, when and where do I tel