5 Easy Steps to Call an External Command from SAP

Step 1:

Create a batch file with command C:\Temp>copy X(filename) \\19x.16y.20z.k\HPLJetPxxxx. (network path for printer is needed, not port)

Step 2:

Put this batch file on application server.

Step 3:

Read the file path of application server.

Step 4:

Go to SM69 and create new command with additional parameter allowed option and pass the file path of batch file.

Step 5:

Now use FM 'SXPG_COMMAND_EXECUTE' (pass command name created in SM69).

Author: Ruchi Pant

SAP ABAP Developer and Data Analyst. 9 years of IT experience with extensive ABAP work includes data migration in CRM . Worked on various modules like MM,PP,CRM,SRM,ISU,OM etc.

Module(s): ABAP