Execute startrfc to Call a Function Module

I am able to successfully execute startrfc to call a function module in SAP from DOS prompt. (The function module takes 2 integers as input and produces their sum as output). How to get the output on the Command prompt just after rfc. (i.e. the sum)

After remote log on :

Create program in receiver system.
Go to t-code se38.
Create a program.

data : c type i.

parameters : p_a type i,
                  p_b type i.

call function module you had created.

Give destination

exporting 
         val_a = p_a
         val_b = p_b

importing
           val_c = c.

write : / c.

activate. 

Execute

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.