/[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

Annotation of /call_rfc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide 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 dpavlin 1.1 #!/usr/bin/perl
2 dpavlin 1.3 use strict;
3 dpavlin 1.1 use SAP::Rfc;
4     use Data::Dumper;
5 dpavlin 1.3 use XML::Simple;
6    
7     if ($#ARGV < 0) {
8     print "usage: call_rfc.pl config.xml\n";
9     exit 1;
10     }
11 dpavlin 1.1
12     $|++;
13    
14 dpavlin 1.3 my $config = XMLin(@ARGV[0]);
15 dpavlin 1.1
16     my $rfc = new SAP::Rfc(
17 dpavlin 1.3 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 dpavlin 1.1 ) || die "new: $!";
25    
26     $rfc->is_connected || die "not connected";
27    
28 dpavlin 1.3 my $it = $rfc->discover($config->{sap}->{discover}) || die "discover: $!";
29 dpavlin 1.1
30 dpavlin 1.3 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 dpavlin 1.1
37     $rfc->callrfc( $it );
38    
39     #print Dumper($it);
40    
41     $rfc->close();
42    

  ViewVC Help
Powered by ViewVC 1.1.26