Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem calling function


i have creted a function module which read stock quantity using BAPI_MATERIAL_AVAILABILITY.

Import - MFRPN

Export - QNTY

If i execute function module from SAP the result it's OK but when i call function from PHP it does not output nothing.

$sap = new saprfc(array(
								"ASHOST"=>""		// application server
								,"SYSNR"=>"00"				// system number
								,"CLIENT"=>"200"			// client
								,"USER"=>"rfc"			// user
								,"PASSWD"=>"123456789"		// password
							,"show_errors"=>true			// let class printout errors
							,"debug"=>false)) ; 				// detailed debugging information
		// Call-Function

		// Call-Function

		// Call successfull?
		if ($sap->getStatus() == SAPRFC_OK)
			echo $quantity;
			// No, print long Version of last Error
			// or print your own error-message with the strings received from
			// 		$sap->getStatusText() or $sap->getStatusTextLong()

Please someone help me.

Thank you.

Former Member
Not what you were looking for? View more on this topic or Ask a question