cancel
Showing results for 
Search instead for 
Did you mean: 

PHP and structures

Former Member
0 Kudos

good morning all,

I am trying to use an array to go through alerts in RZ20 with the function "BAPI_SYSTEM_MTE_GETALERTS". Here is the Array that I am using:

$alerts = array (

array ("ShortDumps","010","0000001797","102","0000000185","0000000008"),

array ("AbortedJobs","032","0000000003","102","0000000426","0000000012")

);

I am calling it in the following manner:

foreach ($alerts as $alert) {

$fce = saprfc_function_discover($rfc, "BAPI_SYSTEM_MTE_GETALERTS");

saprfc_import($fce, "TID", array ("MTSYSID" => $sid, "MTMCNAME" => $cname, "MTNUMRANGE" => $alert["1"], "MTUID" => $alert["2"], "MTCLASS" => $alert["3"], "MTINDEX" => $alert["4"], "EXTINDEX" => $alert["5"]));

$rfc_rc = "";

$rfc_rc = saprfc_call_and_receive($fce);

$rows = saprfc_table_rows($fce, "ALERTS");

saprfc_function_free($fce);

echo "<TD>$rows";

};

It always returns 0. I have looked at RZ20 and see that there are open alerts. I have gotten this to work in Perl but just can not convert it over to PHP. ALERTS is a structure not a table and I am not sure if that has something to do with it. I looked through the documentation on saprfc for something that will return the amount of rows in the structure but could not find any.

Is there an easy way to count these?

Best Regards,

Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Cleaning up old Messages.

Regards,

Paul