web services - SAP and php SOAP COMMIT -


I have created a webservice from a BAPI to put some account documents in the SAP. In these cases, the system requires a committ-call after a successful income call. Both of these tasks should be called in "a reference". Now I am facing this problem that I do not know how to do it in php or if there is any way to do this? I have made the following example, but this does not work but the COMMIT function is executed but it does not have any effect on the SAP. I can not see the data in the database, although the first call "Data is booked successfully" I know that you should confirm this with a commute call in the SAP. There is a way to put 2 function calls in a Sekken in SE 37. I'm searching php-method this is insertAccntDoc ($ accntgl, $ currAmount, $ docHeader, $ accntTax) {#define authentication $ SOAP_AUTH = array ('login' = & gt; SAPUSER, 'password' => SAPPASSWORD); $ WSDL = "url_to_my_wsdl"; Download and Pars #Create Client Object, WSDL $ customer = new SOAP client ($ WSDL, $ SOAP_AUTH); $ Accntgl, 'CurrencyAmount' = & gt; $ Parameter = array ('AccountGl' = & gt # Setup $ currAmount, 'DocumentHeader' = & gt; $ docHeader, 'AccountTax' = & gt; $ AccntTax); Input Parameters (like SAP parameter name create caption) $ parameter = #Call operation (function) Capture and display any error {$ result = $ client- & gt; AcctngDocumentPost ($ params); $ Result = $ client-> BapiServiceTransactionCommit (); $ Result-> Jibchat = 'committed'; If (count ($ result-> return)> 1) {$ client-> Bapi service return service (); $ Result-> Gebucht = 'Rollback'; } And if ($ result-> gt; return-> item-> type == 's') {$ client-> BapiServiceTransactionCommit (); $ Result-> Jibchat = 'committed'; } Hold (easyfault $ exception) {$ client-> BapiServiceTransactionRollback (); $ Result-> Fehler = "*** caught exception *** *** $ Exceptions "& Lt; br> *** End Exception *** *** ; $ Result-> Jibbut = 'fahler bim alleged'; }}} Catch (easy default exceptions) {$ client-> BapiServiceTransactionRollback (); $ Result-> Fehler = "*** caught exception *** *** $ Exceptions "& Lt; br> *** End Exception *** *** ; $ Result-> Jibbut = 'fahler bam alien'; } # Output results $ result-> FlexRet = 'insertAccntDoc'; Return result; }

Thanks!

This link gives details on how to use "stateful" web services for a shared Session must be.



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -