04-17-2008 4:29 PM
Hi,
Can anyone help me in compressing two flat files using zip in SAP?
Regards
Shankar
04-17-2008 4:39 PM
You'll likely need to look into code resembling this. you will need to look at the parms to pass ZIP and put them in the PARAMETER
Field to determine the definition of input and output file names
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
* DOCUMENT =
application = 'ZIP.EXE'
PARAMETER = 'filename1, filename2 '
default_directory = 'C:\your_directory'
* MAXIMIZED = 'X'
* MINIMIZED =
* SYNCHRONOUS =
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8.
IF sy-subrc 0.
sy-subrc = sy-subrc.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
04-17-2008 4:39 PM
You'll likely need to look into code resembling this. you will need to look at the parms to pass ZIP and put them in the PARAMETER
Field to determine the definition of input and output file names
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
* DOCUMENT =
application = 'ZIP.EXE'
PARAMETER = 'filename1, filename2 '
default_directory = 'C:\your_directory'
* MAXIMIZED = 'X'
* MINIMIZED =
* SYNCHRONOUS =
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8.
IF sy-subrc 0.
sy-subrc = sy-subrc.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
04-17-2008 4:47 PM