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

FUNCTION SXPG_COMMAND_EXECUTE External program terminated with exit code 2

Former Member
0 Likes
1,870

HI,

I am using the below Function Module

gv_ap = '/nfs/ficheiros/FicheiroExtraccaoSIF/outbox'

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

commandname = 'Z_LS'

additional_parameters = gv_ap

TABLES

exec_protocol = t_fich

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.

with this folder '/nfs/ficheiros/FicheiroExtraccaoSIF/outbox' return the error:

/nfs/ficheiros/FicheiroExtraccaoSIF/outbox not found and

External program terminated with exit code 2

but if i map other directory the function return the files and folders that directory have.

Anyone could help me.

Thanks and Regards.

Eduardo Paiva

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
882

please check do you have read access to this directory?

a®

Read only

Former Member
0 Likes
882

Check in SM69 if Z_LS command exists. Looks from the return code that there is no definition of the command..

-Aman

Read only

Former Member
0 Likes
882

Hi,

Yes i have read access to this directory and the command 'Z_LS' exists.

Best Regards,

Eduardo Paiva