2010 Nov 23 11:04 PM
2010 Nov 23 11:38 PM
Have you tried class CL_ABAP_ZIP? It worked for me and it has a simple API.
Cheers
2010 Nov 24 4:06 AM
Hi Martin,
Thanks for you reply.
I tried using CL_ABAP_ZIP, I think we need to use upload modules to get the data from app server. But this has to be run in background. Can you please share your views?
Thanks,
Shanthi Juluru
2010 Nov 24 4:28 AM
Hi,
that API is simple. For example to add file to a zip archive you just need to call method ADD which has two input parameters: name and content. You need to get your file into local variable with type XSEQUNCE. It really does not matter where you file is. If you search for CL_ABAP_ZIP here on SDN you will find some examples.
Cheers
2010 Dec 03 1:00 PM
CONSTANTS: c_extcom TYPE sxpgcolist-name VALUE 'ZTEST',
c_oper TYPE syopsys VALUE 'Windows NT'.
DATA: v_dir_input TYPE sxpgcolist-parameters. " Input Directory
DATA: t_result TYPE STANDARD TABLE OF btcxpm.
v_dir_input = 'cmd /c unzip test.zip '.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = c_extcom
additional_parameters = v_dir_input
operatingsystem = c_oper
TABLES
exec_protocol = t_result
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
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
T.code SM69 create external command name 'ZTEST'