Hello,
I cannot get the export values to display from the saprfc_export. When I print the array, the fields show blank values, however when I output saprfc_function_debug_info, the fields and their values are all shown. So can anyone show me why the values in the export array are not displaying?
$cust_params['PMNTTRMS'] not showing value in php
thanks!
// Create saprfc-instance$login = array(
"ASHOST"=>"xxx.xxx.xxx.xxx" // application server ,"SYSNR"=>"00" // system number ,"CLIENT"=>"400" // client ,"USER"=>"xxx" // user,"PASSWD"=>"xxx"
,"CODEPAGE"=>"1100" // password); // detailed debugging information
$rfc = saprfc_open ($login );
//We must know if the function really exists$fce = saprfc_function_discover($rfc, "ZZBAPI_SALESORDER_SIMULATE");
if(!$fce){
echo "<br>The function module has failed.<br><br>";
echo "<br> rfc: " . $rfc;
exit;
} else {
echo "<br>The function module connection successful!.<br>"; } $cust_params = '';//Pass import parameters
$ORDER_HEADER_IN = array("DOC_TYPE"=>"ZOR","ORD_REASON" => "WWW",
"PURCH_NO_C" => "WEB ORDER","SALES_ORG"=>"0010");
saprfc_import ($fce,"ORDER_HEADER_IN",$ORDER_HEADER_IN);
//Pass table parameters
saprfc_table_init ($fce,"ORDER_ITEMS_IN");
$ORDER_ITEMS_IN = array("ITM_NUMBER"=>"10", "MATERIAL" => "000000000000029901", "REQ_QTY"=>"3");
saprfc_table_append ($fce,"ORDER_ITEMS_IN", $ORDER_ITEMS_IN);
// $ORDER_ITEMS_IN = array (
// "MATERIAL"=>"P-101",
// "REQ_QTY"=>"0000000001000"
// );
// saprfc_table_append ($fce,"ORDER_ITEMS_IN", $ORDER_ITEMS_IN);
$ORDER_PARTNERS = array (
"PARTN_ROLE"=>"AG",
"PARTN_NUMB"=>"0000099996"
);
saprfc_table_append ($fce,"ORDER_PARTNERS", $ORDER_PARTNERS);
saprfc_table_init ($fce,"ORDER_ITEMS_OUT");
//saprfc_export ($fce,"ZBAPICUSTOMER",$cust_params); $cust_params = saprfc_export ($fce,"ZBAPICUSTOMER");echo ($cust_params);
//$FULLNAME = saprfc_export ($fce,"FULLNAME");
//echo ($FULLNAME[FIRST]." ".$FULLNAME[LAST]);
//Call and execute the function
$rc = saprfc_call_and_receive ($fce);
echo "<br>HERE ZBAPICUSTOMER[PMNTTRMS]: " . $cust_params["PMNTTRMS"] . "<br>"; echo "<br>HERE ZBAPICUSTOMER1: " . $cust_params . "<br>"; echo "<br>HERE ZBAPICUSTOMER2: " . $cust_params[1] . "<br>"; echo "<br>HERE ZBAPICUSTOMER3: " . $cust_params[PMNTTRMS] . "<br><br><br>"; echo "<br>HERE ZBAPICUSTOMER4: " . $cust_params['PMNTTRMS'] . "<br>"; print_r ($cust_params); echo "<br>----<br>";saprfc_function_debug_info($fce);
foreach ($cust_params as $cust) {
echo "<br>2HERE cust_params PMNTTRMS2: " . $cust['PMNTTRMS'] . " - PMNTTRMS: " . $cust["PMNTTRMS"] . "<br>";
}