There
are 2 different ways to handle parameters in the
"Call" statement:
(1)
By position
Example:
Call
"myfunction" in="abcd"
out="varname"
In
this case, the function "myfunction" must use the
parameter names "IN1" and "OUT1" in its
interface definition (transaction SE37). It gets the value
IN1=abcd, and the value of parameter OUT1 is returned in the
variable V[varname]. The parameter names are built according to
their position in the call statement (IN1, IN2,...., OUT1,
OUT2,...).
(2)
By name
Example:
Call
"myfunction" in.banknumber="abcd"
out.city="varname" In this case the function
"myfunction" works with the import parameter
BANKNUMBER and the export parameter CITY. In your script, you
mixed (1) and (2): you work with positional parameters in the
Call statement, but you use your own names (not IN1, OUT1) in
the function.
I
suggest you always use the newer format (2) with named
parameters, since it is more flexible. |