Skip to Content
author's profile photo Former Member
Former Member

Executing external programs in Windows from UNIX

Hi all,

I would like to call an external program in Windows box from UNIX box. I tried to create a command in SM69, specify the command and OS type to Windows. When I try to execute the command in SM49, I got an error 'program_start_error'.

I tried also to create an RFC destination in SM59, using connection type = T (start external program via TCP/IP), specifying the program in the Program field and specify the Windows box hostname (or IP add) in the Target host. But this also seemed could not work.

Is there any other ways I could do this?

Thank you.

Mizwan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 24, 2006 at 11:23 AM

    <b>RSBDCOS0 Execute UNIX commands. </b>

    Look at <b>SM69, SM49</b> and

    Function <b>SXPG_COMMAND_EXECUTE</b>

    e.g. SM69

    Press F5 or click Change button

    Press F6 or click Create

    Fill in the following parameter :-

    Command name - the unix scripts file name e.g. ZABAPFTP

    Operating system command - e.g. sh

    Parameters for operating system command - e.g. /sap_production/usr/sap/trans/data/zabapftp.sh

    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.

    regards

    vinod

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.