11-16-2007 7:00 PM
Hi,
Here is my requirement i need to send an internal table as ZIP file to an external id.
Any info?
a®
11-16-2007 7:24 PM
You can use FM SXPG_CALL_SYSTEM and you need to maintain os command at SM69
Thanks
Seshu
11-16-2007 7:38 PM
Seshu,
I have only internal table. for this how could i use SXPG comand?
(I don;t want to download into pre.server and make it zip)
a®s.
11-16-2007 9:48 PM
Hello aRs,
Not sure about your requirement :
I have done like i will download the data into Application server and Used FM to zip the file >
Check the below code :
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.
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'.
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.
Thanks
Seshu
11-16-2007 9:51 PM
Seshu,
Thanks for your reply. I need to zip internal table and mail to external id. In this case i could able to use SXPG command
a®
11-16-2007 9:59 PM
Hi,
Please have a look demo program GRAPHICS_IGS_ZIPPER_DEMO perhaps it may help.
If it doesn't help, please disregard.
Regards,
Ferry Lianto
11-19-2007 5:01 PM
Hi,
Problem resolved using class cl_abap_gzip & cl_document_bcs.
a®
02-13-2008 1:15 PM
Hi,
I have the similar requirment I need to send an internal table as an email attachment. But I need to send it as zip attachment so, please requesting you to post ur code here or explain hou u done this
04-22-2008 9:38 AM
Hi you say that you have resolved this issue - please explain how you did it - thanks
12-31-2012 9:58 AM
Hi
I have a similar requirment , please requesting you to post ur code here or explain hou u done this it would be a great help thank you.
04-30-2008 12:07 PM
Hi,
I have the same problem that 'sundeep singh' has. I need to send via email the information contained in an internal table, but I have to send it attached as an zip file.
Can anyone post the solution to this problem,
Thanks.