Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using unix script (perl) copyoutboundfile

Former Member
0 Likes
590

Hi guru,

I want to copy a file from a directory origin to directory destination.

The script copyoutboundfile use parameter $sourcesid and $targetid.

How i progmammed it in abap .

I defined a unix command name Z_TRANS_FILE to execute the script in SM69 .

How i pass the parameters if i use this function ?

or do you have other solution ?

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

commandname = unix_command

additional_parameters = params

IMPORTING

status = return_code

TABLES

exec_protocol = tabl

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.

Thanks in advance

Soufiene

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
559
CL_GUI_FRONTEND_SERVICES => FILE_COPY

CL_GUI_FRONTEND_SERVICES=>FILE_DELETE

Hi guru,

I want to copy a file from a directory origin to directory destination.

The script copyoutboundfile use parameter $sourcesid and $targetid.

How i progmammed it in abap .

I defined a unix command name Z_TRANS_FILE to execute the script in SM69 .

How i pass the parameters if i use this function ?

or do you have other solution ?

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

commandname = unix_command

additional_parameters = params

IMPORTING

status = return_code

TABLES

exec_protocol = tabl

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.

Thanks in advance

Soufiene

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
560
CL_GUI_FRONTEND_SERVICES => FILE_COPY

CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
Read only

0 Likes
559

No , i use FTP the function is SXPG_COMMAND_EXECUTE good and the parameter are target and source.

Read only

0 Likes
559