Exemplo n.º 1
0
 /**
  * Constructor
  */
 function SAPTable($fce, $name)
 {
     parent::SAP();
     $this->fce = $fce;
     $this->name = $name;
     if ($this->fce) {
         $def = @saprfc_function_interface($this->fce);
         if (is_array($def)) {
             $ix = 0;
             while ($ix < count($def) && !($def[$ix][name] == $name && $def[$ix][type] == "TABLE")) {
                 $ix++;
             }
             if ($ix != count($def)) {
                 $members =& $def[$ix][def];
                 for ($j = 0; $j < count($members); $j++) {
                     $this->rowStruct[] = $members[$j][name];
                 }
             }
         }
         $this->Rows();
     }
 }
Exemplo n.º 2
0
 /**
  * Get definition of discovered function module
  *
  * @return array as definition
  */
 function GetDefinition()
 {
     if ($this->fce == false) {
         $def = false;
     } else {
         $def = @saprfc_function_interface($this->fce);
     }
     return $def;
 }
Exemplo n.º 3
0
 /**
  * @param $moduleName
  *
  * @return mixed
  * @author Manuel Will
  * @since 2013
  */
 public function getMetaData($moduleName)
 {
     $moduleConnection = saprfc_function_discover($this->getConnectionResource(), $moduleName);
     $data = saprfc_function_interface($moduleConnection);
     return $data;
 }
Exemplo n.º 4
0
   } 
   unset ($t_e);
   $SAPRFC_ENTRIES=serialize($e);
   setcookie ("SAPRFC_ENTRIES", urlencode($SAPRFC_ENTRIES),time()+3600);
 }
 
 $fce = @saprfc_function_discover ($rfc,$function);      // discover interface of function module $function
 if (! $fce )
 {
    print_error_message ( "Discovering function module error",
                          "Can't discover interface of function module <b>$function</b>. Please check if the module is Remote-enable (transaction SE37, Atrributes).<a href=\"saprfc_test.php?p=select\">Other function module</a>",
                          saprfc_error()
                        );
    exit;
 }
 $def = @saprfc_function_interface($fce);               // retrieve definition of interface in array $def
                                                     // $def has following format:
 /* $def = array (
                    array ("name"=>"PARAMETER",      // name of import, export parameter or internal table
                           "type"=>"IMPORT",         // type: IMPORT, EXPORT, TABLE
                           "optional"=>0             // 1 - optional parameter
                           "def"=> typedef           // type definition (elementary SAP data type or structure)
                          ),
                    ............
                 )
           typedef = array (
                               array ("name"=>"item1" "abap"=>"C", "len"=>30, "dec"=>0),
                               array ("name"=>"item2" "abap"=>"I", "len"=>4, "dec"=>0),
                               .....
                            )
 */