/: perform <form_name> in program <program_name>
/: using <var1>
/: using <var2>
.
.
/: changing <return1>
/: changing <return2>
/: endperform
Var1 and var2 are variable symbols and may of any of the four SAP Script symbol types. Return1 and return2 are local text symbols and must be therefore character strings.
In the ABAP subroutine the form for the above subroutine is defined as shown below.
FORM <form> TABLES fp_it_intab STRUCTURE itcsy
fp_it_outtab STRUCTURE itcsy.
.....
.....
Endform.
You can find many documents on this in the net.
Check these documents.
Subroutines And Their Use In SAPScript - ABAP Development - SCN Wiki
External Subroutines in SAP Script - Community Profiles - SCN Wiki