# Empty The contents of all tables in an interface
sub emptyTables {
my $self = shift;
map {
my $table = $self->{TABLES}->{ $_ };
$table->empty();
} keys %{$self->{TABLES}};
}
=head1 NAME
SAP::WAS::Iface - Perl extension for parsing and creating an Interface Object. The interface object would then be passed to the SAP::WAS::SOAP object to carry out the actual call, and return of values.
=head1 SYNOPSIS
use SAP::WAS::Iface;
$iface = new SAP::WAS::Iface( NAME =>"SAPWAS:ServiceName" );
NAME is mandatory.
=head1 DESCRIPTION
This class is used to construct a valid interface object ( SAP::WAS::Iface.pm ).
The constructor requires the parameter value pairs to be passed as
hash key values ( see SYNOPSIS ).
Generally you would not create one of these manually as it is far easier to use the "discovery" functionality of the SAP::WAS::SOAP->Iface() method. Tis takes the name of an existing WAS service, and returns a fully formed interface object.
Methods:
new
use SAP::WAS::Iface;
$iface = new SAP::WAS::Iface( NAME =>"SAPWAS:ServiceName" );
Create a new Interface object.
=head1 Exported constants
NONE
=cut
package SAP::WAS::Tab;
use strict;
use vars qw($VERSION);
# Globals
# Valid parameters
my $VALID = {
DATA => 1,
NAME => 1,
STRUCTURE => 1
};
# Construct a new SAP::WAS::Table object.
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = {
DATA => [],
TYPE => "chars",
@_
};
die "Table Name not supplied !" if ! exists $self->{NAME};
die "Table Structure not supplied !" if ! exists $self->{STRUCTURE};
SAP::WAS::Struc - Perl extension for parsing and creating a Structure definition. The resulting structure object is then used for SAP::WAS::Parms, and SAP::WAS::Tab objects to manipulate complex data elements.
=head1 SYNOPSIS
use SAP::WAS::Struc;
$struct = new SAP::WAS::Struc( NAME => XYZ, FIELDS => [......] );
=head1 DESCRIPTION
This class is used to construct a valid structure object - a structure object that would be used in an Export(Parms), Import(Parms), and Table(Tab) object ( SAP::WAS::Iface.pm ).
The constructor requires the parameter value pairs to be passed as
hash key values ( see SYNOPSIS ). The value of each field can either be accessed through $str->Fieldvalue(field1), or through the autoloaded method of the field name eg. $str->field1().
Methods:
new
use SAP::WAS::Struc;
$str = new SAP::WAS::Struc( NAME => XYZ );
addField
use SAP::WAS::Struc;
$str = new SAP::WAS::Struc( NAME => XYZ );
$str->addField( NAME => field1,
TYPE => chars );
add a new field into the structure object. The field is given a position counter of the number of the previous number of fields + 1. Name is mandatory, but type will be defaulted to chars if omitted.
deleteField
use SAP::WAS::Struc;
$str = new SAP::WAS::Struc( NAME => XYZ );
$str->addField( NAME => field1,
TYPE => chars );
$str->deleteField('field1');
Allow fields to be deleted from a structure.
Name
$name = $str->Name();
Get the name of the structure.
Fieldtype
$ftype = $str->Fieldtype(field1, [ new field type ]);
Set/Get the SAP WAS field type of a component field of the structure. This will force the overall value of the structure to be recalculated.
Fieldvalue
$fvalue = $str->Fieldvalue(field1,
[new component value]);
Set/Get the value of a component field of the structure. This will force the overall value of the structure to be recalculated.
Field
$fhashref = $str->Field(field1);
Set/Get the value of a component field of the structure. This will force the overall value of the structure to be recalculated.
Fields
@f = &$struct->Fields();
Return an array of the fields of a structure sorted in positional order.