<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: help me.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337362#M799966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I guess it possible with Application server..&lt;/P&gt;&lt;P&gt;OPEN DATASET in_file FOR INPUT IN TEXT MODE FILTER....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you need to give the file name as "*.GZ"..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; ok got some code which will help you-------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 05:03:52 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-02-01T05:03:52Z</dc:date>
    <item>
      <title>help me....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337358#M799962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone,&lt;/P&gt;&lt;P&gt;               can anyone tell me how to create folders and zip files  dynamically in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;waitin for ur reply...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 04:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337358#M799962</guid>
      <dc:creator>former_member438956</dc:creator>
      <dc:date>2008-02-01T04:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: help me....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337359#M799963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use Class cl_gui_frontend_services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the methods in the above class using transaction SE24 &amp;amp; use the same in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 04:38:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337359#M799963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T04:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: help me....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337360#M799964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For ZIP files check class - cl_abap_zip.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 04:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337360#M799964</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-02-01T04:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: help me....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337361#M799965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i checked this class but in 4.7 server this server is not in existence. so is there any alternative way of zipping the files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 04:57:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337361#M799965</guid>
      <dc:creator>former_member438956</dc:creator>
      <dc:date>2008-02-01T04:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: help me....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337362#M799966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I guess it possible with Application server..&lt;/P&gt;&lt;P&gt;OPEN DATASET in_file FOR INPUT IN TEXT MODE FILTER....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you need to give the file name as "*.GZ"..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; ok got some code which will help you-------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 05:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3337362#M799966</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-01T05:03:52Z</dc:date>
    </item>
  </channel>
</rss>

