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

SM69

Former Member
0 Likes
1,320

Hi

I need help in setting the commands setting.

My customized program will download files into a folder and then call the command line to set files access permission. Hence i need to specify filepath and username.

My question is how to set the "operating system command" and "Parameters for operating system command" ?

Any example will be appreciated greatly.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,138

Hi

I think you can use FTP command, see demo programs RSFTP00*

Max

Hi

I need help in setting the commands setting.

My customized program will download files into a folder and then call the command line to set files access permission. Hence i need to specify filepath and username.

My question is how to set the "operating system command" and "Parameters for operating system command" ?

Any example will be appreciated greatly.

3 REPLIES 3
Read only

Former Member
0 Likes
1,139

Hi

I think you can use FTP command, see demo programs RSFTP00*

Max

Read only

Former Member
0 Likes
1,138

Hi,

you can create an external command using transaction code SM69 for OS command for executing the program e.g. java . then from your ABAP program you can execute this command using function module <b>SXPG_CALL_SYSTEM</b>

REPORT  ZABAPFTP. 

data : t_btcxpm      like btcxpm occurs 0, 
         p_addparam like sxpgcolist-parameters, 
         rep_date       like sy-datum, 
         t_date           like SXPGCOLIST-PARAMETERS. 

rep_date = sy-datum - 1. 
t_date = rep_date. 

*p_addparam = '/sap_production/usr/sap/trans/data/zabapftp.sh'. 

refresh t_btcxpm. clear t_btcxpm. 

call function 'SXPG_CALL_SYSTEM' 
     EXPORTING 
          commandname                = 'ZABAPFTP' 
          additional_parameters      = t_date 
     TABLES 
          exec_protocol              = t_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 sy-subrc ne 0. 
   write:/ 'Error in ZABAPFTP ', sy-subrc. 
endif. 

See the below link for more info

http://help.sap.com/saphelp_nw2004s/helpdata/en/27/cbdf3b8dc95136e10000000a114084/content.htm

Regards

Sudheer

Read only

0 Likes
1,138

Thanks, can have example in SM69?