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

os level programming using ABAP

Former Member
0 Likes
640

Hi Experts !

i have a requirement where i have to pick up date and time of the generation of a file from a folder in the application server and then place the time and date in and excel sheet.

till now this process is done manually where we have to go to the respective folder and pick up the data and time.

this process has to be automated and hence we need to write ABAP code for the os instructions which are now done manually like double clicking and navigating to another folder.

please provide me whatever info u have on this subject (os level programming).The os used is UNIX.

basics are also required so if u have a good document plz forward this to

manish.sharma@wipro.com

thanx!!

2 REPLIES 2
Read only

Maciej_DomagaBa
Contributor
0 Likes
503

To execute an OS level command from SAP:

First you define the OS command in SAP in transaction SM69. Then you can execute it from SAPGUI using SM49 or from ABAP code by: CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

Read only

Former Member
0 Likes
503

You can build a unix command and execute as follows:

DATA unixcmd(200) TYPE c.

CONCATENATE g_dirn lh_rpt1-filen INTO unixcomm.

CONCATENATE 'mv' unixcomm g_dirn INTO unixcomm SEPARATED BY space.

CONCATENATE unixcomm 'bpcs/' lh_rpt1-filen INTO unixcomm.

  • Executing the system commands witin ABAP.

CALL 'SYSTEM' ID 'COMMAND' FIELD unixcomm.