How to write SAP ABAP web service and consume it in PHP
Last time i spend lot of time to develop SAP ES webservices connected to PHP. Why PHP? Because PHP was fastest method for me. Without starting do it in Java/Tomcat. But now i thing Tomcat will be better… I want o share some information about my work with SAP webservices. At the beginning most time

Last time i spend lot of time to develop SAP ES webservices connected to PHP. Why PHP? Because PHP was fastest method for me. Without starting do it in Java/Tomcat. But now i thing Tomcat will be better… I want o share some information about my work with SAP webservices.
At the beginning most time I spent on configure SAP basis problems with web-services. Roles setting ect.
Basic information about SAP and PHP configuration
- SAP ABAP – development
- Destination typu „G” InAcT (SM59) (otwarty na konkretny skrypt PHP)
- Embedded pakiet ZIPSZWEBSERVICES
- Function RFC (external) ZWEBSERV_INACT
- Logs ‘BAL_LOG_MSG_ADD’ + view data by IW33 (Tr. SLG1)
- Enterprise Serwis: Z_WEBSERV_PM3
- SAP AS
- Define webserwis SAP WSLD
- How it works in SAP?
- Simple JOB fill public table named: ZWEBSRV_PM in procedure Z_JOB_FILL_ZWEBSRV_PM (call with variant
- Security
- Communication by HTTPS (simple but effective in corp. environment)
- InAcT – server Windows x64 2012 R1 (planned migrate do Linux)
- Server Apache 2.4/PHP 5.3 (+biblioteka SOAP)
- Skrypt PHP index.php
- Windows job scheduler call PHP http://SOAP/index.php
Basic information about run and start web services in SAP
- SAP Note 1300943
- Transport web-services SAP Note (need password) no. 1300943
PHP implementation
- Apache 2.4/PHP 5.6 (now 7)
- Enable SOAP, XML in php.ini config file
- The SoapClient class provides a client for » SOAP 1.1, » SOAP 1.2 servers à [PHP_SOAP] extension=php_soap.dll
- Przykład kodu wywołania SOAP AS SAP z poziomu PHP
$WSDL = "http://xxx.pl:8000/sap/bc/srt/wsdl/bndg_52B09DB8E7B611E0E10080000A150CAA/soap11/wsdl11/allinone/standard/document?sap-client=030";
$SOAP_CLIENT_PARAM = array('login' => 'WEBSERVICES', 'password' => *********', 'trace' => true, 'exceptions' => true);
$soapClient = new SoapClient($WSDL, $SOAP_CLIENT_PARAM);
$soapReturn = $soapClient->ZWebservPm3(array('P_ZIPSISTAT','P_ZIPSESTAT'));
SAP implementation
- Włączenie webswerwisów na ERP
- Konfiguracja oraz Noty
- Zdefiniowanie modułu funkcyjnego
- Typu RFC
- Gdzie parametry przekazywane są przez wartość – Pass Values
- Zdefiniowanie webserwisu
- Utworzenie Enterprise Service
- Service Provider
- Existing ABAP Objects
- Function Module
- W wyniku powstaje webserwis i definicja webserwisu plik WSLD.
- Należy zdefiniować PROXY w SOAMANAGER.
- Provider Security
- Configuration of Web Service Binding
- SSL
- Secure Coversation
- Authentitaction Setings
- User/ID Password
- WSDL Generation
- WSDL Format – Standard
- Binding SOAP Version – SOAP 1.1
- Przy takich ustawieniach generowany jest WSLD .
What next?
- Zdefiniowanie i wykorzystanie JMS http://en.wikipedia.org/wiki/Java_Message_Service
- UUDI http://en.wikipedia.org/wiki/Universally_unique_identifier
- Poprawa bezpieczeństwa przez szyfrowanie komunikatów (HTTPS/SSL).
- Przejście na klienta JAVA.
Links
- https://www.codeproject.com/tips/671437/creating-web-service-using-php-within-minutes/
- http://sapuniversity.eu/creation-and-consuming-of-a-webservice-in-sap-abap-without-the-obsolete-transaction-lpconfighttp://sapuniversity.eu/creation-and-consuming-of-a-webservice-in-sap-abap-without-the-obsolete-transaction-lpconfig
- PHP, SAP and SSL http://wiki.scn.sap.com/wiki/download/attachments/250646828/PHP+-+How+to+Guide.pdf?original_fqdn=wiki.sdn.sap.com&version=2&modificationDate=1318254213504
Related Posts
Subscribe
Login
0 Comments
Newest
Oldest
Most Voted
Inline Feedbacks
View all comments