/[sap_import]/pipe2sap.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

Diff of /pipe2sap.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Mon Feb 3 13:36:52 2003 UTC revision 1.3 by dpavlin, Mon Feb 3 14:24:55 2003 UTC
# Line 29  my $outdir = $config->{outdir} || die "c Line 29  my $outdir = $config->{outdir} || die "c
29  # create output filename  # create output filename
30  my ($ss,$mm,$hh,$dd,$mm,$yy) = localtime(time);  my ($ss,$mm,$hh,$dd,$mm,$yy) = localtime(time);
31  $yy += 1900;  $yy += 1900;
32    $mm++;
33  my $outfile = $config_file;  my $outfile = $config_file;
34  $outfile =~ s/\.xml//i;  $outfile =~ s/\.xml//i;
35  $outfile =~ s/^.*\/([^\/]+)/$1/i;       # basename  $outfile =~ s/^.*\/([^\/]+)/$1/i;       # basename
# Line 66  my $first = <STDIN>; Line 67  my $first = <STDIN>;
67  push @data,$first;  push @data,$first;
68  chomp $first;  chomp $first;
69  $first=~s/ //g;  $first=~s/ //g;
70  if ($first =~ m/\s+(\d+)\w+\s*$/) {  if ($first =~ m/\s+(\d+)\s+(\d+)\w+\s*$/) {
71          $lines = $1;          my ($nr,$lines) = ($1,$2);
72          print "Processing $lines lines\n";          print "Processing $lines lines order no. $nr\n";
73  } else {  } else {
74          die "FATAL: can't find number of lines in first line ($first) of input file.";          die "FATAL: can't find number of lines in first line ($first) of input file.";
75  }  }
# Line 95  if ($#data != $lines) { Line 96  if ($#data != $lines) {
96          print OUT $first,@data;          print OUT $first,@data;
97          close(OUT);          close(OUT);
98    
99            # cludge filename to nark.0004
100            rename "$outdir/$outfile", "$outdir/nark.0004";
101            $it->FILENAME("nark.0004");
102    
103          # call SAP R/3          # call SAP R/3
104          $rfc->callrfc( $it );          $rfc->callrfc( $it );
105  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26