function RFC_READ_REPORT ($fce) { $REPORT = saprfc_server_import ($fce,"PROGRAM"); saprfc_table_init ($fce,"QTAB"); $fd = fopen ($REPORT,"r"); if (!$fd) return ("NOTFOUND"); // raise exception "NOTFOUND" while (!feof($fd)) { $LINE = fgets ($fd,73); saprfc_table_append ($fce,"QTAB",array("LINE"=>$LINE)); } fclose ($fd); saprfc_server_export ($fce,"SYSTEM","PHP"); return (true); }
/** * Copy interface function module to class vars * */ function ImportVars() { if ($this->def == false) { return; } for ($i = 0; $i < count($this->def); $i++) { $interface =& $this->def[$i]; $name = strtoupper($interface[name]); $type = $interface[type]; switch ($type) { case 'IMPORT': if ($this->server == true) { if (isset($this->{$name})) { unset($this->{$name}); } $this->{$name} = @saprfc_server_import($this->fce, $name); } break; case 'EXPORT': if ($this->server == false) { if (isset($this->{$name})) { unset($this->{$name}); } $this->{$name} = @saprfc_export($this->fce, $name); } break; case 'TABLE': if (!isset($this->{$name}) || !is_object($this->{$name})) { $this->{$name} = new SAPTable($this->fce, $name); } break; } //switch } //for }