phpsaprfc

Import-Parameter : 'parameter-name' could not be set (SourceForge SAPRFC PHP library)


I'm new to SAP - PHP programming and I use SourceForge SAPRFC PHP library for calling my SAP FM.

I use saprfc_import - saprfc_table_init - saprfc_table_read function before, but because my work, I need to pass a lot of import parameter value and because if I use this, I need to open - close SAP connection and my webpage become so slow.

Recently I read about SAPRFC class and it have callFunction function that use array as import parameter and I think it can help me, but when I debug my SAPRFC class, my import parameter always empty or it will be error like this:

Import-Parameter : 'parameter-name' could not be set. (Does it exist?)

I use this way to call my function

$arrayParam = array_push(["param_name"=>"param_value"]);

    $result = $sap->callFunction("FM_NAME",
             array(
                   array("IMPORT","param_name",$arrayParam),
                   array("EXPORT","output_column",array())
                       )
                    );

Is my way to call it right or not?


Solution

  • after searching via google for a while, i've found way to solve my problem here saprfc class on that github is more perfect than on saprfc official because it already modified and now i can pass an 2 dimension array as table for my parameter