File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ $result = $function->invoke(['paramName' => 'value']);
49
49
``` php
50
50
<?php
51
51
52
- use phpsap\common \AbstractRemoteFunctionCall;
52
+ use phpsap\classes \AbstractRemoteFunctionCall;
53
53
use phpsap\interfaces\IConfig;
54
54
use phpsap\saprfc\SapRfcConnection;
55
+ use kbATeam\TypeCast\TypeCastValue;
55
56
56
57
class MyCoolSapRemoteFunction extends AbstractRemoteFunctionCall
57
58
{
@@ -86,6 +87,17 @@ class MyCoolSapRemoteFunction extends AbstractRemoteFunctionCall
86
87
}
87
88
return $this->setParam('paramA', $value);
88
89
}
90
+
91
+ /**
92
+ * Define typecasting for SAP remote function return value.
93
+ * @return \kbATeam\TypeCast\TypeCastValue
94
+ */
95
+ protected function getReturnTypecast()
96
+ {
97
+ return new TypeCastValue(function ($res) {
98
+ return $res['E_OK'] !== 'X';
99
+ });
100
+ }
89
101
}
90
102
```
91
103
``` php
You can’t perform that action at this time.
0 commit comments