/[sap_import]/call_rfc.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /call_rfc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Tue Nov 19 18:16:58 2002 UTC (21 years, 4 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +22 -18 lines
File MIME type: text/plain
configurable options

1 #!/usr/bin/perl
2 use strict;
3 use SAP::Rfc;
4 use Data::Dumper;
5 use XML::Simple;
6
7 if ($#ARGV < 0) {
8 print "usage: call_rfc.pl config.xml\n";
9 exit 1;
10 }
11
12 $|++;
13
14 my $config = XMLin(@ARGV[0]);
15
16 my $rfc = new SAP::Rfc(
17 ASHOST => $config->{sap}->{ashost},
18 USER => $config->{sap}->{user},
19 PASSWD => $config->{sap}->{passwd},
20 LANG => $config->{sap}->{lang},
21 CLIENT => $config->{sap}->{client},
22 SYSNR => $config->{sap}->{sysnr},
23 TRACE => $config->{sap}->{trace}
24 ) || die "new: $!";
25
26 $rfc->is_connected || die "not connected";
27
28 my $it = $rfc->discover($config->{sap}->{discover}) || die "discover: $!";
29
30 foreach my $p ($config->{sap}->{params}) {
31 foreach my $p_name (keys %{$p}) {
32 print "$p_name --> ",$p->{$p_name},"\n";
33 $it->$p_name($p->{$p_name});
34 }
35 }
36
37 $rfc->callrfc( $it );
38
39 #print Dumper($it);
40
41 $rfc->close();
42

  ViewVC Help
Powered by ViewVC 1.1.26