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

Integrating External Operating System Commands into ABAP program.

thomas_schmitt3
Explorer
0 Likes
639

Hi folks,

using the transaction code sm69 it is possible to create an SAP command that's executing an operating system command.

Is it possible to integrate such an SAP command into our ABAP programs ?

How would we do so ?

Regards

Thomas

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
601

Check Fm 'SXPG_COMMAND_EXECUTE'

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
602

Check Fm 'SXPG_COMMAND_EXECUTE'

Read only

thomas_schmitt3
Explorer
0 Likes
601

Perfect, thanks a lot !

Read only

Former Member
0 Likes
601

Hello Thomas,

We have an easier way of achieving this without declaring a command in SM69.

Try the below piece of code:

DATA: command LIKE rs37a-line.
DATA: BEGIN OF tabl OCCURS 0,
          line(2000),
      END OF tabl.
 
command = 'ls -l'.
 
CALL 'SYSTEM' ID 'COMMAND' FIELD command
              ID 'TAB'     FIELD tabl-*sys*.

Replace the string in the variable 'comand' with any UNIX command.

Regards

Sabu

Read only

thomas_schmitt3
Explorer
0 Likes
601

That sounds good,

we're going to check this out as well.

Thanks a lot !