ictorch / icsap
library to consume sap webservices
Installs: 284
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ictorch/icsap
Requires
- php: >=7.4
README
library to consume sap service layer
Usage
// get data form sap $sapClient = (new SapClientFactory())(); $query = http_build_query([ '$select'=>"CardCode,CardName", '$filter'=>"CardType eq 'cSupplier'" ]); $response = $this->sapClient->fetch("BusinessPartners?$query", HTTP_GET, [], ["Prefer" => "odata.maxpagesize=100"]);
// put data to sap $sapClient = (new SapClientFactory())(); try { $response = $this->sapClient->fetch("Items", HTTP_POST, [ "ItemCode" => "i001", "ItemName" => "Item1", "ItemType" => "itItem" ]); } catch (\SapException $e) { print_r($e->getJsonErrors()); }