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

Calling executable file

Former Member
0 Likes
462

Hi all,

I have made one classical report in which i am taking output in text file.

Now for printing that text file i have made one BATCH File (Executable file of DOS).

So is there any command to execute that batch file directly from my report?

Thanks in Advance.

1 ACCEPTED SOLUTION
Read only

aaron_morden2
Contributor
0 Likes
436

CALL METHOD cl_gui_frontend_services=>execute
  EXPORTING
    document               = 'C:SAPtest.bat'
    operation              = 'OPEN'.
3 REPLIES 3
Read only

aaron_morden2
Contributor
0 Likes
437

CALL METHOD cl_gui_frontend_services=>execute
  EXPORTING
    document               = 'C:SAPtest.bat'
    operation              = 'OPEN'.
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
436

Hi,

Use FM 'GUI_RUN' or GUI_EXEC' to run ur batch file..

Cheers,

SImha.

Read only

Former Member
0 Likes
436

Use FM - WS_EXECUTE. Pass the pathname in the PROGRAM - thats it.

CALL FUNCTION 'WS_EXECUTE'
EXPORTING PROGRAM = 'D:/SKC.BAT'.

Hope it solves ur problem.