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

how to call/Execute a batch file from ABAP code

Former Member
0 Likes
2,282

hi experts,

i wanted to know how to call/Execute a batch file from ABAP code?

thanks and regards

priya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,035

Hi,,,,,,

Can you please explain more by batch file wat do you mean..

Thanks

Saurabh

6 REPLIES 6
Read only

Former Member
0 Likes
1,036

Hi,,,,,,

Can you please explain more by batch file wat do you mean..

Thanks

Saurabh

Read only

0 Likes
1,035

how to call/Execute a dos batch file from ABAP code

batch files are nothing but .bat files

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,035

Look for [RSBDCSUB|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=RSBDCSUB&adv=false&sortby=cm_rnd_rankvalue] at sdn.

Regards

Read only

Former Member
0 Likes
1,035

Hi,,,,,

The code is....


REPORT ZDOSCOMMAND NO STANDARD PAGE HEADING.

PARAMETERS: DOSCMD(30) DEFAULT 'c:\test.bat' LOWER CASE.

call function 'GUI_EXEC'
  exporting
    command          = DOSCMD.

*-- End of program.

THanks

saurabh

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,035

Use a ([samples at sdn|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_frontend_services%3d%3eexecute&adv=true&sdn_author_name=&sortby=cm_rnd_rankvalue])

CALL METHOD cl_gui_frontend_services=>execute

Regards

Read only

Former Member
0 Likes
1,035

thanks