11## Usage: extending ` AbstractRemoteFunctionCall `
22
3- Let's assume you have a SAP remote function called
4- ` MY_COOL_SAP_REMOTE_FUNCTION ` , that takes a date as input value and returns
5- the according week.
3+ Let's assume you have a SAP remote function called ` Z_GET_WEEK ` , that takes a
4+ date as input value and returns the according week.
65
7- The class ` MyCoolSapRemoteFunction ` contains only code, that configures the API
8- of your SAP remote function:
6+ The class ` ZGetWeek ` contains only code, that configures the API of your SAP
7+ remote function:
98
109* ` getName() ` returns the SAP remote function name.
1110* ` setDate() ` sets the SAP remote function parameter.
@@ -20,19 +19,19 @@ use kbATeam\TypeCast\TypeCastValue;
2019use phpsap\DateTime\SapDateTime;
2120
2221/**
23- * Class MyCoolSapRemoteFunction
22+ * Class ZGetWeek
2423 *
2524 * Get the calendar week to a given date.
2625 */
27- class MyCoolSapRemoteFunction extends AbstractRemoteFunctionCall
26+ class ZGetWeek extends AbstractRemoteFunctionCall
2827{
2928 /**
3029 * Define the name of the remote function.
3130 * @return string
3231 */
3332 public function getName()
3433 {
35- return 'MY_COOL_SAP_REMOTE_FUNCTION ';
34+ return 'Z_GET_WEEK ';
3635 }
3736
3837 /**
@@ -82,7 +81,7 @@ $config = '{
8281 "passwd": "password"
8382}';
8483//create a new SAP remote function instance using the stored configuration
85- $dateToWeek = new MyCoolSapRemoteFunction (new SapRfcConfigA($config));
84+ $dateToWeek = new ZGetWeek (new SapRfcConfigA($config));
8685/**
8786 * Set the parameter for the SAP remote function.
8887 * Your editor shows you the available parameters of the SAP remote function
0 commit comments