Skip to Content

help me....

hi everyone,

can anyone tell me how to create folders and zip files dynamically in SAP.

waitin for ur reply...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Feb 01, 2008 at 04:38 AM

    HI,

    You need to use Class cl_gui_frontend_services.

    Check the methods in the above class using transaction SE24 & use the same in your program.

    Best regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2008 at 04:45 AM

    For ZIP files check class - cl_abap_zip.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Anil

      I guess it possible with Application server..

      OPEN DATASET in_file FOR INPUT IN TEXT MODE FILTER....

      and you need to give the file name as "*.GZ"..

      -


      ok got some code which will help you-------

      Check the below code :
      
          *
                o Download the internal table data to a file selected by user
      
      DESCRIBE TABLE int_result_tab LINES sy-tfill.
      IF sy-tfill GT 0.
      IF sy-batch NE space.
      OPEN DATASET p_file FOR OUTPUT IN TEXT MODE.
      
      IF sy-subrc EQ 0.
      LOOP AT int_result_tab.
      TRANSFER int_result_tab TO p_file.
      
      IF sy-subrc NE 0.
      MESSAGE s000.
      EXIT.
      ENDIF.
      
      ENDLOOP.
      ELSE.
      WRITE:/ 'Error Opening file ', p_file.
      EXIT.
      ENDIF.
      
      CLOSE DATASET p_file.
      
          *
                o compress the file and export to web using gzip utility
      
      REFRESH: int_btcxpm.
      CLEAR d_status.
      MOVE p_file TO d_param.
      
      CALL FUNCTION 'SXPG_CALL_SYSTEM'
      EXPORTING
      commandname = 'ZGZIP'
      additional_parameters = d_param
      IMPORTING
      status = d_status
      TABLES
      exec_protocol = int_btcxpm
      EXCEPTIONS
      no_permission = 1
      command_not_found = 2
      parameters_too_long = 3
      security_risk = 4
      wrong_check_call_interface = 5
      program_start_error = 6
      program_termination_error = 7
      x_error = 8
      parameter_expected = 9
      too_many_parameters = 10
      illegal_command = 11
      OTHERS = 12.
      
      IF d_status = 'O'.
      
          *
                o Parse the File Name and destination
      
      CLEAR: d_file, d_folder, d_return, d_split1, d_split2.
      CONCATENATE p_file '.gz' INTO d_file.
      DO.
      SPLIT d_file AT '/' INTO d_split1 d_split2.
      IF sy-subrc NE 0 OR d_split2 EQ space.
      d_file = d_split1.
      EXIT.
      ENDIF.
      d_file = d_split2.
      d_folder = d_split1.
      ENDDO.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.