Johan Schön > R3-0.31 > R3::itab

Download:
R3-0.31.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.31   Source  

NAME ^

R3::itab - Perl extension for handling ABAP internal tables

SYNOPSIS ^

  use R3::itab;
  $itab = new R3::itab ($conn, "MARA");

  $itab->get_records();
  %h = $itab->get_record($i);
  $itab->set_record($i, %h);
  $itab->ins_record($i, %h);
  $itab->add_record(%h);
  $itab->del_record($i);

  $itab->get_lines();
  $s = $itab->get_line($i);
  $itab->set_line($i, $s); 
  $itab->ins_line($i, $s);
  $itab->add_line($s);
  $itab->del_line($i);

  $itab->trunc();

  %h = $itab->line2record($s);
  $s = $itab->record2line(%h);

DESCRIPTION ^

First record in a R3::itab is 1. This is the same as in ABAP.

$itab->get_records() returns the number of records in $itab

$itab->get_record($i) returns an array of field name, value pairs for the $i:th record in $itab

$itab->set_record($i, %h) replaces the values of the $i:th record in $itab with the values in the field name, value pairs following the first parameter

$itab->ins_record($i, %h) inserts a record at the $i:th position in $itab and sets the values to the value in the field name, value pairs following the first parameter

$itab->add_record(%h) appends a new record to the end of $itab and sets the values to the value in the field name, value pairs in %h

$itab->del_record($i) deletes the $i:th record from $itab

$itab->get_lines() returns the number of records in $itab; should be the same amount as $itab->get_records() returns

$itab->get_line($i) returns an unpacked hex string with the values of the $i:th record in $itab

$itab->set_line($i, $s) replace the values of the $i:th record with the content in the unpacked hex string in $s

$itab->ins_line($i, $s) inserts a new record at the $i:th position in $itab and sets the values to the content in the unpacked hex string $s

$itab->add_line($s) adds a new record to the end of $itab and sets the values to the content in the unpacked hex string $s

$itab->del_line($i) deletes the $i:th record from $itab

$itab->trunc() deletes all records from $itab

$itab->line2record($s) returns the unpacked hex string as an array of field name, value pairs

$itab->record2line(%h) returns an unpacked hex string corresponding to the array of field name, value pairs

AUTHOR ^

Johan Schoen, johan.schon@capgemini.se

SEE ALSO ^

perl(1), R3(3), R3::conn(3), R3::func(3) and R3::rfcapi(3).

syntax highlighting: