Subscribe

RSS Feed (xml)



Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Friday, October 15, 2010

Display the long raw fields of such SAP tables as D010S (ABAP sources) - Oraperl

#!/usr/local/bin/perl
# Dispaly the long raw fields of such tables
# as d010s (abap sources) ...
# Run the script like this:
# perl q.pl BLOCK D010S PROG SHOWCOLO
# | | | |
# | | | key field value
# | | key field
# | table
# log raw field name
use Oraperl;
$lda = ora_login("SID","sapr3","sap") || die "Cannot logon\n";
$query = "select $ARGV[0] from $ARGV[1] where $ARGV[2] = '$ARGV[3]'";
$csr = &ora_open($lda,$query);
@value = ora_fetch ($csr);
open (FILE, ">zizi");
$offset = 0;
while (1)
{
$blob = $csr->blob_read (0, $offset, 10000);
last unless $blob;
last unless length ($blob);
print FILE $blob;
$offset += length ($blob);
}
&ora_close($csr);
&ora_logoff($lda);

No comments:

Blog Archive