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

Re: Call cfunc

Former Member
0 Likes
663

Hello,

I have a statement like below in my program...

FORM exec_command USING cmd.

FORMAT COLOR COL_HEADING.

WRITE:/ 'Now executing:', cmd.

FORMAT COLOR OFF.

CALL 'SYSTEM' ID 'COMMAND' FIELD cmd

ID 'TAB' FIELD tabl-sys.

WRITE:/ 'Output from OS:'.

LOOP AT tabl. " <- OS-Output

WRITE: / tabl-line.

ENDLOOP.

COMMIT WORK.

REFRESH tabl.

ENDFORM.

i'm not understanding what exactly the call function do's here...

could any one help me in understanding it..

Regards,

Pavan

3 REPLIES 3
Read only

Former Member
0 Likes
525

It is executing operating system command from ABAP

check this [Link|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/issuingaUnixcommandfromABAP(se38)]

Read only

0 Likes
525

Hello,

thanks for the quick reply!!

but what will i get the value in tabl-sys from the below statement & how it ill be useful (with some examples will be helpful)

CALL 'SYSTEM' ID 'COMMAND' FIELD cmd

ID 'TAB' FIELD tabl-sys.

Regards,

Pavan

Read only

0 Likes
525

Output of the command will be stored in tabl-sys and same will be displayed as output.Go through the link provided.