--- mail2sap.pl 2002/11/19 10:43:46 1.5 +++ mail2sap.pl 2002/11/19 18:20:55 1.7 @@ -1,4 +1,4 @@ -#!/usr/bin/suidperl -w +#!/usr/bin/suidperl # read e-mail from stdit (pipe from /etc/aliases) and call SAP rfc function # @@ -80,11 +80,15 @@ $rfc->is_connected || die "SAP rfc: not connected"; - my $it = $rfc->discover("Z_ZDMM0123_SIGMA_RFC") || die "discover: $!"; + my $it = $rfc->discover($config->{sap}->{discover}) || die "discover: $!"; + + foreach my $p ($config->{sap}->{params}) { + foreach my $p_name (keys %{$p}) { + $it->$p_name($p->{$p_name}); + } + } - $it->FILEPATH( "ZSIGMA" ); $it->FILENAME( $new ); - $it->PORT( "ZIDOC" ); $rfc->callrfc( $it );