First let me say this only works if your instance of SAP is running on an ISeries.
Next you will need authority to a TCODE SM69 so if you dont have that authority go talk with your Basis People good luck.
Now lets just dive in to SM69
I am seting up the most basic of ISeries commands the "Call" Statement. The Call is a command like SA38 it just lets you call a program.
The following is the Function Module that you need to place into your ABAP program to call this command.
call function 'SXPG_COMMAND_EXECUTE'
exporting
commandname = ld_comline
additional_parameters = v_parameter1
operatingsystem = sy-opsys
targetsystem = sy-host
stdout = 'X'
stderr = 'X'
terminationwait = 'X'
importing
status = ld_status
tables
exec_protocol = ld_output
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.
Parameter | Header 2 |
---|
Commandname | This is the name of the entry you setup in SM69 in my case it will be ZCALL. |
additional_parameters | In this example it will be your program name on the ISeries along with Library if needed. |
operatingsystem | In my example SAP was running on an ISeries so I could get away with sy-opsys. |
targetsystem | Again this works because I am on a ISeries sy-host |
Well thats it play around with it I want to see if I can reach another ISeries with this same procedure. I might make another post if I am able to make this work.
P.S. when I first did this nearly 4 years ago my company had SAP running on the ISeries but we have since migrated off the ISeries onto a windows machine so I cannot run this as it is configured any longer.