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 I spent on configure SAP basis problems with web-services. Roles setting ect.

Basic information about SAP and PHP configuration

  1. SAP ABAP – development
    1. Destination typu „G” InAcT (SM59)  (otwarty na konkretny skrypt PHP)
    2. Embedded pakiet ZIPS\ZWEBSERVICES
    3. Function RFC (external) ZWEBSERV_INACT
    4. Logs ‘BAL_LOG_MSG_ADD’ + view data by IW33 (Tr. SLG1)
    5. Enterprise Serwis: Z_WEBSERV_PM3
  2. SAP AS
    1. Define webserwis SAP WSLD
  3. How it works in SAP?
    1. Simple JOB  fill public table named: ZWEBSRV_PM in procedure Z_JOB_FILL_ZWEBSRV_PM (call with variant
  4. Security
    1. Communication by HTTPS (simple but effective in corp. environment)
  5. InAcT – server Windows x64 2012 R1 (planned migrate do Linux)
    1. Server Apache 2.4/PHP 5.3 (+biblioteka SOAP)
    2. Skrypt PHP index.php
    3. 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
  • Przykład kodu wywołania SOAP AS SAP z poziomu PHP

SAP implementation

  1. Włączenie webswerwisów na ERP
  2. Konfiguracja oraz Noty
  3. Zdefiniowanie modułu funkcyjnego
    1. Typu RFC
    2. Gdzie parametry przekazywane są przez wartość – Pass Values
  4. Zdefiniowanie webserwisu
    1. Utworzenie Enterprise Service
    2. Service Provider
    3. Existing ABAP Objects
  5. Function Module
  6. W wyniku powstaje webserwis i definicja webserwisu plik WSLD.
  7. Należy zdefiniować PROXY w SOAMANAGER.
    1. Provider Security
    2. Configuration of Web Service Binding
    3. SSL
    4. Secure Coversation
    5. Authentitaction Setings
    6. User/ID Password
    7. WSDL Generation
    8. WSDL Format – Standard
    9. Binding SOAP Version –  SOAP 1.1
    10. Przy takich ustawieniach generowany jest WSLD .

 Architecture webserwices SAP and PHP What next?

  1. Zdefiniowanie i wykorzystanie JMS http://en.wikipedia.org/wiki/Java_Message_Service
  2. UUDI http://en.wikipedia.org/wiki/Universally_unique_identifier
  3. Poprawa bezpieczeństwa przez szyfrowanie komunikatów (HTTPS/SSL).
  4. Przejście na klienta JAVA.

Links

  1. https://www.codeproject.com/tips/671437/creating-web-service-using-php-within-minutes/
  2. http://sapuniversity.eu/creation-and-consuming-of-a-webservice-in-sap-abap-without-the-obsolete-transaction-lpconfig/
  3. 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

 

 

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑