on 06-26-2009 9:36 AM
Hello,
I need a perl code example on how we can call TH_SERVER_LIST/TH_WPINFO modules ?
Thanks in Advance,
Amit
I explained this here:
/people/david.hull2/blog/2009/06/22/perl-and-sap-adventures-part-2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a script that will call TH_WPINFO:
#!/usr/bin/perl -w
use strict;
use sapnwrfc;
use Dumpvalue;
SAPNW::Rfc->load_config;
my $conn = SAPNW::Rfc->rfc_connect;
my $rd = $conn->function_lookup("TH_WPINFO");
my $rc = $rd->create_function_call;
$rc->SRVNAME("apsrv235_RQA_00");
$rc->invoke;
foreach my $row (@{$rc->WPLIST}) {
my $d = new Dumpvalue;
$d->dumpValue(\$row);
}
$conn->disconnect;
which will produce output like this:
-> HASH(0x9a6a0d0)
'WP_ACTION' => 'Direct Read '
'WP_BNAME' => 'WFUSER '
'WP_CPU' => ' '
'WP_DUMPS' => '0 '
'WP_ELTIME' => ' 1 '
'WP_IACTION' => 10
'WP_INDEX' => 55
'WP_IRESTRT' => 1
'WP_ISTATUS' => 4
'WP_ITYPE' => 4
'WP_IWAIT' => 0
'WP_MANDT' => 100
'WP_NO' => 55
'WP_PID' => '536666 '
'WP_REPORT' => 'SAPLTHFB '
'WP_RESTART' => 'Yes '
'WP_SEM' => '0 '
'WP_SEMSTAT' => 0
'WP_SERVER' => ' '
'WP_STATUS' => 'Running'
'WP_TABLE' => 'SWWWIHEAD '
'WP_TYP' => 'BGD'
'WP_WAITINF' => ' '
'WP_WAITING' => ' '
'WP_WAITTIM' => ' '
-> HASH(0x9a75074)
'WP_ACTION' => ' '
'WP_BNAME' => ' '
'WP_CPU' => ' '
'WP_DUMPS' => '0 '
'WP_ELTIME' => ' 0 '
'WP_IACTION' => 0
'WP_INDEX' => 77
'WP_IRESTRT' => 1
'WP_ISTATUS' => 2
'WP_ITYPE' => 6
'WP_IWAIT' => 0
'WP_MANDT' => ' '
'WP_NO' => 77
'WP_PID' => '520514 '
'WP_REPORT' => ' '
'WP_RESTART' => 'Yes '
'WP_SEM' => '0 '
'WP_SEMSTAT' => 0
'WP_SERVER' => ' '
'WP_STATUS' => 'Waiting'
'WP_TABLE' => ' '
'WP_TYP' => 'UP2'
'WP_WAITINF' => ' '
'WP_WAITING' => ' '
'WP_WAITTIM' => ' '
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.