@@ -32,14 +32,6 @@ use phpsap\saprfc\SapRfc;
32
32
* date as input and will return a date as output.
33
33
*/
34
34
$function = new SapRfc('MY_COOL_SAP_REMOTE_FUNCTION');
35
- /**
36
- * SAP has a different idea than ISO about formatting dates and times. However
37
- * PHP/SAP has your back with \phpsap\DateTime\SapDateTime extending DateTime.
38
- */
39
- $inputDate = new DateTime('2019-12-31');
40
- $function->setParams([
41
- 'IV_DATE' => $inputDate->format(SapDateTime::SAP_DATE)
42
- ]);
43
35
/**
44
36
* The instance in `$function` has no way to establish a connection
45
37
* because it lacks the necessary configuration. Let's add that
@@ -53,6 +45,14 @@ $configuration = new ConfigTypeA([
53
45
ConfigTypeA::JSON_PASSWD => 'password'
54
46
]);
55
47
$function->setConfiguration($configuration);
48
+ /**
49
+ * SAP has a different idea than ISO about formatting dates and times. However
50
+ * PHP/SAP has your back with \phpsap\DateTime\SapDateTime extending DateTime.
51
+ */
52
+ $inputDate = new DateTime('2019-12-31');
53
+ $function->setParams([
54
+ 'IV_DATE' => $inputDate->format(SapDateTime::SAP_DATE)
55
+ ]);
56
56
/**
57
57
* Now let's encode this remote function call.
58
58
*/
85
85
```
86
86
87
87
** Attention** : An encoded SAP remote function call contains no connection
88
- configuration. Access data and servers may change, but the name, the API and
89
- the parameters are not expected to change .
88
+ configuration. Access data and servers may change more easily than the name,
89
+ the API and the parameters .
90
90
91
91
Now let's unfreeze this SAP remote function call.
92
92
0 commit comments