create-sap-tid()
Normally, an SAP TID (a string consisting of 24 hexadecimal digits) is generated internally in Response "SAP ALE" from four components (the IP address of the SAP system, the start time of the job, the last four digits of the job number and the record number as a counter).
This function allows the manual creation of an SAP TID, which can then be used in Response "SAP ALE" instead of the internally generated TID. Details and purpose of the mechanism are described there.
Parameters
Parameter |
Description |
a |
(optional) SAP alias . The specification of an SAP alias requires that the SapConnectionService is configured and the connection to the SAP system can be established. If this is not the case or no value is specified, the value in parameter "b" is used. |
b |
(optional) Local IP (the address of the sender). Default: " 127.127.127.127". Note: You can also specify a DNS name if it can be resolved to an IPv4, otherwise the function terminates with an error. |
c |
(optional) Timestamp (usually left empty → value of the current job is used). For example the system variable VAR_TIMESTAMP (is taken from the first run at a restart). Note: You can specify a timestamp variable or a string in the format "yyyy-MM-dd HH:mm:ss", milliseconds are ignored. If there is a format error in the explicit value, the function terminates with an error. |
d |
(optional) The last 4 digits of the profile job number (usually left empty → value of the current job is used ). |
e |
(optional) Counter value (usually left empty → value of the current job is used ). Important note: Especially if one IDoc is sent per record (checkbox "Enter output channels for each record" is set), make sure that the parameter either remains empty (→ the internal record number will be used then) or that a unique counter value is used for each record. |
Examples
Parameter a |
Parameter b |
Parameter c |
Parameter d |
Parameter e |
Result |
|
example.com |
|
|
|
5DB8D822270F5F1FC13B0001 |
|
93.184.216.34 |
|
|
|
5DB8D822270F5F1FC13B0001 |
|
192.168.2.254 |
|
|
|
C0A802FE270F5F1FC13B0001 |
|
dummy.dummy |
|
|
|
Termination with error. |
|
|
1970-01-01 01:00:00 |
|
|
7F7F7F7F270F000000000001 |
|
127.127.127.127 |
1970-01-01 01:00:00 |
|
|
7F7F7F7F270F000000000001 |