Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.69 KB

index.md

File metadata and controls

54 lines (41 loc) · 1.69 KB

ATTENTION: THIS IS WORK IN PROGRESS AND NOT TO BE USED UNTIL THIS MESSAGE DISAPPEARS!

About PHP/SAP

PHP/SAP defines a layer of abstraction between actual SAP remote function calls and your PHP-Code. As to why this project has been created and which goals it wants to achieve, you can read the motivation. See the status page on build status, the code quality and the test coverage.

PHP/SAP

The interfaces define a common denominator on how to configure a connection to SAP, prepare a SAP remote function call, and invoke a SAP remote function call.

The common classes and exceptions add logic that is not specific to the underlying PHP module.

The module specific implementations contain code that is specific to the underlying PHP-module.

TL;DR

Especially short explanation for people in a hurry.

Use composer require to add PHP/SAP to your project. Depending on the PHP module you need to require a certain PHP/SAP composer package.

<?php
use phpsap\saprfc\SapRfcConfigA;
use phpsap\saprfc\SapRfcConnection;

$result = (new SapRfcConnection(new SapRfcConfigA([
  'ashost' => 'sap.example.com',
  'sysnr' => '001',
  'client' => '002',
  'user' => 'username',
  'passwd' => 'password'
])))
    ->prepareFunction('MY_COOL_SAP_REMOTE_FUNCTION')
    ->invoke(['INPUT_PARAM' => 'value']);

Documentation