SAP NetWeaver RFC SDK 7.50
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sapnwrfc.h
Go to the documentation of this file.
1 #ifndef SAPNWRFC_H
2 #define SAPNWRFC_H
3 
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef SAPTYPE_H
7 #include "sapucrfc.h"
8 #endif /* SAPTYPE_H */
9 
10 #ifndef DECL_EXP
11 # if defined(SAPonLIN) && defined(GCC_HIDDEN_VISIBILITY)
12 # define DECL_EXP __attribute__((visibility("default")))
13 # elif defined(SAPonDARW) && !defined(CPP_USE_STLPORT)
14 # define DECL_EXP __attribute__((visibility("default")))
15 # else
16 # define DECL_EXP
17 # endif
18 #endif /* DECL_EXP */
19 
20 #ifndef SAP_API
21 #ifdef SAPonNT
22 # define SAP_API _stdcall
23 #else
24 # define SAP_API
25 #endif /* SAPonNT */
26 #endif /* SAP_API */
27 
28 #ifdef SAPonNT
29 #pragma warning (disable : 4267) // disable warning: conversion from 'size_t' to 'const unsigned int'
30 #endif
31 
32 #if defined(SAPonOS390) && defined(__XPLINK__) && __CHARSET_LIB == 1
33 #pragma runopts("FILETAG(AUTOCVT,AUTOTAG)")
34 #endif
35 
36 #if defined SAPwith64_BIT && \
37  ! defined SAPonNT && \
38  ! defined SAPonOS400 && \
39  ! defined SAPccQ
40 
41  typedef long RFC_INT8; /* this requires the LP64 data model */
42 #elif defined SAPonHPPA || \
43  defined SAPonRS6000 || \
44  defined SAPonSUN || \
45  defined SAPonOS390 || \
46  defined SAPonOS400 || \
47  defined SAPonDARW || \
48  defined SAPonLIN
49 
50  typedef long long RFC_INT8;
51 #elif defined SAPonNT
52  typedef __int64 RFC_INT8;
53 #endif
54 
55 
56 /* RFC scalar data type mappings */
57 typedef SAP_UC RFC_CHAR; ///< Characters, RFCTYPE_CHAR
58 typedef RFC_CHAR RFC_NUM; ///< Digits, RFCTYPE_NUM /*SAPUNICODEOK_CHARTYPE*/
59 typedef SAP_RAW RFC_BYTE; ///< Raw data, RFCTYPE_BYTE
60 typedef SAP_RAW RFC_BCD; ///< Packed numbers, RFCTYPE_BCD /*SAPUNICODEOK_CHARTYPE*/
61 typedef SAP_RAW RFC_INT1; ///< 1 byte integer, RFCTYPE_INT1
62 typedef short RFC_INT2; ///< 2 byte integer, RFCTYPE_INT2
63 typedef int RFC_INT; ///< 4 byte integer, RFCTYPE_INT
64 typedef double RFC_FLOAT; ///< Floating point, double precision, RFCTYPE_FLOAT
65 typedef RFC_CHAR RFC_DATE[8]; ///< Date, RFCTYPE_DATE (YYYYMMDD)
66 typedef RFC_CHAR RFC_TIME[6]; ///< Time, RFCTYPE_TIME (HHMMSS)
67 typedef DecFloat16 RFC_DECF16; ///< IEEE 754r decimal floating point, 8 bytes
68 typedef DecFloat34 RFC_DECF34; ///< IEEE 754r decimal floating point, 16 bytes
69 typedef RFC_INT8 RFC_UTCLONG ; ///< timestamp/long
70 typedef RFC_INT8 RFC_UTCSECOND ; ///< timestamp/second
71 typedef RFC_INT8 RFC_UTCMINUTE ; ///< timestamp/minute
72 typedef int RFC_DTDAY ; ///< date/day
73 typedef int RFC_DTWEEK ; ///< date/week
74 typedef int RFC_DTMONTH ; ///< date/month
75 typedef int RFC_TSECOND ; ///< time/second
76 typedef short RFC_TMINUTE ; ///< time/minute
77 typedef short RFC_CDAY ; ///< Calandendar day: Day and month
78 
79 #define RFC_TID_LN 24
80 #define RFC_UNITID_LN 32
81 typedef SAP_UC RFC_TID[RFC_TID_LN+1]; ///< Used for TIDs in inbound and outbound tRFC/qRFC
82 typedef SAP_UC RFC_UNITID[RFC_UNITID_LN+1]; ///< Used for Unit IDs in inbound and outbound bgRFC
83 
84 
85 /** \enum _RFCTYPE
86  * \ingroup api
87  *
88  * RFCTYPE is used in field descriptions (#RFC_FIELD_DESC) and parameter descriptions
89  * (#RFC_PARAMETER_DESC) and denotes the ABAP data type of the corresponding field/parameter.
90  */
91 typedef enum _RFCTYPE
92 {
93  RFCTYPE_CHAR = 0, ///< 1-byte or multibyte character, fixed size, blank padded
94  RFCTYPE_DATE = 1, ///< Date ( YYYYYMMDD )
95  RFCTYPE_BCD = 2, ///< Packed number, any length between 1 and 16 bytes
96  RFCTYPE_TIME = 3, ///< Time (HHMMSS)
97  RFCTYPE_BYTE = 4, ///< Raw data, binary, fixed length, zero padded.
98  RFCTYPE_TABLE = 5, ///< Internal table
99  RFCTYPE_NUM = 6, ///< Digits, fixed size, leading '0' padded.
100  RFCTYPE_FLOAT = 7, ///< Floating point, double precision
101  RFCTYPE_INT = 8, ///< 4-byte integer
102  RFCTYPE_INT2 = 9, ///< 2-byte integer. Obsolete, not directly supported by ABAP/4
103  RFCTYPE_INT1 = 10, ///< 1-byte integer, unsigned. Obsolete, not directly supported by ABAP/4
104  RFCTYPE_NULL = 14, ///< Not supported data type.
105  RFCTYPE_ABAPOBJECT = 16,///< ABAP object.
106  RFCTYPE_STRUCTURE = 17, ///< ABAP structure
107  RFCTYPE_DECF16 = 23, ///< IEEE 754r decimal floating point, 8 bytes
108  RFCTYPE_DECF34 = 24, ///< IEEE 754r decimal floating point, 16 bytes
109  RFCTYPE_XMLDATA = 28, ///< No longer used!
110  RFCTYPE_STRING = 29, ///< Variable-length, null-terminated string
111  RFCTYPE_XSTRING = 30, ///< Variable-length raw string, length in bytes
112  RFCTYPE_INT8, ///< 8-byte integer
113  RFCTYPE_UTCLONG , ///< timestamp/long, 8-byte integer
114  RFCTYPE_UTCSECOND , ///< timestamp/second, 8-byte integer
115  RFCTYPE_UTCMINUTE , ///< timestamp/minute, 8-byte integer
116  RFCTYPE_DTDAY , ///< date/day , 4-byte integer
117  RFCTYPE_DTWEEK , ///< date/week, 4-byte integer
118  RFCTYPE_DTMONTH , ///< date/month, 4-byte integer
119  RFCTYPE_TSECOND , ///< time/second, 4-byte integer
120  RFCTYPE_TMINUTE , ///< time/minute, 2-byte integer
121  RFCTYPE_CDAY , ///< calendar day, 2-byte integer
122  RFCTYPE_BOX , ///< boxed structure, note: not supported by NW RFC lib
123  RFCTYPE_GENERIC_BOX, ///< boxed client dependent structure, note: not supported by NW RFC lib
124  _RFCTYPE_max_value ///< the max. value of RFCTYPEs
125 }RFCTYPE;
126 
127 /** \enum _RFC_RC
128  * \ingroup api
129  *
130  * RFC return codes used by all functions that do not directly return a handle.
131  * Also used as error indicator in the structure #RFC_ERROR_INFO::code.
132  */
133 typedef enum _RFC_RC
134 {
135  RFC_OK, ///< Everything O.K. Used by every function
136  RFC_COMMUNICATION_FAILURE, ///< Error in Network & Communication layer
137  RFC_LOGON_FAILURE, ///< Unable to logon to SAP system. Invalid password, user locked, etc.
138  RFC_ABAP_RUNTIME_FAILURE, ///< SAP system runtime error (SYSTEM_FAILURE): Shortdump on the backend side
139  RFC_ABAP_MESSAGE, ///< The called function module raised an E-, A- or X-Message
140  RFC_ABAP_EXCEPTION, ///< The called function module raised an Exception (RAISE or MESSAGE ... RAISING)
141  RFC_CLOSED, ///< Connection closed by the other side
142  RFC_CANCELED, ///< No longer used
143  RFC_TIMEOUT, ///< Time out
144  RFC_MEMORY_INSUFFICIENT, ///< Memory insufficient
145  RFC_VERSION_MISMATCH, ///< Version mismatch
146  RFC_INVALID_PROTOCOL, ///< The received data has an unsupported format
147  RFC_SERIALIZATION_FAILURE, ///< A problem while serializing or deserializing RFM parameters
148  RFC_INVALID_HANDLE, ///< An invalid handle was passed to an API call
149  RFC_RETRY, ///< RfcListenAndDispatch did not receive an RFC request during the timeout period
150  RFC_EXTERNAL_FAILURE, ///< Error in external custom code. (E.g. in the function handlers or tRFC handlers.) Results in SYSTEM_FAILURE
151  RFC_EXECUTED, ///< Inbound tRFC Call already executed (needs to be returned from RFC_ON_CHECK_TRANSACTION in case the TID is already known and successfully processed before.)
152  RFC_NOT_FOUND, ///< Function or structure definition not found (Metadata API)
153  RFC_NOT_SUPPORTED, ///< The operation is not supported on that handle
154  RFC_ILLEGAL_STATE, ///< The operation is not supported on that handle at the current point of time (e.g. trying a callback on a server handle, while not in a call)
155  RFC_INVALID_PARAMETER, ///< An invalid parameter was passed to an API call, (e.g. invalid name, type or length)
156  RFC_CODEPAGE_CONVERSION_FAILURE, ///< Codepage conversion error
157  RFC_CONVERSION_FAILURE, ///< Error while converting a parameter to the correct data type
158  RFC_BUFFER_TOO_SMALL, ///< The given buffer was to small to hold the entire parameter. Data has been truncated.
159  RFC_TABLE_MOVE_BOF, ///< Trying to move the current position before the first row of the table
160  RFC_TABLE_MOVE_EOF, ///< Trying to move the current position after the last row of the table
161  RFC_START_SAPGUI_FAILURE, ///< Failed to start and attach SAPGUI to the RFC connection
162  RFC_ABAP_CLASS_EXCEPTION, ///< The called function module raised a class based exception
163  RFC_UNKNOWN_ERROR, ///< "Something" went wrong, but I don't know what...
164  RFC_AUTHORIZATION_FAILURE, ///< Authorization check error
165  RFC_AUTHENTICATION_FAILURE, ///< The authentication handler (RFC_ON_AUTHENTICATION_CHECK) failed to authenticate the user trying to log on
166  RFC_CRYPTOLIB_FAILURE, ///< Error when dealing with functions provided by the cryptolibrary
167  RFC_IO_FAILURE, ///< Error when dealing with io functions, streams etc
168  RFC_LOCKING_FAILURE, ///< Requesting or freeing critical sections or mutex failed
169  _RFC_RC_max_value ///< Don't use
170 }RFC_RC;
171 
172 /** \enum _RFC_ERROR_GROUP
173  * \ingroup api
174  *
175  * Groups several error conditions together, depending on the "layer" to which they belong.
176  * Used in the structure #RFC_ERROR_INFO::group.
177  */
178 typedef enum _RFC_ERROR_GROUP
179 {
180  OK, ///< OK
181  ABAP_APPLICATION_FAILURE, ///< ABAP Exception raised in ABAP function modules
182  ABAP_RUNTIME_FAILURE, ///< ABAP Message raised in ABAP function modules or in ABAP runtime of the backend (e.g Kernel)
183  LOGON_FAILURE, ///< Error message raised when logon fails
184  COMMUNICATION_FAILURE, ///< Problems with the network connection (or backend broke down and killed the connection)
185  EXTERNAL_RUNTIME_FAILURE, ///< Problems in the RFC runtime of the external program (i.e "this" library)
186  EXTERNAL_APPLICATION_FAILURE, ///< Problems in the external program (e.g in the external server implementation)
187  EXTERNAL_AUTHORIZATION_FAILURE, ///< Problems raised in the authorization check handler provided by the external server implementation
188  EXTERNAL_AUTHENTICATION_FAILURE,///< Problems raised by the authentication handler (RFC_ON_AUTHENTICATION_CHECK)
189  CRYPTOLIB_FAILURE, ///< Problems when dealing with functions provided by the cryptolibrary
190  LOCKING_FAILURE ///< Requesting or freeing critical sections or mutex failed
192 
193 
194 
195 
196 /** \struct _RFC_ERROR_INFO
197  * \ingroup api
198  *
199  * Used in all functions of the NW RFC library to return detailed information about
200  * an error that has just occurred. This can be an error that the communication partner
201  * sent back to us, an error that occurred in the network layer or operating system,
202  * an internal error in the NW RFC library or an error that the application programmer
203  * (i.e. you) has committed...
204  *
205  * Within a server function implementation, the application programmer (you) can return
206  * this structure to the RFC library in order to specify the error type & message that
207  * you want to send back to the backend.
208  */
209 typedef struct _RFC_ERROR_INFO
210 {
211  RFC_RC code; ///< Error code. Should be the same as the API returns if the API has return type RFC_RC
212  RFC_ERROR_GROUP group; ///< Error group
213  SAP_UC key[128]; ///< Error key
214  SAP_UC message[512]; ///< Error message
215  SAP_UC abapMsgClass[20+1]; ///< ABAP message ID , or class
216  SAP_UC abapMsgType[1+1]; ///< ABAP message type, e.g. 'E', 'A' or 'X'
217  RFC_NUM abapMsgNumber[3 + 1]; ///< ABAP message number
218  SAP_UC abapMsgV1[50+1]; ///< ABAP message details field 1, corresponds to SY-MSGV1
219  SAP_UC abapMsgV2[50+1]; ///< ABAP message details field 2, corresponds to SY-MSGV2
220  SAP_UC abapMsgV3[50+1]; ///< ABAP message details field 3, corresponds to SY-MSGV3
221  SAP_UC abapMsgV4[50+1]; ///< ABAP message details field 4, corresponds to SY-MSGV4
223 
224 /** \struct _RFC_ATTRIBUTES
225  * \ingroup connection
226  *
227  * Structure returned by RfcGetConnectionAttributes() giving some
228  * information about the partner system on the other side of this RFC connection.
229  */
230 typedef struct _RFC_ATTRIBUTES
231 {
232  SAP_UC dest[64+1]; ///< RFC destination
233  SAP_UC host[100+1]; ///< Own host name
234  SAP_UC partnerHost[100+1]; ///< Partner host name
235  SAP_UC sysNumber[2+1]; ///< R/3 system number
236  SAP_UC sysId[8+1]; ///< R/3 system ID
237  SAP_UC client[3+1]; ///< Client ("Mandant")
238  SAP_UC user[12+1]; ///< User
239  SAP_UC language[2+1]; ///< Language
240  SAP_UC trace[1+1]; ///< Trace level (0-3)
241  SAP_UC isoLanguage[2+1]; ///< 2-byte ISO-Language
242  SAP_UC codepage[4+1]; ///< Own code page
243  SAP_UC partnerCodepage[4+1]; ///< Partner code page
244  SAP_UC rfcRole[1+1]; ///< C/S: RFC Client / RFC Server
245  SAP_UC type[1+1]; ///< 2/3/E/R: R/2,R/3,Ext,Reg.Ext
246  SAP_UC partnerType[1+1]; ///< 2/3/E/R: R/2,R/3,Ext,Reg.Ext
247  SAP_UC rel[4+1]; ///< My system release
248  SAP_UC partnerRel[4+1]; ///< Partner system release
249  SAP_UC kernelRel[4+1]; ///< Partner kernel release
250  SAP_UC cpicConvId[8 + 1]; ///< CPI-C Conversation ID
251  SAP_UC progName[128+1]; ///< Name of the calling APAB program (report, module pool)
252  SAP_UC partnerBytesPerChar[1+1];///< Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
253  SAP_UC partnerSystemCodepage[4 + 1]; ///< Partner system code page
254  SAP_UC partnerIP[15 + 1]; ///< Partner IP
255  SAP_UC partnerIPv6[45 + 1]; ///< Partner IPv6
256  SAP_UC reserved[17]; ///< Reserved for later use
258 
259 /** \struct _RFC_SECURITY_ATTRIBUTES
260  * \ingroup connection
261  *
262  * Structure passed to the RFC_SERVER_AUTHORIZATION_HANDLER giving some
263  * security related information about the calling ABAP partner of an incoming RFC call.
264  */
266 {
267  SAP_UC *functionName; ///< Name of the called function module
268  SAP_UC *sysId; ///< Calling ABAP system ID
269  SAP_UC *client; ///< ABAP Client ("Mandant")
270  SAP_UC *user; ///< ABAP User
271  SAP_UC *progName; ///< Name of the calling APAB program (report, module pool)
272  SAP_UC *sncName; ///< SNC name of the calling ABAP system, if SNC is enabled. Use this only for display or logging purposes.
273  SAP_UC *ssoTicket; ///< Logon ticket of the ABAP user, if SSO2 or assertion tickets are enabled
274  SAP_RAW *sncAclKey; ///< Canonical representation of the SNC name of the calling ABAP system, if SNC is enabled. Use this for comparisons and access checks.
275  unsigned sncAclKeyLength; ///< Length of the above SNC AclKey
277 
278 /** \struct _RFC_UNIT_ATTRIBUTES
279  * \ingroup bgrfc
280  *
281  * If the external program is the sender of the bgRFC unit, this structure is used to set a
282  * bunch of special attributes that determine, how a bgRFC Unit will be processed in the backend.
283  * The fields user, client, tCode and program are optional. If left empty, the NW RFC lib will
284  * fill them with default values. The fields hostname, sendingDate and sendingTime should not be
285  * filled, the lib fills them, when the unit is submitted.
286  *
287  * If the external program is the receiver of the bgRFC unit, you can use RfcGetServerContext()
288  * to obtain the values that were sent by the backend.
289  */
290 typedef struct _RFC_UNIT_ATTRIBUTES{
291  short kernelTrace; ///< If != 0, the backend will write kernel traces, while executing this unit.
292  short satTrace; ///< If != 0, the backend will write statistic records, while executing this unit.
293  short unitHistory; ///< If != 0, the backend will keep a "history" for this unit.
294  short lock; ///< Used only for type Q: If != 0, the unit will be written to the queue, but not processed. The unit can then be started manually in the ABAP debugger.
295  short noCommitCheck; ///< Per default the backend will check during execution of a unit, whether one
296  ///< of the unit's function modules triggers an explicit or implicit COMMIT WORK.
297  ///< In this case the unit is aborted with an error, because the transactional
298  ///< integrity of this unit cannot be guaranteed. By setting "noCommitCheck" to
299  ///< true (!=0), this behavior can be suppressed, meaning the unit will be executed
300  ///< anyway, even if one of its function modules "misbehaves" and triggers a COMMIT WORK.
301  SAP_UC user[12+1]; ///< Sender User (optional). Default is current operating system User.
302  SAP_UC client[3+1]; ///< Sender Client ("Mandant") (optional). Default is "000".
303  SAP_UC tCode[20+1]; ///< Sender Transaction Code (optional). Default is "".
304  SAP_UC program[40+1]; ///< Sender Program (optional). Default is current executable name.
305  SAP_UC hostname[40+1]; ///< Sender hostname. Used only when the external program is server. In the client case the nwrfclib fills this automatically.
306  RFC_DATE sendingDate; ///< Sending date in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
307  RFC_TIME sendingTime; ///< Sending time in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
309 
310 /** \struct _RFC_UNIT_IDENTIFIER
311  * \ingroup bgrfc
312  *
313  * For convenience combines a unit's ID and its type.
314  */
315 typedef struct _RFC_UNIT_IDENTIFIER{
316  SAP_UC unitType; ///< 'T' for "transactional" behavior (unit is executed synchronously), 'Q' for "queued" behavior (unit is written into a queue and executed asynchronously)
317  RFC_UNITID unitID; ///< The 32 digit unit ID of the background unit.
319 
320 /** \enum _RFC_UNIT_STATE
321  * \ingroup bgrfc
322  *
323  * Used in RfcGetUnitState() for inquiring the processing status of a background Unit that
324  * we (or someone else) sent into this backend.
325  */
326 typedef enum _RFC_UNIT_STATE{
327  RFC_UNIT_NOT_FOUND, ///< No information for this unit ID and unit type can be found in the target system. If you are sure, that target system, unit ID and unit type are correct, it means that your previous attempt did not even reach the target system. Send the unit again. However, if you get this status after the Confirm step has already been executed, it means that everything is ok. Don't re-execute in this case!
328  RFC_UNIT_IN_PROCESS, ///< Backend system is still in the process of persisting (or executing if type 'T') the payload data. Give it some more time and check the state again later. If this takes "too long", an admin should probably have a look at why there is no progress here.
329  RFC_UNIT_COMMITTED, ///< Data has been persisted (or executed if type 'T') ok on receiver side. Confirm event may now be triggered.
330  RFC_UNIT_ROLLED_BACK, ///< An error of any type has occurred. Unit needs to be resent.
331  RFC_UNIT_CONFIRMED ///< Temporary state between the Confirm event and the time, when the status data will be erased for good. Nothing to be done. Just delete the payload and status information on your side.
333 
334 typedef RFC_CHAR RFC_ABAP_NAME[30+1]; ///< Name of ABAP function, function parameter or field in a structure. (null-terminated)
335 typedef RFC_CHAR RFC_PARAMETER_DEFVALUE[30+1]; ///< Default value of a function module parameter. (null-terminated)
336 typedef RFC_CHAR RFC_PARAMETER_TEXT[79+1]; ///< Parameter description for a function module parameter. (null-terminated)
337 
338 
339 /** \enum _RFC_CALL_TYPE
340  * \ingroup connection
341  *
342  * Used in RfcGetServerContext() for inquiring the type of
343  * an incoming function call from the backend.
344  */
345 typedef enum _RFC_CALL_TYPE{
346  RFC_SYNCHRONOUS, ///< It's a standard synchronous RFC call.
347  RFC_TRANSACTIONAL, ///< This function call is part of a transactional LUW (tRFC).
348  RFC_QUEUED, ///< This function call is part of a queued LUW (qRFC).
349  RFC_BACKGROUND_UNIT ///< This function call is part of a background LUW (bgRFC).
351 
352 /** \struct _RFC_SERVER_CONTEXT
353  * \ingroup connection
354  *
355  * Used in RfcGetServerContext() for obtaining more information about the
356  * current incoming function call.
357  */
358 typedef struct _RFC_SERVER_CONTEXT{
359  RFC_CALL_TYPE type; ///< Specifies the type of function call. Depending on the value of this field, some of the other fields of this struct may be filled.
360  RFC_TID tid; ///< If type is RFC_TRANSACTIONAL or RFC_QUEUED, this field is filled with the 24 digit TID of the tRFC/qRFC unit.
361  RFC_UNIT_IDENTIFIER* unitIdentifier; ///< If type is RFC_BACKGROUND_UNIT, this pointer is set to the unit identifier of the LUW. Note: the pointer is valid only during the execution context of your server function.
362  RFC_UNIT_ATTRIBUTES* unitAttributes; ///< If type is RFC_BACKGROUND_UNIT, this pointer is set to the unit attributes of the LUW. Note: the pointer is valid only during the execution context of your server function.
363  unsigned isStateful; ///< Specifies whether the current server connection is processing stateful RFC requests (assigned permanently to one fixed ABAP user session).
364  SAP_UC sessionID[33]; ///< Contains a unique zero-terminated session ID, identifying the ABAP or external user session. Can be used in stateful servers to store session context in a hashmap.
366 
367 /** \enum _RFC_AUTHENTICATION_TYPE
368 * \ingroup autoserver
369 *
370 * Type of authentication method used by the backend authentication handler (RFC_ON_AUTHENTICATION_CHECK).
371 */
373  RFC_AUTH_NONE, ///< No authentication data was provided
374  RFC_AUTH_BASIC, ///< Authentication with user and password
375  RFC_AUTH_X509, ///< Authentication with x509 certificate
376  RFC_AUTH_SSO ///< Authentication with assertion ticket
378 
379 /** \struct _RFC_CERTIFICATE_DATA
380 * \ingroup autoserver
381 *
382 * Compact structure containing relevant information about the x509 certificate provided by the RFC client. Can be accessed by the
383 * authentication handler (RFC_ON_AUTHENTICATION_CHECK) and used for validating the user trying to log on.
384 */
385 
386 typedef struct _RFC_CERTIFICATE_DATA{
387  const SAP_UC* subject; ///< Distinguished name of the user of the certificate
388  const SAP_UC* issuer; ///< Distinguished name of the certificate authority (CA) that issued the certificate
389  SAP_ULLONG validTo; ///< UTC Expiration date on which the certificate is no longer considered valid
390  SAP_ULLONG validFrom; ///< UTC Starting date since the certificate is valid
391  const SAP_UC* signature; ///< Fingerprint of the public key
392  struct _RFC_CERTIFICATE_DATA* next; ///< Pointer to the next certificate in the chain if any
394 
395 /** \struct _RFC_TYPE_DESC_HANDLE
396  * \ingroup repository
397  *
398  * Handle to a cached metadata description of a structure or table type.
399  */
401 
402 /** \struct _RFC_FUNCTION_DESC_HANDLE
403  * \ingroup repository
404  *
405  * Handle to a cached metadata description of a function module.
406  */
408 
409 /** \struct _RFC_CLASS_DESC_HANDLE
410  * \ingroup repository
411  *
412  * Handle to a cached metadata description of a class.
413  */
415 
416 
417 /** \struct RFC_DATA_CONTAINER
418  * \ingroup container
419  *
420  * Handle to a general data container (structure, table or function module).
421  */
423 
424 /** \struct RFC_STRUCTURE_HANDLE
425  * \ingroup container
426  *
427  * Handle to a data container for a structure.
428  */
430 
431 /** \struct RFC_FUNCTION_HANDLE
432  * \ingroup container
433  *
434  * Handle to a data container for a function module.
435  */
437 
438 /** \struct RFC_TABLE_HANDLE
439  * \ingroup container
440  *
441  * Handle to a data container for a table.
442  */
444 
445 /** \struct RFC_ABAP_OBJECT_HANDLE
446  * \ingroup container
447  *
448  * Handle to a data container for an ABAP object instance.
449  */
451 
452 /** \struct _RFC_THROUGHPUT_HANDLE
453 * \ingroup throughput
454 *
455 * Handle to a throughput object which can monitor performance relevant data of connections and servers.
456 * Returned by RfcCreateThroughput() or RfcGetThroughput().
457 */
459 
460 /** \struct _RFC_AUTHENTICATION_HANDLE
461 * \ingroup autoserver
462 *
463 * Handle to an authentication object which gives access to relevant authentication data received from the client.
464 * This data can be used to authenticate users in the authentication handler (RFC_ON_AUTHENTICATION_CHECK).
465 * Passed into the authentication handler (RFC_ON_AUTHENTICATION_CHECK) by the NW RFC library
466 */
468 
469 /** \struct _RFC_CONNECTION_HANDLE
470  * \ingroup connection
471  *
472  * Handle to an RFC connection (client connection or server connection).
473  * Returned by RfcOpenConnection() or RfcRegisterServer().
474  */
476 
477 /* Definitions for standalone Server */
478 
479 /** \struct _RFC_SERVER_HANDLE
480 * \ingroup autoserver
481 *
482 * Handle to an automated ("multi-count") RFC Server, which can manage multiple parallel listening server sessions.
483 * Returned by RfcCreateServer().
484 */
485 typedef struct _RFC_SERVER_HANDLE {void* handle;} *RFC_SERVER_HANDLE;
486 
487 /** \enum _RFC_PROTOCOL_TYPE
488 * \ingroup connection
489 *
490 * Used in state information in order to indicate the different types of RFC programs, RFC Server types, etc.
491 */
492 typedef enum _RFC_PROTOCOL_TYPE{
493  RFC_UNKOWN, ///< Unspecified
494  RFC_CLIENT, ///< RFC Client
495  RFC_STARTED_SERVER, ///< Started RFC Server
496  RFC_REGISTERED_SERVER, ///< Registered RFC Server
497  RFC_MULTI_COUNT_REGISTERED_SERVER,///< Multi-count registered RFC Server
498  RFC_TCP_SOCKET_CLIENT, ///< TCP Client
499  RFC_TCP_SOCKET_SERVER, ///< TCP Server
500  RFC_WEBSOCKET_CLIENT, ///< Websocket RFC Client
501  RFC_WEBSOCKET_SERVER, ///< Websocket RFC Server
502  RFC_PROXY_WEBSOCKET_CLIENT ///< Websocket RFC Client
504 
505 /** \enum _RFC_SERVER_STATE
506 * \ingroup autoserver
507 *
508 * Used in state information in order to indicate the current state of an RFC Server.
509 */
510 typedef enum _RFC_SERVER_STATE {
511  RFC_SERVER_INITIAL, ///< The server object has been created, but nothing has been done with it yet.
512  RFC_SERVER_STARTING,///< The server has been started, but startup is not yet complete and the server is not yet able to receive/serve requests. Should quickly switch to RUNNING or BROKEN.
513  RFC_SERVER_RUNNING, ///< Means at least one registration is still able to accept request from the gateway (in case of Registered Server), or that the server port is open and listening (in case of TCP Socket Server).
514  RFC_SERVER_BROKEN, ///< Means that all registrations are dead, e.g. because of gateway being down (in case of Registered Server), or that for some reason server port could not be opened (in case of TCP Socket Server).
515  RFC_SERVER_STOPPING,///< The server has been stopped via RfcShutdownServer() (with a timeout > 0) and is still busy processing ongoing requests. It is however no longer accepting new requests. Should switch to STOPPED, once the ongoing requests are finished.
516  RFC_SERVER_STOPPED ///< The server has been stopped via RfcShutdownServer() and is currently not processing nor accepting any requests. The object, however, is still valid and can be started again anytime with RfcLaunchServer().
518 
519 /** \struct _RFC_SERVER_ATTRIBUTES
520 * \ingroup autoserver
521 *
522 * Information about an RFC Server returned by RfcGetServerAttributes().
523 */
524 typedef struct _RFC_SERVER_ATTRIBUTES{
525  SAP_UC* serverName; ///< This server's name as given when creating the server.
526  RFC_PROTOCOL_TYPE type; ///< This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER.
527  unsigned registrationCount; ///< The current number of active registrations (in case of a Registered Server) or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server).
528  RFC_SERVER_STATE state; ///< This server's state.
529  unsigned currentBusyCount; ///< The number of requests currently being processed.
530  unsigned peakBusyCount; ///< The maximum number of requests the server has been processing in parallel since it has been created.
532 
533 
534 /** \enum _RFC_SESSION_EVENT
535 * \ingroup autoserver
536 *
537 * Used in a server session change listener to notify the application whenever a new user session on the server gets started or ends.
538 */
539 typedef enum _RFC_SESSION_EVENT{
540  RFC_SESSION_CREATED, ///< A new stateful user session has been created on the server. This can be done either by the server itself via RfcSetServerStateful(), or by the backend via function module RFC_SET_REG_SERVER_PROPERTY
541  RFC_SESSION_ACTIVATED, ///< A function call came in from the backend and started processing. This event can probably be ignored by 99% of the applications.
542  RFC_SESSION_PASSIVATED, ///< A function call completed processing. This event can probably be ignored by 99% of the applications.
543  RFC_SESSION_DESTROYED ///< A stateful user session has been destroyed, either by the server itself via RfcSetServerStateful(), or by the backend via function module RFC_SET_REG_SERVER_PROPERTY, or because the connection was closed (e.g. the corresponding ABAP user session ended or explicitly closed the connection), or because the connection was broken by network error/system failure etc. The application should now clean up all memory/resources allocated for the given session ID.
545 
546 /** \struct _RFC_SESSION_CHANGE
547 * \ingroup autoserver
548 *
549 * Notifies an RFC Server that a stateful user session has just been created or destroyed.
550 */
551 typedef struct _RFC_SESSION_CHANGE {
552  SAP_UC sessionID[30 + 1]; ///< Session ID of the user session in question
553  RFC_SESSION_EVENT event; ///< What has been done with that session
555 
557 
558 typedef void (SAP_API* RFC_SERVER_ERROR_LISTENER)(RFC_SERVER_HANDLE serverHandle, RFC_ATTRIBUTES* clientInfo, RFC_ERROR_INFO* errorInfo);
559 
560 /** \struct _RFC_STATE_CHANGE
561 * \ingroup autoserver
562 *
563 * Notifies the application that an RFC Server changed its state (e.g. got started, got shutdown, lost its connection to the backend etc.).
564 */
565 typedef struct _RFC_STATE_CHANGE {
566  RFC_SERVER_STATE oldState; ///< Previous state of the given server
567  RFC_SERVER_STATE newState; ///< New state of the given server
569 
571 
572 /** \struct _RFC_SERVER_MONITOR_DATA
573 * \ingroup autoserver
574 *
575 * Allows to retrieve monitoring information about all busy or idle connections of an automated RFC Server via RfcGetServerConnectionMonitorData().
576 */
578  RFC_ATTRIBUTES* clientInfo; ///< Pointer to an RFC_ATTRIBUTES structure containing information about this particular client connection.
579  int isActive; ///< 1, if this connection is currently processing a call, 0, if it is idle.
580  int isStateful; ///< If this connection is currently processing a call, this flag indicates, whether it is a stateful or stateless call: 0 = stateless, 1 = stateful.
581  SAP_UC functionModuleName[128]; ///< Name of the ABAP function module currently being processed over this connection (if the connection is currently active), or empty (if the connection is idle).
582  time_t lastActivity; ///< Point of time of the last activity on this connection (if the connection is currently idle), or not used (if the connection is busy).
584 
585 
586 /** \struct _RFC_TRANSACTION_HANDLE
587  * \ingroup transaction
588  *
589  * Handle to a data container for a tRFC/qRFC LUW.
590  * Can be filled with several RFC_FUNCTION_HANDLEs.
591  */
593 
594 /** \struct _RFC_UNIT_HANDLE
595  * \ingroup bgrfc
596  *
597  * Handle to a data container for a bgRFC LUW.
598  * Can be filled with several RFC_FUNCTION_HANDLEs.
599  */
600 typedef struct _RFC_UNIT_HANDLE {void* handle;} *RFC_UNIT_HANDLE;
601 
602 /** \struct _RFC_CONNECTION_PARAMETER
603  * \ingroup connection
604  *
605  * Structure used for connecting to a backend system via RfcOpenConnection() or
606  * RfcRegisterServer(). For a list of supported parameters see these two functions or the file sapnwrfc.ini, which gives a complete list of all possible connection parameters.
607  */
609 {
610  const SAP_UC * name; ///< The name of the connection parameter, like ashost, user, client.
611  const SAP_UC * value; ///< The value of the given parameter.
613 
614 /** \struct _RFC_FIELD_DESC
615  * \ingroup repository
616  *
617  * Structure for reading (RfcGetFieldDescByIndex() or RfcGetFieldDescByName())
618  * or defining (RfcAddTypeField()) the properties of a field in a structure/table.
619  */
620 typedef struct _RFC_FIELD_DESC
621 {
622  RFC_ABAP_NAME name; ///< Field name, null-terminated string
623  RFCTYPE type; ///< Field data type
624  /*SAPUNICODEOK_MIXEDLEN*/
625  unsigned nucLength; ///< Field length in bytes in a 1-byte-per-SAP_CHAR system
626  /*SAPUNICODEOK_MIXEDLEN*/
627  unsigned nucOffset; ///< Field offset in bytes in a 1-byte-per-SAP_CHAR system
628  /*SAPUNICODEOK_MIXEDLEN*/
629  unsigned ucLength; ///< Field length in bytes in a 2-byte-per-SAP_CHAR system
630  /*SAPUNICODEOK_MIXEDLEN*/
631  unsigned ucOffset; ///< Field offset in bytes in a 2-byte-per-SAP_CHAR system
632  unsigned decimals; ///< If the field is of type "packed number" (BCD), this member gives the number of decimals.
633  RFC_TYPE_DESC_HANDLE typeDescHandle; ///< Pointer to an RFC_STRUCTURE_DESC structure for the nested sub-type if the type field is RFCTYPE_STRUCTURE or RFCTYPE_TABLE */
634  void* extendedDescription; ///< Not used by the NW RFC library. This parameter can be used by applications that want to store additional information in the repository (like F4 help values, e.g.).
636 
637 /** \enum _RFC_DIRECTION
638  * \ingroup repository
639  *
640  * Used in #RFC_PARAMETER_DESC::direction for specifying the direction of a function module parameter.
641  */
642 typedef enum _RFC_DIRECTION
643 {
644  RFC_IMPORT = 0x01, ///< Import parameter. This corresponds to ABAP IMPORTING parameter.
645  RFC_EXPORT = 0x02, ///< Export parameter. This corresponds to ABAP EXPORTING parameter.
646  RFC_CHANGING = RFC_IMPORT | RFC_EXPORT, ///< Import and export parameter. This corresponds to ABAP CHANGING parameter.
647  RFC_TABLES = 0x04 | RFC_CHANGING ///< Table parameter. This corresponds to ABAP TABLES parameter.
649 
650 /** \struct _RFC_PARAMETER_DESC
651  * \ingroup repository
652  *
653  * Structure for reading (RfcGetParameterDescByIndex() or RfcGetParameterDescByName())
654  * or defining (RfcAddParameter()) the properties of a parameter in a function module.
655  */
656 typedef struct _RFC_PARAMETER_DESC
657 {
658  RFC_ABAP_NAME name; ///< Parameter name, null-terminated string
659  RFCTYPE type; ///< Parameter data type
660  RFC_DIRECTION direction; ///< Specifies whether the parameter is an input, output or bi-directional parameter
661  unsigned nucLength; ///< Parameter length in bytes in a 1-byte-per-SAP_CHAR system
662  unsigned ucLength; ///< Parameter length in bytes in a 2-byte-per-SAP_CHAR system
663  unsigned decimals; ///< Gives the number of decimals in case of a packed number (BCD)
664  RFC_TYPE_DESC_HANDLE typeDescHandle; ///< Handle to the structure definition in case this parameter is a structure or table
665  RFC_PARAMETER_DEFVALUE defaultValue; ///< Default value as defined in SE37
666  RFC_PARAMETER_TEXT parameterText; ///< Description text of the parameter as defined in SE37. Null-terminated string.
667  RFC_BYTE optional; ///< Specifies whether this parameter is defined as optional in SE37. 1 is optional, 0 non-optional
668  void* extendedDescription; ///< This field can be used by the application programmer (i.e. you) to store arbitrary extra information.
670 
671 /** \struct _RFC_EXCEPTION_DESC
672  * \ingroup repository
673  *
674  * Structure for reading (RfcGetExceptionDescByIndex() or RfcGetExceptionDescByName())
675  * or defining (RfcAddException()) the properties of an exception key in a function module.
676  */
677 typedef struct _RFC_EXCEPTION_DESC
678 {
679  SAP_UC key[128]; ///< Exception key
680  SAP_UC message[512]; ///< Error message (exception text as defined in SE37)
682 
683 
684 /** \enum _RFC_CLASS_ATTRIBUTE_TYPE
685  * \ingroup repository
686  *
687  * Determines the type of an ABAP Object attribute.
688  */
690  RFC_CLASS_ATTRIBUTE_INSTANCE, ///< Instance attribute (object member)
691  RFC_CLASS_ATTRIBUTE_CLASS, ///< Class attribute (global)
694 
695 typedef RFC_CHAR RFC_CLASS_ATTRIBUTE_DEFVALUE[30+1]; ///< Default value of a function module parameter. (null-terminated)
696 typedef RFC_CHAR RFC_CLASS_NAME[30+1]; ///< Default value of a function module parameter. (null-terminated)
697 typedef RFC_CHAR RFC_CLASS_ATTRIBUTE_DESCRIPTION[511+1]; ///< Default value of a function module parameter. (null-terminated)
698 
699 /** \struct _RFC_CLASS_ATTRIBUTE_DESC
700  * \ingroup repository
701  *
702  * Structure for reading (RfcGetParameterDescByIndex() or RfcGetParameterDescByName())
703  * or defining (RfcAddParameter()) the properties of a parameter in a function module.
704  */
706 {
707  RFC_ABAP_NAME name; ///< Attribute name, null-terminated string
708  RFCTYPE type; ///< Attribute data type
709  unsigned nucLength; ///< Attribute length in bytes in a 1-byte-per-SAP_CHAR system
710  unsigned ucLength; ///< Attribute length in bytes in a 2-byte-per-SAP_CHAR system
711  unsigned decimals; ///< Gives the number of decimals in case this attribute is a packed number (BCD)
712  RFC_TYPE_DESC_HANDLE typeDescHandle; ///< Handle to the structure definition in case this attribute is a structure or table
713  RFC_CLASS_ATTRIBUTE_DEFVALUE defaultValue; ///< Default value as defined in SE37
714  RFC_CLASS_NAME declaringClass; ///< Declaring class
715  RFC_CLASS_ATTRIBUTE_DESCRIPTION description; ///< Attribute description, null terminated, may be null
716  unsigned isReadOnly; ///< This attribute is read only if isReadOnly != 0
717  RFC_CLASS_ATTRIBUTE_TYPE attributeType; ///< The attribute type tells you, whether this attribute is an instance attribute, a class attribute or a constant.
718  void* extendedDescription; ///< This field can be used by the application programmer (i.e. you) to store arbitrary extra information.
720 
721 
722 #ifdef __cplusplus
723 extern "C"
724 {
725 #endif
731 
732  typedef RFC_RC (SAP_API* RFC_FUNC_DESC_CALLBACK)(SAP_UC const *functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle);
733  typedef RFC_RC (SAP_API* RFC_PM_CALLBACK)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *functionName, SAP_RAW *eppBuffer, size_t eppBufferSize, size_t *eppLength);
734 
739  typedef RFC_RC (SAP_API* RFC_ON_GET_UNIT_STATE)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier, RFC_UNIT_STATE* unitState);
740  typedef RFC_RC (SAP_API* RFC_ON_PASSWORD_CHANGE)(SAP_UC const *sysId, SAP_UC const *user, SAP_UC const *client,
741  SAP_UC *password, unsigned passwordLength,
742  SAP_UC *newPassword, unsigned newPasswordLength,
743  RFC_ERROR_INFO* cause);
745  typedef RFC_RC (SAP_API* RFC_ON_AUTHENTICATION_CHECK)(RFC_ATTRIBUTES rfcAttributes, RFC_AUTHENTICATION_HANDLE authenticationHandle, RFC_ERROR_INFO* errorInfo);
746 
747  /* ***********************************************************************/
748  /* */
749  /* General API & Utilities */
750  /* */
751  /* ***********************************************************************/
752 
753  /**
754  * \brief Initialization of internal variables
755  * \ingroup general
756  *
757  * Obsolete.
758  * %RfcInit() no longer needs to be called explicitly. The RFC library does
759  * this automatically on DLL load.
760  * \return RFC_RC
761  */
762  DECL_EXP RFC_RC SAP_API RfcInit(void);
763 
764  /**
765  * \brief Freeing of internal variables
766  * \ingroup general
767  *
768  * Obsolete.
769  * The RFC library does this automatically on DLL unload.
770  * \return RFC_RC
771  */
772  DECL_EXP RFC_RC SAP_API RfcCleanup(void);
773 
774  /**
775  * \brief Get information about currently loaded sapnwrfc library.
776  * \ingroup general
777  *
778  * Fills the provided unsigneds with the SAP release values, e.g. *majorVersion = 7500,
779  * *minorVersion = 0, *patchLevel = 44.
780  * \out *majorVersion
781  * \out *minorVersion
782  * \out *patchLevel
783  * \return Version information in string format.
784  * \warning Don't free the returned SAP_UC pointer, it's static memory...
785  */
786  DECL_EXP const SAP_UC* SAP_API RfcGetVersion(unsigned* majorVersion, unsigned* minorVersion, unsigned* patchLevel);
787 
788  /**
789  * \brief This function is intended to be used by SAP Make-factory only. Please DO NOT use it!
790  * \ingroup general
791  */
792  DECL_EXP RFC_RC SAP_API RfcGetVersionInternal(void);
793 
794  /**
795  * \brief Sets the directory in which to search for the sapnwrfc.ini file.
796  * \ingroup general
797  *
798  * By default the sapnwrfc library searches for the sapnwrfc.ini in the current
799  * working directory of the process. If you want to keep it in a different directory,
800  * use this function to tell the sapnwrfc library about the new path.
801  * \note After you have changed the directory, the NW RFC lib automatically loads
802  * the contents of the new sapnwrfc.ini file from that directory.
803  *
804  * \in *pathName The full (absolute) path of the directory, in which the sapnwrfc
805  * library should look for the sapnwrfc.ini file. A path relative to the current
806  * working directory of the process also works.
807  * \out *errorInfo Detail information in case anything goes wrong.
808  * \return RFC_RC
809  */
810  DECL_EXP RFC_RC SAP_API RfcSetIniPath(const SAP_UC* pathName, RFC_ERROR_INFO* errorInfo);
811 
812  /**
813  * \brief Reloads the contents of the sapnwrfc.ini file into memory.
814  * \ingroup general
815  *
816  * Searches the directory given by RfcSetIniPath() (or the current working directory)
817  * for the file sapnwrfc.ini and loads its contents into memory. Reloading the sapnwrfc.ini
818  * file is only necessary after the file has been manually edited
819  * If you want to use a sapnwrfc.ini file in a different location, consider using %RfcSetIniPath().
820  *
821  * Note: If a file with the name sapnwrfc.ini does not exist in the given directory, this is not
822  * considered an error! Default settings are used in this case.
823  *
824  * \out *errorInfo Detail information in case anything goes wrong.
825  * \return RFC_RC
826  */
827  DECL_EXP RFC_RC SAP_API RfcReloadIniFile(RFC_ERROR_INFO* errorInfo);
828 
829  /**
830  * \brief Sets the current trace level of the specified RFC connection or destination to the new value.
831  * \ingroup general
832  *
833  * \note If both of connection and destination are NULL, this function sets the "global"
834  * trace level. See below.
835  * \in connection A handle to a currently open RFC connection (client or server connection).
836  * The new trace level will be effective immediately.
837  * \in *destination Null-terminated string specifying a client or server destination as defined
838  * via a DEST=... entry in sapnwrfc.ini. The new trace level will be used for new connections
839  * to that destination opened after the %RfcSetTraceLevel() call. Already existing connections to
840  * that destination will not be effected.
841  * \in traceLevel The new trace level. Must be between 0 and 4. The meaning of those four values
842  * is as follows:
843  * - 0: Off. Only severe errors are logged to the dev_rfc.trc file.
844  * - 1: Brief. All API calls (except for the setter and getter functions) and important attributes
845  * like codepages, RFC headers, logon parameters are traced. Trace is written to a file named
846  * rfc&lt;pid&gt;.trc or rfc&lt;pid&gt;_&lt;tid&gt;.trc, depending on whether tracing is done
847  * on a "per-process" basis or a "per-thread" basis. &lt;pid&gt; is the current process ID,
848  * &lt;tid&gt; the current thread ID.
849  * - 2: Verbose. In addition to 1, the values of the "scalar" RFC parameters as well as the contents
850  * of the network containers are traced. Scalar parameters are primitive types (CHAR, INT, FLOAT, etc)
851  * and flat structures.
852  * - 3: Detailed. In addition to 2 the contents of nested structures and tables and hexdumps
853  * - 4: Full. In addition to 3 all API calls of setter and getter functions and table operations
854  * are traced.
855  * \out *errorInfo Detail information in case the specified connection or destination does not exist.
856  * \return RFC_OK, RFC_INVALID_HANDLE or RFC_INVALID_PARAMETER
857  *
858  * \note In general RFC trace can be activated/deactivated in 6 different ways:
859  * - By setting the parameter RFC_TRACE=[0|1|2|3|4] in the DEFAULT section of the sapnwrfc.ini file.
860  * This value applies to all destinations, for which no explicit trace level has been set.
861  * ("Global" trace level.)
862  * - By setting the parameter TRACE=[0|1|2|3|4] in a specific destination section of sapnwrfc.ini.
863  * it applies to that destination only and overrules the "global" trace level from the DEFAULT section.
864  * - By setting the environment variable RFC_TRACE=[0|1|2|3|4]. This overrules the setting from the
865  * DEFAULT section of sapnwrfc.ini.
866  * - Via %RfcSetTraceLevel(). If connection and destination are NULL, this function sets the global
867  * trace level and overrules the value from the DEFAULT section of sapnwrfc.ini as well as the environment
868  * variable RFC_TRACE. If connection is non-NULL, it sets the trace level for the current connection only,
869  * and if destination is non-NULL, it sets the trace level for that destination, overruling the value from
870  * this destination's section in the sapnwrfc.ini file.
871  * - By passing a {name=TRACE, value=[0|1|2|3|4]} pair in the RFC_CONNECTION_PARAMETER array used in
872  * RfcOpenConnection(), RfcRegisterServer() or RfcStartServer(). If that RFC_CONNECTION_PARAMETER array
873  * also contains a {name=DEST, value=...} pair, the trace parameter from the array overrules the value
874  * from this destination's sapnwrfc.ini section.
875  * - In case the program is a server program: by activating the trace flag for the corresponding destination
876  * in SM59. The trace setting on backend side is then "inherited" by the external side.
877  *
878  * \note For more information on trace settings see the sample sapnwrfc.ini file contained in the demo folder.
879  */
880  DECL_EXP RFC_RC SAP_API RfcSetTraceLevel(RFC_CONNECTION_HANDLE connection, SAP_UC* destination, unsigned traceLevel, RFC_ERROR_INFO* errorInfo);
881 
882 
883  /**
884  * \brief Changes the character encoding to be used in trace files.
885  * \ingroup general
886  *
887  * This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_ENCODING.
888  * See the documentation of that parameter in the sample ini file contained in the
889  * /demo directory of the NW RFC SDK.
890  *
891  * \note This API call affects only new trace files that will be opened after the call.
892  * The character encoding of already existing trace files is not changed in order to
893  * prevent confusion and garbage data...
894  *
895  *
896  * \in *traceEncoding The new encoding. Possible values are "UTF-16", "UTF-8" and
897  * "DEFAULT". On Windows UTF-16 is recommended for faster performance. "DEFAULT" corresponds
898  * to the operating system's default character encoding, which is CP1252 or ISO-8859-1 on
899  * most Windows systems and UTF-8 on most Linux systems.
900  * \out *errorInfo Detail information in case of an invalid traceEncoding input.
901  * \return RFC_RC
902  */
903  DECL_EXP RFC_RC SAP_API RfcSetTraceEncoding(SAP_UC* traceEncoding, RFC_ERROR_INFO* errorInfo);
904 
905 
906  /**
907  * \brief Changes the directory where the NW RFC lib should write trace files.
908  * \ingroup general
909  *
910  * This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_DIR.
911  * See the documentation of that parameter in the sample ini file contained in the
912  * /demo directory of the NW RFC SDK.
913  *
914  * \note This API call affects only new trace files that will be opened after the call.
915  * The directory of already existing trace files is not changed in order to
916  * prevent confusion and garbage data...
917  *
918  *
919  * \in *traceDir The new directory. Can be an absolute or relative path name.
920  * The directory needs to exist prior to calling this API. The NW RFC lib will not
921  * attempt to create non-existing directories.
922  * \out *errorInfo Detail information in case of an invalid traceEncoding input.
923  * \return RFC_RC
924  */
925  DECL_EXP RFC_RC SAP_API RfcSetTraceDir(SAP_UC* traceDir, RFC_ERROR_INFO* errorInfo);
926 
927 
928  /**
929  * \brief Changes the way the NW RFC lib writes trace files.
930  * \ingroup general
931  *
932  * This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_TYPE.
933  * See the documentation of that parameter in the sample ini file contained in the
934  * /demo directory of the NW RFC SDK.
935  *
936  * \note This API call closes currently open trace files and then changes to
937  * "one file per process" or one "file per thread".
938  * If the NW RFC lib is already using the given trace type, it does nothing.
939  *
940  *
941  * \in *traceType Must be either "PROCESS" or "THREAD".
942  * \out *errorInfo Detail information in case of an invalid traceEncoding input.
943  * \return RFC_RC
944  */
945  DECL_EXP RFC_RC SAP_API RfcSetTraceType(SAP_UC* traceType, RFC_ERROR_INFO* errorInfo);
946 
947 
948  /**
949  * \brief Sets the global CPIC trace level used by the underlying CPIC libabry to write CPIC tracing information
950  * to the CPIC trace file cpic_<pid>.trc, where pid is the process ID of the current process. The CPIC trace file
951  * is located in the same directory where the RFC trace files are located.
952  * \ingroup general
953  *
954  * This function has the same effect as the sapnwrfc.ini parameter CPIC_TRACE_LEVEL.
955  * See the documentation of that parameter in the sample ini file contained in the
956  * /demo directory of the NW RFC SDK.
957  *
958  * \in traceLevel Must be a value between 0 to 3, where 0 turns tracing off.
959  * \out *errorInfo Detail information in case of an error.
960  * \return RFC_RC
961  */
962  DECL_EXP RFC_RC SAP_API RfcSetCpicTraceLevel(unsigned traceLevel, RFC_ERROR_INFO* errorInfo);
963 
964 
965  /**
966  * \brief Activates the CPIC keepalive
967  *
968  * \in timeout Must be a value between 10 and 3600, where 0 turns the cpic keepalive off.
969  * \out *errorInfo Detail information in case of an error.
970  * \return RFC_RC
971  */
972  DECL_EXP RFC_RC SAP_API RfcSetCpicKeepalive(unsigned timeout, RFC_ERROR_INFO* errorInfo);
973 
974  /**
975  * \brief Sets the global Websocket trace level used by the underlying NI libabry to write tracing information
976  * to the trace file ws_rfc_<pid>.trc, where pid is the process ID of the current process. The NI trace file
977  * is located in the same directory where the RFC trace files are located.
978  * \ingroup general
979  *
980  * This function has the same effect as the sapnwrfc.ini parameter RFC_SOCKET_TRACE.
981  * See the documentation of that parameter in the sample ini file contained in the
982  * /demo directory of the NW RFC SDK.
983  * Nevertheless this API cannot set a trace level below the global socket trace level set by environment variable
984  * or the ini file.
985  *
986  * \in traceLevel Must be a value between 0 to 3, where 0 turns tracing off.
987  * \out *errorInfo Detail information in case of an error.
988  * \return RFC_RC
989  */
990  DECL_EXP RFC_RC SAP_API RfcSetSocketTraceLevel(unsigned traceLevel, RFC_ERROR_INFO* errorInfo);
991 
992 
993  /**
994  * \brief Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
995  * \ingroup general
996  *
997  * The parameter pathToLibrary needs also to contain the name of the library.
998  * This function has the same effect as the sapnwrfc.ini parameter TLS_SAPCRYPTOLIB.
999  * This API cannot reset a new path to the library during runtime. Once set, the path is definitive.
1000  *
1001  * \in *pathToLibrary Absolute path to library (.so or .dll).
1002  * \out *errorInfo Detail information in case of an error.
1003  * \return RFC_RC
1004  */
1005  DECL_EXP RFC_RC SAP_API RfcLoadCryptoLibrary(const SAP_UC* const pathToLibrary, RFC_ERROR_INFO* errorInfo);
1006  /**
1007  * \brief Sets the global idle time interval of a Websocket server connection in seconds after which
1008  * a keep alive Websocket ping packet is sent.
1009  * \ingroup general
1010  *
1011  * This function has the same effect as the sapnwrfc.ini parameter RFC_WEBSOCKET_PING_INTERVAL.
1012  * The default value is 300; valid values are 0 [off] and a range from 10 [ten seconds] to 86400 [one day].
1013  *
1014  * \in pingInterval Interval in seconds.
1015  * \out *errorInfo Detail information in case of an error.
1016  * \return RFC_RC
1017  */
1018  DECL_EXP RFC_RC SAP_API RfcSetWebsocketPingInterval(unsigned pingInterval, RFC_ERROR_INFO* errorInfo);
1019 
1020  /**
1021  * \brief Sets the global timeout for a WebSocket keep alive ping reply packet in seconds.
1022  * \ingroup general
1023  *
1024  * This function has the same effect as the sapnwrfc.ini parameter RFC_WEBSOCKET_PONG_TIMEOUT.
1025  * If no such so-called pong packet is received from the communication partner as a reply to a previously sent
1026  * WebSocket keep alive ping packet within this timeout period, the connection is considered as broken and will be closed.
1027  * The default value is 60; valid values are 0 [off] and a range from 10 [ten seconds] to 3600 [one hour].
1028  * The timeout value should be set lower than the ping interval of the server, so only one ping is active at a time.
1029  *
1030  * \in pongTimeout Timeout in seconds.
1031  * \out *errorInfo Detail information in case of an error.
1032  * \return RFC_RC
1033  */
1034  DECL_EXP RFC_RC SAP_API RfcSetWebsocketPongTimeout(unsigned pongTimeout, RFC_ERROR_INFO* errorInfo);
1035 
1036  /**
1037  * \brief Sets the maximum size of the trace file, after which the current file is closed and "rolled over" to a new file.
1038  * \ingroup general
1039  *
1040  * This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_MAX_FILE_SIZE. By default
1041  * two files of a maximum of 512 MB are stored.
1042  * However this function cannot set the size below a minimum value of 20 MB or the value set by RFC_TRACE_MAX_FILE_SIZE
1043  * from the sapnwrfc.ini.
1044  * As unit of measure you can use "M" for Megabytes or "G" for Gigabytes, for example 1024 and M.
1045  *
1046  * \in size Size in specified unit
1047  * \in unit Unit of measurement
1048  * \out *errorInfo Detail information in case of an error.
1049  * \return RFC_RC
1050  */
1051  DECL_EXP RFC_RC SAP_API RfcSetMaximumTraceFileSize(unsigned size, SAP_UC unit, RFC_ERROR_INFO* errorInfo);
1052 
1053  /**
1054  * \brief Sets the maximum size of stored old trace files, after which the current file is closed and "rolled over" to a new file.
1055  * \ingroup general
1056  *
1057  * This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_MAX_STORED_FILES.
1058  * An additional "roll" to a new file after the maximum is reached, triggers a deletion of the oldest file.
1059  * The old stored files are marked with the opening timestamp in the file name, when a "roll over" is done.
1060  * By default two files are stored. The current trace file is not yet marked with the time stamp.
1061  * However this function cannot set the size to zero, (it will result in an error,) or to a value lower than the one set
1062  * by RFC_TRACE_MAX_STORED_FILES from the sapnwrfc.ini.
1063  * By setting this value to -1, the limit is disabled and and an infinite amount of concurrent files can
1064  * be kept, i.e. no files will be deleted by the NW RFC library.
1065  * \warning Attention: Lowering the value might delete some old files, if there are currently more stored
1066  * files than permitted by the new (lower) value.
1067  *
1068  * \in numberOfFiles Maximum size of stored old trace
1069  * \out *errorInfo Detail information in case of an error.
1070  * \return RFC_RC
1071  */
1072  DECL_EXP RFC_RC SAP_API RfcSetMaximumStoredTraceFiles(int numberOfFiles, RFC_ERROR_INFO* errorInfo);
1073 
1074  /**
1075  * \brief Converts data in UTF-8 format to SAP_UC strings.
1076  * \ingroup general
1077  *
1078  * \in *utf8 Pointer to UTF-8 data to be converted
1079  * \in utf8Length Number of bytes to convert
1080  * \out *sapuc Pre-allocated output buffer, which will receive the result. Output will be null-terminated.
1081  * \inout *sapucSize Needs to be filled with the size of the given output buffer in SAP_UC characters.
1082  * If the given buffer turns out to be too small (return code RFC_BUFFER_TOO_SMALL), it will be filled
1083  * with the required buffer size that would be necessary to convert the given input data.
1084  * \out *resultLength If the output buffer was large enough, resultLength will be filled with the
1085  * length of the output string in SAP_UC characters.
1086  * \out *errorInfo Will be filled with additional error information in case of an error.
1087  * \return RFC_RC
1088  */
1089  DECL_EXP RFC_RC SAP_API RfcUTF8ToSAPUC(const RFC_BYTE *utf8, unsigned utf8Length, SAP_UC *sapuc, unsigned *sapucSize, unsigned *resultLength, RFC_ERROR_INFO *errorInfo);
1090 
1091  /**
1092  * \brief Converts data in SAP_UC format to UTF-8 format
1093  * \ingroup general
1094  *
1095  * \in *sapuc Pointer to SAP_UC data to be converted
1096  * \in sapucLength Number of characters to convert
1097  * \out *utf8 Pre-allocated output buffer, which will receive the result. Output will be null-terminated.
1098  * \inout *utf8Size Needs to be filled with the size of the given output buffer in bytes.
1099  * If the given buffer turns out to be too small (return code RFC_BUFFER_TOO_SMALL), it will be filled
1100  * with the required buffer size that would be necessary to convert the given input data.
1101  * \out *resultLength If the output buffer was large enough, resultLength will be filled with the
1102  * length of the output string in bytes.
1103  * \out *errorInfo Will be filled with additional error information in case of an error.
1104  * \return RFC_OK or RFC_BUFFER_TOO_SMALL
1105  */
1106  DECL_EXP RFC_RC SAP_API RfcSAPUCToUTF8(const SAP_UC *sapuc, unsigned sapucLength, RFC_BYTE *utf8, unsigned *utf8Size, unsigned *resultLength, RFC_ERROR_INFO *errorInfo);
1107 
1108  /**
1109  * \brief Converts an RFC_RC return code to a human readable string for logging purposes.
1110  * \ingroup general
1111  *
1112  * \in rc Return code to covert to string
1113  * \return String representation of the return code
1114  * \warning Don't free the returned SAP_UC pointer -- its's static memory...
1115  */
1116  DECL_EXP const SAP_UC* SAP_API RfcGetRcAsString(RFC_RC rc);
1117 
1118  /**
1119  * \brief Converts an RFCTYPE data type indicator to a human readable string for logging purposes.
1120  * \ingroup general
1121  *
1122  * \in type Data type indicator to convert
1123  * \return String representation of the type
1124  * \warning Don't free the returned SAP_UC pointer -- its's static memory...
1125  */
1126  DECL_EXP const SAP_UC* SAP_API RfcGetTypeAsString(RFCTYPE type);
1127 
1128  /**
1129  * \brief Converts an RFC_DIRECTION direction indicator to a human readable string for logging purposes.
1130  * \ingroup general
1131  *
1132  * \in direction Direction indicator to convert
1133  * \return String representation of the direction
1134  * \warning Don't free the returned SAP_UC pointer -- its's static memory...
1135  */
1136  DECL_EXP const SAP_UC* SAP_API RfcGetDirectionAsString(RFC_DIRECTION direction);
1137 
1138  /**
1139  * \brief Converts an RFC_SERVER_STATE state indicator to a human readable string for logging purposes.
1140  * \ingroup general
1141  *
1142  * \in serverState State indicator to convert
1143  * \return String representation of the state
1144  * \warning Don't free the returned SAP_UC pointer -- its's static memory...
1145  */
1146  DECL_EXP const SAP_UC* SAP_API RfcGetServerStateAsString(RFC_SERVER_STATE serverState);
1147 
1148  /**
1149  * \brief Converts an RFC_SESSION_EVENT to a human readable string for logging purposes.
1150  * \ingroup general
1151  *
1152  * \in sessionEvent Session event to convert
1153  * \return String representation of the event
1154  * \warning Don't free the returned SAP_UC pointer -- its's static memory...
1155  */
1156  DECL_EXP const SAP_UC* SAP_API RfcGetSessionEventAsString(RFC_SESSION_EVENT sessionEvent);
1157 
1158  /**
1159  * \brief Converts a 2-char SAP language code to the 1-char SAP language code.
1160  * \ingroup general
1161  *
1162  * \in *laiso Pointer to the 2-char array with SAP LAISO code to convert
1163  * \out *lang Pointer to the 1 char for SAP SPRAS key
1164  * \out *errorInfo Will be filled with additional error information in case of an error.
1165  * \return RFC_RC RFC_OK or RFC_INVALID_PARAMETER in case of an error
1166  * \warning The SAP LAISO code is not 100% ISO639_1 compliant - see also ABAP table T002X columns SPRAS/LAISO for details
1167  */
1168  DECL_EXP RFC_RC SAP_API RfcLanguageIsoToSap (const SAP_UC *laiso, SAP_UC *lang, RFC_ERROR_INFO* errorInfo);
1169 
1170  /**
1171  * \brief Converts a 1-char SAP language key to the 2-char SAP language code.
1172  * \ingroup general
1173  *
1174  * \in *lang Pointer to the 1 char with SAP SPRAS key to convert
1175  * \out *laiso Pointer to the 2-char array for SAP LAISO code
1176  * \out *errorInfo Will be filled with additional error information in case of an error.
1177  * \return RFC_RC RFC_OK or RFC_INVALID_PARAMETER in case of an error
1178  * \warning The SAP LAISO code is not 100% ISO639_1 compliant - see also ABAP table T002X columns SPRAS/LAISO for details
1179  */
1180  DECL_EXP RFC_RC SAP_API RfcLanguageSapToIso (const SAP_UC *lang, SAP_UC *laiso, RFC_ERROR_INFO* errorInfo);
1181 
1182 
1183 
1184  /* ***********************************************************************/
1185  /* */
1186  /* Connection related API */
1187  /* */
1188  /* ***********************************************************************/
1189 
1190  /**
1191  * \brief Returns a list of names of all SAP Systems maintained in SAPLogon (saplogon.ini or SAPUILandscape.xml).
1192  * \ingroup connection
1193  *
1194  * On Windows systems, where SAPLogon is installed, the logon parameters defined in saplogon.ini can be used for opening connections
1195  * to those backend systems. This routine retrieves a list of all available SAP systems. Each key in the list can be used as a value
1196  * for RFC_CONNECTION_PARAMETER.value, where RFC_CONNECTION_PARAMETER.name = "SAPLOGON_ID".
1197  * For more information see the documentation of the SAPLOGON_ID parameter in the sample sapnwrfc.ini file.
1198  *
1199  * If the API returns successfully, you should call RfcFreeSaplogonEntries() with the same inputs, once you no longer need the
1200  * SAPLogon IDs, so that the memory occupied by them can be cleaned up.
1201  *
1202  * Sample code illustrating how to use the SAPLogon IDs: \code
1203  * SAP_UC** logonIDList;
1204  * unsigned numEntries;
1205  * RfcGetSaplogonEntries(&logonIDList, &numEntries, &errorInfo);
1206  *
1207  * if (errorInfo.code == RFC_OK){
1208  * for (unsigned i=0; i<numEntries; ++i) printfU(cU("%s\n"), logonIDList[i]);
1209  * }
1210  * RfcFreeSaplogonEntries(&logonIDList, &numEntries, &errorInfo);
1211  * \endcode
1212  *
1213  * \out ***saplogonIDList Receives a pointer to a SAP_UC* array containing the SAPLogon IDs.
1214  * \out *numSaplogonIDs Will be filled with the number of SAPLogon IDs in the list.
1215  * \out *errorInfo Returns more error details, if the list of saplogon.ini keys could not be retrieved.
1216  * \return RFC_MEMORY_INSUFFICIENT, if unable to malloc memory for the ID list; RFC_NOT_FOUND, if saplogon.ini could not be found on that system or is empty.
1217  */
1218  DECL_EXP RFC_RC SAP_API RfcGetSaplogonEntries(SAP_UC*** saplogonIDList, unsigned* numSaplogonIDs, RFC_ERROR_INFO* errorInfo);
1219 
1220 
1221  /**
1222  * \brief Frees a list of SAPLogon IDs obtained from RfcGetSaplogonEntries().
1223  * \ingroup connection
1224  *
1225  * When you no longer need the SAPLogon IDs obtained from RfcGetSaplogonEntries(), you should call this function with the same
1226  * arguments that got filled by RfcGetSaplogonEntries(). This will free any internal memory occupied by the list of SAPLogon IDs.
1227  *
1228  * \inout ***saplogonIDList Points to an SAP_UC* array that was previously filled by RfcGetSaplogonEntries(). Will be set to NULL.
1229  * \inout *numSaplogonIDs Points to the length of the SAPLogon ID list. Will be set to 0.
1230  * \out *errorInfo Returns more error details, if something goes wrong.
1231  * \return Nothing that can go wrong here really.
1232  */
1233  DECL_EXP RFC_RC SAP_API RfcFreeSaplogonEntries(SAP_UC*** saplogonIDList, unsigned* numSaplogonIDs, RFC_ERROR_INFO* errorInfo);
1234 
1235 
1236  /**
1237  * \brief Retrieves all connection parameters corresponding to the given ID from the saplogon.ini or SAPUILandscape.xml file.
1238  * \ingroup connection
1239  *
1240  * The ID needs to be one of those returned by RfcGetSaplogonEntries(). It is the same as can also be used as connection
1241  * parameter SAPLOGON_ID.
1242  *
1243  * \in *saplogonID A SAPLogon ID uniquely identifying a certain saplogon.ini or SAPUILandscape.xml entry.
1244  * \out **entryParameters Receives a pointer to a RFC_CONNECTION_PARAMETER array containing the parameters of the given SAPLogon ID.
1245  * \out *numParameters Will be filled with the number of connection parameters in the array.
1246  * \out *errorInfo Returns more error details, if something goes wrong, e.g. out of memory or SAPLogon ID cannot be found.
1247  * \return Nothing that can go wrong here really.
1248  */
1249  DECL_EXP RFC_RC SAP_API RfcGetSaplogonEntry(SAP_UC* saplogonID, RFC_CONNECTION_PARAMETER** entryParameters, unsigned* numParameters, RFC_ERROR_INFO* errorInfo);
1250 
1251 
1252  /**
1253  * \brief Frees an array of connection parameters obtained from RfcGetSaplogonEntry().
1254  * \ingroup connection
1255  *
1256  * When you no longer need the connection parameters obtained from RfcGetSaplogonEntries(), you should call this function with the same
1257  * arguments that got filled by RfcGetSaplogonEntry(). This will free any internal memory occupied by the array of parameters.
1258  *
1259  * \inout **entryParameters Points to an RFC_CONNECTION_PARAMETER array that was previously filled by RfcGetSaplogonEntry(). Will be set to NULL.
1260  * \inout *numParameters Points to the length of the connection parameter array. Will be set to 0.
1261  * \out *errorInfo Returns more error details, if something goes wrong.
1262  * \return Nothing that can go wrong here really.
1263  */
1264  DECL_EXP RFC_RC SAP_API RfcFreeSaplogonEntry(RFC_CONNECTION_PARAMETER** entryParameters, unsigned* numParameters, RFC_ERROR_INFO* errorInfo);
1265 
1266 
1267  /**
1268  * \brief Opens an RFC client connection for invoking ABAP function modules in an R/3 backend.
1269  * \ingroup connection
1270  *
1271  * Opens a client connection to an SAP System. The connectionParams may contain the following name-value pairs:
1272  * - client, user, passwd, lang, trace
1273  *
1274  * and additionally one of
1275  * -# Direct application server logon: ashost, sysnr.
1276  * -# Logon with load balancing: mshost, msserv, sysid, group.\n
1277  * msserv is needed only, if the service of the message server is
1278  * not defined as sapms<SYSID> in /etc/services.
1279  *
1280  * When logging on with SNC, user&passwd are to be replaced by
1281  * - snc_qop, snc_myname, snc_partnername and optionally snc_lib.
1282  *
1283  * (If snc_lib is not specified, the underlying SNC layer uses the "global" GSS library
1284  * defined via environment variable SNC_LIB or SNC_LIB_64.)
1285  *
1286  * When logging on with SSO Ticket, you can use mysapsso2 instead of user&passwd.
1287  * The old SSO format (mysapsso) is no longer supported.
1288  *
1289  *
1290  * Alternatively the connection parameters can be defined in the config file
1291  * sapnwrfc.ini. In this case you just pass the parameter dest=... and all
1292  * parameters that are missing in the sapnwrfc.ini entry into %RfcOpenConnection().
1293  *
1294  * For a complete list of logon parameters to be used in connectionParams as well as in the
1295  * sapnwrfc.ini file, see the sample sapnwrfc.ini file in the SDK's demo folder.
1296  *
1297  * If the logon was ok, %RfcOpenConnection() returns a client connection handle, which can be used in RfcInvoke().
1298  * Otherwise the return value is NULL and errorInfo contains a detailed error description.
1299  * errorInfo->code will be one of:
1300  * - RFC_INVALID_PARAMETER One of the connectionParams was invalid
1301  * - RFC_COMMUNICATION_FAILURE Something is wrong with the network or network settings
1302  * - RFC_LOGON_FAILURE Invalid user/password/ticket/certificate
1303  * - RFC_ABAP_RUNTIME_FAILURE Something is wrong with the R/3 backend
1304  * - RFC_MEMORY_INSUFFICIENT A malloc failed when trying to allocate a temporary buffer
1305  *
1306  *
1307  * \in *connectionParams An array of RFC_CONNECTION_PARAMETERs with the names as described above
1308  * and the values as necessary in your landscape.
1309  * \in paramCount Number of parameters in the above array.
1310  * \out *errorInfo Returns more error details, if the connect attempt fails.
1311  * \return A handle to an RFC client connection that can be used for invoking ABAP function modules in the backend.
1312  */
1313  DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcOpenConnection(RFC_CONNECTION_PARAMETER const * connectionParams, unsigned paramCount, RFC_ERROR_INFO* errorInfo);
1314 
1315  /** \brief Registers a server connection at an SAP gateway.
1316  * \ingroup connection
1317  *
1318  * The connectionParams may contain the following name-value pairs:
1319  * - gwhost, gwserv, program_id, trace, and the parameters for SNC communication as in RfcOpenConnection().
1320  *
1321  * Program_id corresponds to an RFC destination in SM59 of type "T" in registration mode.
1322  *
1323  * For a complete list of logon parameters to be used in connectionParams as well as in the
1324  * sapnwrfc.ini file, see the sample sapnwrfc.ini file in the SDK's demo folder.
1325  *
1326  * If the connection registration was ok, %RfcRegisterServer() returns a server connection handle, which can
1327  * be used in RfcListenAndDispatch().
1328  * Otherwise the return value is NULL and errorInfo contains information similar to the RfcOpenConnection() case.
1329  *
1330  *
1331  * \in *connectionParams An array of RFC_CONNECTION_PARAMETERs with the names as described above
1332  * and the values as necessary in your landscape.
1333  * \in paramCount Number of parameters in the above array.
1334  * \out *errorInfo Returns more error details, if the connect attempt fails.
1335  * \return A handle to an RFC server connection that can be used for listening for function module requests from the backend.
1336  */
1337  DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcRegisterServer(RFC_CONNECTION_PARAMETER const * connectionParams, unsigned paramCount, RFC_ERROR_INFO* errorInfo);
1338 
1339  /** \brief Allows a program to be used as an RFC server which is started by the backend on demand.
1340  * \ingroup connection
1341  *
1342  * This API needs to be called, if the server program is to be started by the R/3 application server.
1343  * (RFC destination in SM59 of type "T" in startup mode.)
1344  * argc and argv are the inputs of the mainU function. The R/3 application server passes the correct command line to
1345  * the program, when starting it up, so you only need to forward these two parameters to %RfcStartServer().
1346  * connectionParams is optional and is only needed, if you want to add additional logon parameters to the
1347  * ones coming from the command line, e.g for activating trace.
1348  *
1349  * Like RfcRegisterServer(), the function returns a server connection handle that can be used in RfcListenAndDispatch().
1350  * The mechanism of this kind of RFC destination thus works as follows:
1351  * -# The R/3 application server opens a telnet connection to the host, where your server program is located, and
1352  * starts the program with the necessary logon parameters. (Or creates a child process, if the startup
1353  * method is "Start on application server".)
1354  * -# Your server program calls RfcStartServer, which opens an RFC connection back to the R/3 system.
1355  * -# The R/3 system then makes the function call over that RFC connection.
1356  *
1357  * The main differences of "startup mode" compared to the "registration mode" are:
1358  * - Advantage: no logon parameters need to be maintained in the server program. (Unless you want to open
1359  * an additional client connection for looking up function module metadata (RFC_FUNCTION_DESC_HANDLEs) in the
1360  * R/3 DDIC.)
1361  * - Disadvantage: every single function call creates a new process and possibly a remote shell connection in addition to
1362  * the actual RFC connection.
1363  *
1364  *
1365  * \in argc From mainU() (command line supplied by backend)
1366  * \in **argv From mainU() (command line supplied by backend)
1367  * \in *connectionParams May optionally contain additional logon parameters
1368  * \in paramCount Length of the connection parameter array above
1369  * \out *errorInfo Returns more error details, if the connect attempt fails.
1370  * \return A handle to an RFC server connection that can be used for listening for function module requests from the backend.
1371  */
1372  DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcStartServer(int argc, SAP_UC **argv, RFC_CONNECTION_PARAMETER const * connectionParams, unsigned paramCount, RFC_ERROR_INFO* errorInfo);
1373 
1374  /** \brief Closes an RFC connection
1375  * \ingroup connection
1376  *
1377  * Can be used to close client connections as well as server connections, when they are no longer needed.
1378  *
1379  *
1380  * \in rfcHandle Connection to be closed
1381  * \out *errorInfo Error details in case closing the connection fails. (Can usually be ignored...)
1382  * \return RFC_RC
1383  */
1384  DECL_EXP RFC_RC SAP_API RfcCloseConnection(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* errorInfo);
1385 
1386  /** \brief Checks an RFC connection
1387  * \ingroup connection
1388  *
1389  * Can be used to check whether a client/server connection has already been closed,
1390  * or whether the NW RFC library still "considers" the connection to be open.
1391  * Note that this does not guarantee that the connection is indeed still alive:
1392  * A firewall may silently have closed the connection without notifying the endpoints.
1393  * If you want to find out, whether the connection is still alive, you'll have to
1394  * use the more expensive RfcPing().
1395  *
1396  *
1397  * \in rfcHandle Connection to be checked
1398  * \out *isValid 1, if the connection is still found in the internal connection management, 0 otherwise.
1399  * \out *errorInfo Error details in case the connection is invalid.
1400  * \return RFC_RC
1401  */
1402  DECL_EXP RFC_RC SAP_API RfcIsConnectionHandleValid(RFC_CONNECTION_HANDLE rfcHandle, int* isValid, RFC_ERROR_INFO *errorInfo);
1403 
1404  /** \brief Cancels the RFC call which is currently being called over the given RFC connection and closes the connection
1405  * \ingroup connection
1406  *
1407  * Can be used only on an RFC client connection and needs to be called from a different thread than the one currently executing the RFC call.
1408  *
1409  *
1410  * \in rfcHandle RFC client connection which is currently blocked in RfcInvoke().
1411  * \out *errorInfo Error details in case canceling fails. (Can usually be ignored...)
1412  * \return RFC_OK, if cancel was requested; RFC_ILLEGAL_STATE, if the connection is currently not in a call; or RFC_NOT_SUPPORTED, if the handle is a server handle.
1413  */
1414  DECL_EXP RFC_RC SAP_API RfcCancel(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* errorInfo);
1415 
1416  /** \brief RFC_RC SAP_API RfcResetServerContext
1417  * \ingroup connection
1418  *
1419  * Resets the SAP server context ("user context / ABAP session context") associated with the given client
1420  * connection, but does not close the connection.
1421  *
1422  *
1423  * \in rfcHandle The client connection, whose server context is to be reset.
1424  * \out *errorInfo Error details in case resetting the server context fails. (Better close the connection in that case.)
1425  * \return RFC_RC
1426  */
1428 
1429  /** \brief Ping the remote communication partner through the passed connection handle.
1430  * \ingroup connection
1431  *
1432  * Sends a ping to the backend in order to check, whether the connection is still alive.
1433  * Can be used on both, client connections as well as server connections.
1434  * \warning Do not use inside a server function implementation.
1435  *
1436  *
1437  * \in rfcHandle The connection to check
1438  * \out *errorInfo More error details in case the connection is broken.
1439  * \return RFC_RC
1440  */
1441  DECL_EXP RFC_RC SAP_API RfcPing(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* errorInfo);
1442 
1443  /** \brief Returns details about the current client or server connection.
1444  * \ingroup connection
1445  *
1446  * Consider that in case you are a server and call RfcListenAndDispatch(), the partner fields
1447  * of the attributes will be cleared. The reason is, although we might be only connected to a
1448  * gateway of one application server, the function module can be also called from the other
1449  * application servers of the system if configured accordingly in the SM59 destination.
1450  *
1451  * I.e. expect only valid partner information from within a function module. Outside of the
1452  * function module, e.g. in the loop where RfcListenAndDispatch is called, you will get
1453  * cleared partner information in most of the cases except case RFC_OK, which means that you
1454  * were just called by an application server.
1455  *
1456  * See documentation of RFC_ATTRIBUTES.
1457  *
1458  *
1459  * \in rfcHandle RFC connection
1460  * \out *attr Information about the current connection and the communication partner on the other side.
1461  * \out *errorInfo Additional error information (e.g. connection already closed).
1462  * \return RFC_RC
1463  */
1465 
1466  /** \brief Inside a server function, returns details about the current execution context.
1467  * \ingroup connection
1468  *
1469  * See documentation of RFC_SERVER_CONTEXT.
1470  *
1471  *
1472  * \in rfcHandle RFC server connection
1473  * \out *context Information about the current server execution context.
1474  * \out *errorInfo Additional error information (e.g. connection is not a server connection).
1475  * \return RFC_RC
1476  */
1478 
1479  /** \brief Gets the SAPRouter, if any.
1480  * \ingroup connection
1481  *
1482  *
1483  * \in rfcHandle RFC connection
1484  * \out *sapRouter Pre-allocated buffer
1485  * \inout *length Needs to be filled with the buffer length of sapRouter. The return value will be the string
1486  * length of the returned sapRouter (if buffer was large enough) or the required buffer size (if RFC_BUFFER_TOO_SMALL).
1487  * In the first case, the length value will be the string length without the terminating zero, in the second case it will be the
1488  * required buffer size including the terminating zero.
1489  * \out *errorInfo More error details in case something goes wrong.
1490  * \return RFC_BUFFER_TOO_SMALL, if the provided sapRouter buffer was too small. RFC_OK otherwise.
1491  */
1492  DECL_EXP RFC_RC SAP_API RfcGetSapRouter(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *sapRouter, unsigned *length, RFC_ERROR_INFO* errorInfo);
1493 
1494  /** \brief Gets the external IP address of the communication partner.
1495  * \ingroup connection
1496  *
1497  * In scenarios where NAT (Network Address Translation) is performed between the LAN segment, where the external RFC program is
1498  * running, and the LAN segment, where the backend system is running, the RFC_ATTRIBUTES (members "partnerHost", "partnerIP" or "partnerIPv6")
1499  * will always contain the hostname/address returned by the backend system, which is the address as it is known inside the internal LAN segment.
1500  * However, this address is usually unusable/invalid inside the external LAN segment. External programs that need a valid "external" IP address
1501  * of the current communication partner, can use this API to obtain it.
1502  * If no NAT is used in the current scenario, the value returned by this API will be equal to partnerIP/partnerIPv6 from the RFC_ATTRIBUTES.
1503  *
1504  *
1505  * \in rfcHandle RFC connection
1506  * \out *partnerExternalIP Pre-allocated buffer
1507  * \inout *length Needs to be filled with the buffer length of partnerExternalIP. The return value will be the string
1508  * length of the returned external IP (if buffer was large enough) or the required buffer size (if RFC_BUFFER_TOO_SMALL).
1509  * In the first case, the length value will be the string length without the terminating zero, in the second case it will be the
1510  * required buffer size including the terminating zero.
1511  * \out *errorInfo More error details in case something goes wrong.
1512  * \return RFC_BUFFER_TOO_SMALL, if the provided partnerExternalIP buffer was too small.
1513  * RFC_INVALID_HANDLE, if the given rfcHandle is not connected.
1514  * RFC_INVALID_PARAMETER, if one of the input values is invalid.
1515  * RFC_OK otherwise.
1516  */
1517  DECL_EXP RFC_RC SAP_API RfcGetPartnerExternalIP(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *partnerExternalIP, unsigned *length, RFC_ERROR_INFO* errorInfo);
1518 
1519  /** \brief Gets the IP address of the local network interface used by this connection.
1520  * \ingroup connection
1521  *
1522  * On servers with multiple network interfaces, it may be useful to know, via which interface the current connection has been established.
1523  *
1524  *
1525  * \in rfcHandle RFC connection
1526  * \out *localAddress Pre-allocated buffer. If you use a buffer of length at least 46, it will always be sufficient,
1527  * even in case of IPv6 addresses.
1528  * \inout *length Needs to be filled with the buffer length of partnerExternalIP. The return value will be the string
1529  * length of the returned external IP (if buffer was large enough) or the required buffer size (if RFC_BUFFER_TOO_SMALL).
1530  * In the first case, the length value will be the string length without the terminating zero, in the second case it will be the
1531  * required buffer size including the terminating zero.
1532  * \out *localPort The local port used for the network connection.
1533  * \out *errorInfo More error details in case something goes wrong.
1534  * \return RFC_BUFFER_TOO_SMALL, if the provided partnerExternalIP buffer was too small.
1535  * RFC_INVALID_HANDLE, if the given rfcHandle is not connected.
1536  * RFC_INVALID_PARAMETER, if one of the input values is invalid.
1537  * RFC_EXTERNAL_FAILURE, if a network level error occurs.
1538  * RFC_OK otherwise.
1539  */
1540  DECL_EXP RFC_RC SAP_API RfcGetLocalAddress(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC* localAddress, unsigned* length, unsigned* localPort, RFC_ERROR_INFO* errorInfo);
1541 
1542  /** \brief Gets the partner's SSO2 ticket, if any.
1543  * \ingroup connection
1544  *
1545  * Can be used in two cases: call it inside the implementation of a server function and pass the server connection as rfcHandle,
1546  * if you want to obtain the ticket sent from the ABAP side. For this to work, one of the flags "Send Logon Ticket" or "Send
1547  * Assertion Ticket" (or similar) needs to be activated in the definition of the corresponding RFC destination in SM59.
1548  * Or call it after RfcOpenConnection() and pass the client connection as rfcHandle, to obtain the ticket issued for the currrently
1549  * logged in user. For this to work, the connection must be opened with parameter GETSSO2=1 and the profile parameter
1550  * login/create_sso2_ticket must be set to a value different from "0" in the backend.
1551  *
1552  *
1553  * \in rfcHandle RFC server connection
1554  * \out *ssoTicket Pre-allocated buffer, which will receive the backend user's SSO2 ticket (signed user information in base64 format)
1555  * \inout *length Needs to be filled with the buffer length of ssoTicket. The return value will be the string
1556  * length of the returned ticket (if buffer was large enough) or the required buffer size (if RFC_BUFFER_TOO_SMALL).
1557  * In the first case, the length value will be the string length without the terminating zero, in the second case it will be the
1558  * required buffer size including the terminating zero.
1559  * \out *errorInfo More error details in case there is no ticket.
1560  * \return RFC_RC
1561  * \warning
1562  */
1563  DECL_EXP RFC_RC SAP_API RfcGetPartnerSSOTicket(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *ssoTicket, unsigned *length, RFC_ERROR_INFO* errorInfo);
1564 
1565  /** \brief Gets the partner's SNC name, if any.
1566  * \ingroup connection
1567  *
1568  *
1569  * \in rfcHandle RFC server connection. If this function is executed on a client connection, RFC_ILLEGAL_STATE will be returned.
1570  * \out *sncName Pre-allocated buffer, which will receive the backend user's SNC name (null-terminated string).
1571  * \in length Size of the pre-allocated buffer. This information is coming from the GSS library, therefore
1572  * unfortunately the feature of assigning the used/required length to an output parameter is not possible in this case.
1573  * The maximum length of an SNC name is 256.
1574  * \out *errorInfo More error details in case SNC is not active.
1575  * \return RFC_RC
1576  */
1577  DECL_EXP RFC_RC SAP_API RfcGetPartnerSNCName(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *sncName, unsigned length, RFC_ERROR_INFO* errorInfo);
1578 
1579  /** \brief Gets partner's SNC key, if any.
1580  * \ingroup connection
1581  *
1582  *
1583  * \in rfcHandle RFC server connection. If this function is executed on a client connection, RFC_ILLEGAL_STATE will be returned.
1584  * \out *sncKey Pre-allocated buffer, which will receive the backend user's SNC key.
1585  * \inout *length Needs to be filled with the buffer length of ssoTicket. The return value will be the byte
1586  * length of the returned key (if buffer was large enough). Unfortunately in case of RFC_BUFFER_TOO_SMALL
1587  * the required size is not returned by the GSS library.
1588  * The maximum length of an SNC key is 1024.
1589  * \out *errorInfo More error details in case SNC is not active.
1590  * \return RFC_RC
1591  */
1592  DECL_EXP RFC_RC SAP_API RfcGetPartnerSNCKey(RFC_CONNECTION_HANDLE rfcHandle, SAP_RAW *sncKey, unsigned *length, RFC_ERROR_INFO* errorInfo);
1593 
1594  /** \brief Converts SNC name to SNC key.
1595  * \ingroup connection
1596  *
1597  *
1598  * \in *sncLib Optional: file name of the GSS library to be used for the conversion. If not specified, the
1599  * "global" GSS library (environment variable SNC_LIB or SNC_LIB_64) will be used.
1600  * \in *sncName Null-terminated SNC name to be converted.
1601  * \out *sncKey Pre-allocated buffer, which will receive the corresponding SNC key.
1602  * \inout *keyLength Needs to be filled with the buffer length of sncKey. The return value will be byte length
1603  * of the SNC key (if buffer was large enough). Unfortunately in case of RFC_BUFFER_TOO_SMALL
1604  * the required size is not returned by the GSS library.
1605  * The maximum length of an SNC key is 1024.
1606  * \out *errorInfo More error details in case something goes wrong.
1607  * \return RFC_RC
1608  */
1609  DECL_EXP RFC_RC SAP_API RfcSNCNameToKey(SAP_UC const *sncLib, SAP_UC const *sncName, SAP_RAW *sncKey, unsigned *keyLength, RFC_ERROR_INFO* errorInfo);
1610 
1611  /** \brief Converts SNC key to SNC name.
1612  * \ingroup connection
1613  *
1614  *
1615  * \in *sncLib Optional: file name of the GSS library to be used for the conversion. If not specified, the
1616  * "global" GSS library (environment variable SNC_LIB or SNC_LIB_64) will be used.
1617  * \in *sncKey SNC key to be converted.
1618  * \in keyLength Byte length of the given SNC key
1619  * \out *sncName Pre-allocated buffer, which will receive the corresponding (null-terminated) SNC name.
1620  * \in nameLength Size of the given sncName buffer. (The maximum length of an SNC name is 256.)
1621  * \out *errorInfo More error details in case something goes wrong.
1622  * \return RFC_RC
1623  */
1624  DECL_EXP RFC_RC SAP_API RfcSNCKeyToName(SAP_UC const *sncLib, SAP_RAW const *sncKey, unsigned keyLength ,SAP_UC *sncName, unsigned nameLength, RFC_ERROR_INFO* errorInfo);
1625 
1626 
1627  /** \brief Listens on a server connection handle and waits for incoming RFC calls from the R/3 system.
1628  * \ingroup connection
1629  *
1630  * The mechanism for dispatching incoming function calls works as follows:
1631  * First %RfcListenAndDispatch() checks, whether for the current combination of R/3 SystemID and function
1632  * module name a callback function has been installed via RfcInstallServerFunction(). If not, it checks,
1633  * whether a callback function for SystemID=NULL has been installed via RfcInstallServerFunction().If not,
1634  * it checks, whether a global callback function has been installed via RfcInstallGenericServerFunction().
1635  *
1636  * If a callback function has been found, the RFC call will be dispatched to that function for processing,
1637  * and %RfcListenAndDispatch() returns the return code of the callback function.
1638  * Otherwise %RfcListenAndDispatch() returns a SYSTEM_FAILURE to the R/3 backend and the return code
1639  * RFC_NOT_FOUND to the caller.
1640  *
1641  * In general the return codes of %RfcListenAndDispatch() have the following meaning:
1642  * - RFC_OK\n A function call was processed successfully.
1643  * - RFC_RETRY\n No function call came in within the specified timeout period. ("timeout" is given in seconds.)
1644  * - RFC_ABAP_EXCEPTION\n A function call was processed and ended with a defined ABAP Exception, which has
1645  * been returned to the backend.
1646  *
1647  * In the above three cases "rfcHandle" is still open and can be used to listen for the next request.
1648  *
1649  * - RFC_ABAP_MESSAGE\n A function call was started to be processed, but was aborted with an ABAP A-, E- or X-Message.
1650  * The message parameters have been returned to the backend (and can be evaluated there via
1651  * the sy-msgid, sy-msgtype, sy-msgno, sy-msgv1, ..., sy-msgv4 parameters).
1652  * - RFC_EXTERNAL_FAILURE\n A function call was started to be processed, but was aborted with a "SYSTEM_FAILURE",
1653  * which has been returned to the backend.
1654  * - RFC_COMMUNICATION_FAILURE\n The connection broke down while processing the function call. No response
1655  * has been sent to the backend.
1656  * - RFC_CLOSED\n The connection has been closed by the backend side (SMGW, SM04). No response
1657  * has been sent to the backend.
1658  * - RFC_NOT_FOUND\n No handler has been found for the current function module name. A SYSTEM_FAILURE has
1659  * been returned to the R/3 backend.
1660  *
1661  * In these five cases the connection has been closed, so the "rfcHandle" needs to be refreshed via RfcRegisterServer.
1662  *
1663  * - RFC_INVALID_HANDLE\n "rfcHandle" is invalid or points to a connection that has already been closed.
1664  *
1665  *
1666  * \in rfcHandle Server connection on which to listen for incoming requests.
1667  * \in timeout Number of seconds to wait for an incoming request.
1668  * \out *errorInfo Additional error information.
1669  * \return RFC_RC
1670  */
1671  DECL_EXP RFC_RC SAP_API RfcListenAndDispatch (RFC_CONNECTION_HANDLE rfcHandle, int timeout, RFC_ERROR_INFO* errorInfo);
1672 
1673  /**
1674  * \brief Executes a function module in the backend system.
1675  * \ingroup connection
1676  *
1677  * The return codes have the following meaning:
1678  * - RFC_OK\n The function call was executed successfully.
1679  * - RFC_ABAP_EXCEPTION\n The function call was executed and ended with a defined ABAP Exception. The key of the
1680  * exception can be obtained from errorInfo->key.
1681  *
1682  * In the above two cases "rfcHandle" is still open and can be used to execute further function call.
1683  *
1684  * - RFC_ABAP_MESSAGE\n The function call was started to be processed, but was aborted with an ABAP Message.
1685  * The message parameters can be obtained from errorInfo->abapMsgClass, errorInfo->abapMsgType,
1686  * errorInfo->abapMsgNumber, errorInfo->abapMsgV1, ..., errorInfo->abapMsgV4.
1687  * - RFC_ABAP_RUNTIME_FAILURE\n The function call was started to be processed, but was aborted with a SYSTEM_FAILURE
1688  * (e.g division by zero, unhandled exception, etc in the backend system).
1689  * Details can be obtained from errorInfo->message.
1690  * - RFC_COMMUNICATION_FAILURE\n The connection broke down while processing the function call.
1691  * Details can be obtained from errorInfo->message.
1692  *
1693  * In these three cases the connection has been closed, so the "rfcHandle" needs to be refreshed via RfcOpenConnection.
1694  *
1695  * - RFC_INVALID_HANDLE\n "rfcHandle" is invalid or points to a connection that has already been closed.
1696  *
1697  *
1698  * \in rfcHandle Client connection over which to execute the function module.
1699  * \inout funcHandle Data container containing the input data for the function module.
1700  * %RfcInvoke() will write the FM's output data into this container.
1701  * \out *errorInfo Additional error information.
1702  * \return RFC_RC
1703  */
1704  DECL_EXP RFC_RC SAP_API RfcInvoke(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* errorInfo);
1705 
1706 
1707 
1708 
1709  /* ***********************************************************************/
1710  /* */
1711  /* Automated Server API */
1712  /* */
1713  /* ***********************************************************************/
1714 
1715 
1716  /** \brief This function can be used to start "automatic" servers.
1717  * \ingroup autoserver
1718  *
1719  * In contrast to RfcRegisterServer(), which registers one single server connection at a SAP gateway, %RfcCreateServer() can be used
1720  * to create a server object that manages multiple server connections in parallel, that takes care of automatically
1721  * re-registering a connection in case it gets broken by network problems, etc. and that takes care of the dispatch-loop
1722  * internally, so that application programmers no longer need to implement that error-prone task themselves. This means,
1723  * you no longer need to use RfcListenAndDispatch() and no longer need to worry about creating multiple threads with such a
1724  * listen- and dispatch-loop, if you want to process multiple parallel requests. All you need to do is starting an RFC_SERVER_HANDLE
1725  * with RfcLaunchServer(), and it will listen for incoming requests on n parallel threads (as given by the parameter REG_COUNT).
1726  *
1727  * In addition, you can start not only a usual registered Server that registers at an RFC gateway, but also a standalone Server
1728  * that listens for requests on a network port and can be accessed by both, SAP systems and other external C-, Java- or .NET-based
1729  * RFC client programs. Which kind of server is started, depends on the connection parameters:
1730  *
1731  * Registered Server:
1732  * Here you need to supply the standard parameters you would also use with RfcRegisterServer(). E.g. GWHOST, GWSERV and PROGRAM_ID,
1733  * followed potentially by parameters for SNC, Trace, SAPRouter, etc. In addition you can supply the parameters REG_COUNT and MAX_REG_COUNT,
1734  * if you want to process multiple requests in parallel (multiple gateway registrations). MAX_REG_COUNT is needed only for "stateful"
1735  * RFC servers (see the sample sapnwrfc.ini for details).
1736  * Alternatively to registering at only one fixed gateway, you can also provide parameters for "group registration". Then the server will
1737  * register REG_COUNT connections at every gateway of the given logon group. Again see chapter 3 in the sapnwrfc.ini file.
1738  *
1739  *
1740  * For all types of servers you need to specify the parameter SERVER_NAME. This is a freely choosable name used for monitoring purposes.
1741  *
1742  * After a server object has been created, it can be started and stopped any number of times via RfcLaunchServer() and RfcShutdownServer().
1743  * When the server is no longer needed, it must be cleaned up with RfcDestroyServer().
1744  *
1745  * \in *connectionParams Array of network parameters needed for starting the server.
1746  * \out paramCount Number of elements contained in the RFC_CONNECTION_PARAMETER array.
1747  * \out *errorInfo Additional error information in case the server object could not be created (e.g. invalid parameters or insufficient memory).
1748  * \return A handle to the created server object.
1749  */
1750  DECL_EXP RFC_SERVER_HANDLE SAP_API RfcCreateServer(RFC_CONNECTION_PARAMETER const* connectionParams, unsigned paramCount, RFC_ERROR_INFO* errorInfo);
1751 
1752  /** \brief Cleans up and destroys an automatic server object, once you are done with it.
1753  * \ingroup autoserver
1754  *
1755  * Any internal resources of this server object are released. Therefore make sure not to use the RFC_SERVER_HANDLE in any further API calls
1756  *(RfcLaunchServer(), RfcShutdownServer(), etc), after you have destroyed it.
1757  *
1758  *
1759  * \in serverHandle A handle to the server object.
1760  * \out *errorInfo Not much that can go wrong here.
1761  * \return RFC_OK
1762  */
1763  DECL_EXP RFC_RC SAP_API RfcDestroyServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO* errorInfo);
1764 
1765  /** \brief Starts up an automatic server, so that it starts waiting for incoming requests and processes them.
1766  * \ingroup autoserver
1767  *
1768  *
1769  * \in serverHandle A handle to the server object.
1770  * \out *errorInfo Additional error information in case starting the server fails.
1771  * \return RFC_RC
1772  */
1773  DECL_EXP RFC_RC SAP_API RfcLaunchServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO* errorInfo);
1774 
1775  /** \brief Stops an automatic server, so that it no longer accepts incoming requests.
1776  * \ingroup autoserver
1777  *
1778  * If timeout is set to 0, the server stops immediately, aborting any currently ongoing RFC requests. If you want to give any possibly ongoing requests a
1779  * chance to complete, before stopping the server, provide a timeout > 0. %RfcShutdownServer() will then block until all current requests are completed
1780  * or the timeout period is over, whichever occurs first. In any case, the server will immediately stop accepting new requests as soon as you call this function.
1781  *
1782  * If at a later point you want this server to resume listening for requests, you can start it again by calling RfcLaunchServer(). However, once you have
1783  * cleaned up the server with RfcDestroyServer(), you must no longer attempt to use it in further RfcLaunchServer() (or other) calls.
1784  *
1785  * \in serverHandle A handle to the server object.
1786  * \in timeout Number of seconds to wait in order to give currently ongoing RFC requests time to complete.
1787  * \out *errorInfo Not much that can go wrong here.
1788  * \return RFC_OK
1789  */
1790  DECL_EXP RFC_RC SAP_API RfcShutdownServer(RFC_SERVER_HANDLE serverHandle, unsigned timeout, RFC_ERROR_INFO* errorInfo);
1791 
1792 
1793 
1794  /* ***********************************************************************/
1795  /* */
1796  /* Managing Automated Servers */
1797  /* */
1798  /* ***********************************************************************/
1799 
1800  /** \brief Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server.
1801  * \ingroup autoserver
1802  *
1803  * See RFC_SERVER_ATTRIBUTES for more details.
1804  *
1805  * \in serverHandle A handle to the server object.
1806  * \out *serverAttributes Is filled with state information, number of busy connections, etc.
1807  * \out *errorInfo Not much can go wrong here, except an invalid handle.
1808  * \return RFC_RC
1809  */
1810  DECL_EXP RFC_RC SAP_API RfcGetServerAttributes(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_ATTRIBUTES* serverAttributes, RFC_ERROR_INFO* errorInfo);
1811 
1812 
1813  /** \brief Retrieves detailed information about all clients currently connected to a multi-count Registered Server or a TCP Socket Server.
1814  * \ingroup autoserver
1815  *
1816  * For every connected client you get its connection attributes (hostname, SID, user, client) as well as the current function module name,
1817  * if the connection is busy, or the last activity time, if it is idle.
1818  * Make sure to release the memory again with RfcDestroyServerConnectionMonitorData(), after you are done with it.
1819  *
1820  * \in serverHandle A handle to the server object.
1821  * \out *numberOfConnections Number of client connections currently connected to this server.
1822  * \out **connectionData An array of monitor data structs, one for each client connection.
1823  * \out *errorInfo Not much can go wrong here, except an invalid handle or out of memory.
1824  * \return RFC_RC
1825  */
1826  DECL_EXP RFC_RC SAP_API RfcGetServerConnectionMonitorData(RFC_SERVER_HANDLE serverHandle, unsigned* numberOfConnections, RFC_SERVER_MONITOR_DATA** connectionData, RFC_ERROR_INFO* errorInfo);
1827 
1828 
1829  /** \brief Releases all internal memory hold by monitor data object.
1830  * \ingroup autoserver
1831  *
1832  * Use this to free the data obtained from RfcGetServerConnectionMonitorData() once you no longer need it.
1833  *
1834  * \in numberOfConnections Number of elements in the connectionData array.
1835  * \in connectionData Array of connection data objects to be cleaned up.
1836  * \out *errorInfo Can't go wrong...
1837  * \return RFC_OK
1838  */
1839  DECL_EXP RFC_RC SAP_API RfcDestroyServerConnectionMonitorData(unsigned numberOfConnections, RFC_SERVER_MONITOR_DATA* connectionData, RFC_ERROR_INFO* errorInfo);
1840 
1841 
1842  /** \brief Adds an error listener to this server.
1843  * \ingroup autoserver
1844  *
1845  * An error listener is a callback function of type RFC_SERVER_ERROR_LISTENER. The server will execute this function, whenever a
1846  * severe technical error happens outside the processing of function modules, e.g. network problems with the gateway or with the
1847  * connected clients.
1848  *
1849  * \in serverHandle A handle to the server object.
1850  * \in errorListener Function pointer to a callback function receiving error notifications.
1851  * \out *errorInfo Additional error information in case adding the error listener fails, e.g. invalid handle.
1852  * \return RFC_RC
1853  */
1854  DECL_EXP RFC_RC SAP_API RfcAddServerErrorListener(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_ERROR_LISTENER errorListener, RFC_ERROR_INFO* errorInfo);
1855 
1856 
1857  /** \brief Adds a state change listener to this server.
1858  * \ingroup autoserver
1859  *
1860  * A state change listener is a callback function of type RFC_SERVER_STATE_CHANGE_LISTENER. The server will execute this function,
1861  * whenever the server's state changes, e.g. from STARTED to ALIVE, or from ALIVE to STOPPING.
1862  *
1863  * \in serverHandle A handle to the server object.
1864  * \in stateChangeListener Function pointer to a callback function receiving state change notifications.
1865  * \out *errorInfo Additional error information in case adding the state change listener fails, e.g. invalid handle.
1866  * \return RFC_RC
1867  */
1869 
1870  /** \brief Adds a session change listener to this server.
1871  * \ingroup autoserver
1872  *
1873  * A session change listener is a callback function of type RFC_SESSION_STATE_CHANGE_LISTENER. The server will execute this function,
1874  * whenever a stateful user session starts or ends. A "stateful user session" is basically a one-to-one binding between a SAP user session
1875  * on ABAP side and some kind of "user session" in your C program. State information can be kept on C side inbetween separate function
1876  * calls from ABAP.
1877  *
1878  * The server will also execute this function, whenever an ABAP function call begins or ends inside an existing stateful user session.
1879  * For most applications, this probably does not matter, so this event can be ignored. There may however be cases, where some cleanup
1880  * or reduction of consumed resources can be done, while a stateful user session is idle.
1881  *
1882  * There are two ways to start a stateful user session:
1883  * - The ABAP side requests to start a stateful sequence by calling RFM RFC_SET_REG_SERVER_PROPERTY with parameter EXCLUSIV = 'Y'
1884  * - The C program, while currently processing a request from ABAP, can set the current connection to stateful via RfcSetServerStateful()
1885  *
1886  * There are four ways a stateful user session can end:
1887  * - The ABAP side ends the stateful sequence by calling RFM RFC_SET_REG_SERVER_PROPERTY with parameter EXCLUSIV = 'N'
1888  * - The C program, while currently processing a request from ABAP, can end the current stateful session via RfcSetServerStateful()
1889  * - The SAP user session on ABAP side ends.\n
1890  * This can be, because the SAP user logs out, or ends the current internal mode by pressing the "yellow arrow" or "red cross" button
1891  * or by switching to a new transaction via \\n in the OK-code field.
1892  * - Either the ABAP session or the C session runs into a severe problem (SYSTEM_FAILURE), upon which both sides get reset and the
1893  * connection between the two sides gets closed.
1894  * - The network connection gets destroyed by network problems, system crash etc.
1895  *
1896  * An application that wants to work with stateful sessions, needs to react as follows to the various events:
1897  * - RFC_SESSION_CREATED\n
1898  * Do the necessary initialization of data or resources (like a database connection, etc.).
1899  * - RFC_SESSION_PASSIVATED\n
1900  * Most applications won't need this and can therefore ignore this event. One example, where this may be useful, is:
1901  * if the function calls going on in this session are few and far between, but they occupy a lot of memory, it might be a good idea
1902  * to flush the session state out to disc here, and load it back into memory, when the session gets activated again.
1903  * - RFC_SESSION_ACTIVATED\n
1904  * This is the counterpart to RFC_SESSION_PASSIVATED. In most cases it can safely be ignored. For an example where it might be
1905  * useful to use it, see above.
1906  * - RFC_SESSION_DESTROYED\n
1907  * Do the necessary cleanup of data and other resources that have been used while processing the function calls of this session.
1908  *
1909  * \in serverHandle A handle to the server object.
1910  * \in sessionChangeListener Function pointer to a callback function receiving state change notifications.
1911  * \out *errorInfo Additional error information in case adding the state change listener fails, e.g. invalid handle.
1912  * \return RFC_RC
1913  */
1915 
1916  /** \brief Sets this client's operation mode to statefull or stateless.
1917  * \ingroup autoserver
1918  *
1919  * When a client session operates in stateless mode, which is the default, it does not keep state information inbetween several
1920  * RFC requests over the same connection. By setting it to stateful, you can change that so that all requests over one connection
1921  * run inside one single "user session".
1922  *
1923  * \note This can be used only for connection handles being managed by an automated (multi-count) server. If you try to use it
1924  * on an ordinary connection created with RfcRegisterServer() or RfcStartServer(), you will get an RFC_ILLEGAL_STATE error.
1925  *
1926  * \in connectionHandle A handle to the current client connection. Use the one that gets passed to you in your RFC_SERVER_FUNCTION implementation.
1927  * \in isStateful Specifies whether the server should operate in stateful mode ("1") or in stateless mode ("0").
1928  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, server is not a multi-count server, etc.
1929  * \return RFC_RC
1930  */
1931  DECL_EXP RFC_RC SAP_API RfcSetServerStateful(RFC_CONNECTION_HANDLE connectionHandle, unsigned isStateful, RFC_ERROR_INFO* errorInfo);
1932 
1933 
1934  /**
1935  * \brief Installs an optional function for performing authentication checks on incoming login attempts.
1936  * \ingroup installer
1937  *
1938  * After an RFC connection is opened to the RFC library, and before the first RFC call is executed over
1939  * this connection, the RFC library calls this callback function, if installed.
1940  * Here you can implement a central authentication check, defining exactly which entity
1941  * is allowed to execute the function in your RFC server program.
1942  * The actual function module implementations can then concentrate on their business logic and don't
1943  * need to pay attention to access and authentication checks.
1944  *
1945  * \in onAuthenticationCheck Pointer to a function of type RFC_ON_AUTHENTICATION_CHECK. The RFC lib calls this function, whenever a new RFC connection to this server is first opened by the client.
1946  * \out *errorInfo Additional information, in case the handler could not be installed.
1947  * \return RFC_RC
1948  */
1950 
1951  /** \brief Gets the type of authentication data received from the backend in RFC_ON_AUTHENTICATION_CHECK.
1952  * \ingroup autoserver
1953  *
1954  * If a handler of type RFC_ON_AUTHENTICATION_CHECK is installed, this getter returns the type of authentication data that was received from
1955  * the backend. The authentication method can be customized in the SM59 destination in the backend. The received authentication data is stored
1956  * in the authentication handle, which can then by queried by the authentication handler RFC_ON_AUTHENTICATION_CHECK.
1957  *
1958  * \in authenticationHandle A handle representing the authentication data passed into RFC_ON_AUTHENTICATION_CHECK.
1959  * \out *type The type of authentication method used by the backend.
1960  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, null pointer, etc.
1961  * \return RFC_RC
1962  */
1964 
1965  /** \brief Gets the user to authenticate in RFC_ON_AUTHENTICATION_CHECK if any is received.
1966  * \ingroup autoserver
1967  *
1968  * If a handler of type RFC_ON_AUTHENTICATION_CHECK is installed, this getter returns the user to authenticate set in the destination in the backend.
1969  * This could also be the alias user.
1970  * The received authentication data is stored in the authentication handle, which can then by queried by
1971  * the authentication handler RFC_ON_AUTHENTICATION_CHECK.
1972  *
1973  * \in authenticationHandle A handle representing the authentication data passed into RFC_ON_AUTHENTICATION_CHECK.
1974  * \out **user User to authenticate.
1975  * \out *length String length of user.
1976  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, null pointer, etc.
1977  * \return RFC_RC
1978  */
1979  DECL_EXP RFC_RC SAP_API RfcGetAuthenticationUser(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC** user, unsigned* length, RFC_ERROR_INFO* errorInfo);
1980 
1981  /** \brief Gets the password for authentication in RFC_ON_AUTHENTICATION_CHECK if basic authentication method was setup in the backend.
1982  * \ingroup autoserver
1983  *
1984  * If a handler of type RFC_ON_AUTHENTICATION_CHECK is installed, this getter returns the password for authentication set in the destination in the backend, i.e.
1985  * basic authentication was setup.
1986  * The received authentication data is stored in the authentication handle, which can then by queried by
1987  * the authentication handler RFC_ON_AUTHENTICATION_CHECK.
1988  *
1989  * \in authenticationHandle A handle representing the authentication data passed into RFC_ON_AUTHENTICATION_CHECK.
1990  * \out **password The user's password for basic authentication. NULL if otherwise.
1991  * \out *length String length of password.
1992  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, null pointer, etc.
1993  * \return RFC_RC
1994  */
1995  DECL_EXP RFC_RC SAP_API RfcGetAuthenticationPassword(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC** password, unsigned* length, RFC_ERROR_INFO* errorInfo);
1996 
1997  /** \brief Gets the assertionTicket for authentication in RFC_ON_AUTHENTICATION_CHECK if SSO based authentication method was setup in the backend.
1998  * \ingroup autoserver
1999  *
2000  * If a handler of type RFC_ON_AUTHENTICATION_CHECK is installed, this getter returns the assertionTicket for authentication set in the destination in the backend, i.e.
2001  * SSO authentication was setup.
2002  * The received authentication data is stored in the authentication handle, which can then by queried by
2003  * the authentication handler RFC_ON_AUTHENTICATION_CHECK.
2004  *
2005  * \in authenticationHandle A handle representing the authentication data passed into RFC_ON_AUTHENTICATION_CHECK.
2006  * \out **assertionTicket Assertion ticket for SSO authentication. NULL if otherwise.
2007  * \out *length String length of assertionTicket.
2008  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, null pointer, etc.
2009  * \return RFC_RC
2010  */
2011  DECL_EXP RFC_RC SAP_API RfcGetAuthenticationAssertionTicket(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC** assertionTicket, unsigned* length, RFC_ERROR_INFO* errorInfo);
2012 
2013  /** \brief Gets the certificate chain for authentication in RFC_ON_AUTHENTICATION_CHECK if x509 authentication method was setup in the backend.
2014  * \ingroup autoserver
2015  *
2016  * If a handler of type RFC_ON_AUTHENTICATION_CHECK is installed, this getter returns the certificate chain for authentication set in the destination in the backend, i.e.
2017  * x509 authentication was setup. The certificate chain is stored as a singly linked list.
2018  * The received authentication data is stored in the authentication handle, which can then by queried by
2019  * the authentication handler RFC_ON_AUTHENTICATION_CHECK.
2020  *
2021  * \in authenticationHandle A handle representing the authentication data passed into RFC_ON_AUTHENTICATION_CHECK.
2022  * \out **certificateData Singly linked list of certificate attributes for x509 authentication. NULL if otherwise.
2023  * \out *errorInfo Additional error information in case changing the state fails, e.g. invalid handle, null pointer, etc.
2024  * \return RFC_RC
2025  */
2026  DECL_EXP RFC_RC SAP_API RfcGetAuthenticationCertificateData(RFC_AUTHENTICATION_HANDLE authenticationHandle, const RFC_CERTIFICATE_DATA** certificateData, RFC_ERROR_INFO* errorInfo);
2027 
2028  /* ***********************************************************************/
2029  /* */
2030  /* Transaction (tRFC & qRFC) Client API */
2031  /* */
2032  /* ***********************************************************************/
2033 
2034  /**
2035  * \brief Retrieves a unique 24-digit transaction ID from the backend.
2036  * \ingroup transaction
2037  * If you specify NULL as connection handle, the API will attempt to generate a TID locally using the
2038  * operating system's UUID algorithms. (Currently not possible on AIX systems.)
2039  *
2040  * \in rfcHandle Client connection to a backend or NULL, if you want to create a TID locally.
2041  * \out tid Will be filled with the transaction ID.
2042  * \out *errorInfo Error information in case there is a problem with the connection.
2043  * \return RFC_RC
2044  */
2045  DECL_EXP RFC_RC SAP_API RfcGetTransactionID(RFC_CONNECTION_HANDLE rfcHandle, RFC_TID tid, RFC_ERROR_INFO* errorInfo);
2046 
2047  /**
2048  * \brief Creates a container for executing a (multi-step) transactional call.
2049  * \ingroup transaction
2050  *
2051  * If queueName is NULL, tRFC will be used, otherwise qRFC. Use RfcInvokeInTransaction() to
2052  * add one (or more) function modules to the transactional call. When sending this transactional
2053  * call to the backend via RfcSubmitTransaction(), the backend will then treat
2054  * all function modules in the RFC_TRANSACTION_HANDLE as one LUW.
2055  *
2056  * \in rfcHandle Client connection to the backend, into which you want to send this tRFC/qRFC LUW.
2057  * \in tid A unique 24 character ID.
2058  * \in *queueName For tRFC set this to NULL, for qRFC specify the name of a qRFC inbound queue in the backend.
2059  * \out *errorInfo Error information in case there is a problem with the connection.
2060  * \return A data container that can be filled with several function modules.
2061  */
2062  DECL_EXP RFC_TRANSACTION_HANDLE SAP_API RfcCreateTransaction(RFC_CONNECTION_HANDLE rfcHandle, RFC_TID tid, SAP_UC const *queueName, RFC_ERROR_INFO* errorInfo);
2063 
2064  /**
2065  * \brief Adds a function module call to a transaction. Can be used multiple times on one tHandle.
2066  * \ingroup transaction
2067  *
2068  * \in tHandle A transaction handle created via RfcCreateTransaction().
2069  * \in funcHandle An RFC_FUNCTION_HANDLE, whose IMPORTING, CHANGING and TABLES parameters have been filled.
2070  * \note that tRFC/qRFC calls have no return values, so the EXPORTING parameters of this function handle will
2071  * not be filled, nor will the changes to the CHANGING/TABLES parameters be returned.
2072  * \out *errorInfo Actually there is nothing that can go wrong here except for invalid handles and out of memory.
2073  * \return RFC_RC
2074  */
2076 
2077  /**
2078  * \brief Executes the entire LUW in the backend system as an "atomic unit".
2079  * \ingroup transaction
2080  *
2081  * This step can be repeated until it finally succeeds (RFC_OK). The transaction handling in the backend
2082  * system protects against duplicates (until you remove the TID from the backend's status tables using
2083  * RfcConfirmTransaction()).
2084  *
2085  *
2086  * \in tHandle A transaction handle filled with one or several function modules.
2087  * \out *errorInfo Additional error information in case anything goes wrong.
2088  * \return RFC_RC
2089  */
2091 
2092  /**
2093  * \brief Removes the TID contained in the RFC_TRANSACTION_HANDLE from the backend's ARFCRSTATE table.
2094  * \ingroup transaction
2095  *
2096  * After RfcSubmitTransaction() has finally succeeded, call %RfcConfirmTransaction() to clean up the
2097  * transaction handling table in the backend.
2098  * \warning Attention: after this call, the backend is no longer protected against this TID. So another
2099  * RfcSubmitTransaction() with the same transaction handle would result in a duplicate.
2100  *
2101  *
2102  * \in tHandle A transaction handle that has successfully been submitted.
2103  * \out *errorInfo Additional error information in case of a network problem.
2104  * \warning You may retry the Confirm step, if you get an error here, but do not retry the Submit step!
2105  * \return RFC_RC
2106  */
2108 
2109 
2110  /**
2111  * \brief Convenience function to remove the TID contained in a previous RFC_TRANSACTION_HANDLE from the backend's ARFCRSTATE table,
2112  * without the need of still having the RFC_TRANSACTION_HANDLE at hand.
2113  * \ingroup transaction
2114  *
2115  * After RfcSubmitTransaction() has finally succeeded, call %RfcConfirmTransactionID() to clean up the
2116  * transaction handling table in the backend. This function can be called after the RFC_TRANSACTION_HANDLE has
2117  * already been deleted.
2118  * \warning Attention: after this call, the backend is no longer protected against this TID. So another
2119  * RfcSubmitTransaction() with the same transaction handle would result in a duplicate.
2120  *
2121  *
2122  * \in rfcHandle A connection into the same system, into which the corresponding transaction has been sent via RfcSubmitTransaction().
2123  * \in tid A unique 24 character ID.
2124  * \out *errorInfo Additional error information in case of a network problem.
2125  * \warning You may retry the Confirm step, if you get an error here, but do not retry the Submit step!
2126  * \return RFC_RC
2127  */
2129 
2130  /**
2131  * \brief Releases the memory of the transaction container.
2132  * \ingroup transaction
2133  *
2134  *
2135  * \in tHandle A transaction handle that is no longer needed.
2136  * \out *errorInfo Not much that can go wrong here...
2137  * \return RFC_RC
2138  */
2140 
2141 
2142  /* ***********************************************************************/
2143  /* */
2144  /* Background Communication (bgRFC) Client API */
2145  /* */
2146  /* ***********************************************************************/
2147 
2148  /**
2149  * \brief Create a 32 digit bgRFC unit ID.
2150  * \ingroup bgrfc
2151  *
2152  * This function fills the given RFC_UNITID with a 32 digit hexadecimal GUID and zero-terminates it.
2153  * If you want the GUID to be generated by the backend, pass a valid rfcHandle, if you want the
2154  * NW RFC library to generate one locally (using the appropriate OS functions), pass NULL as
2155  * connection handle. In both cases the GUID is suitable for sending bgRFC units into an SAP system.
2156  *
2157  *
2158  * \in rfcHandle An open RFC connection into the system that is to create the unit ID, or NULL.
2159  * \out uid Preallocated buffer that will receive the 32 digits of the unit ID and a terminating zero.
2160  * \out *errorInfo Not much that can go wrong here...
2161  * \return RFC_RC
2162  */
2163  DECL_EXP RFC_RC SAP_API RfcGetUnitID(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNITID uid, RFC_ERROR_INFO* errorInfo);
2164 
2165  /**
2166  * \brief Create a bgRFC unit.
2167  * \ingroup bgrfc
2168  *
2169  * Creates a data container that can later be filled with one or more function modules comprising the
2170  * bgRFC unit. The backend will execute these function modules as an atomic unit.
2171  * The connection handle specifies the target system, to which the unit will later be sent. The unit ID
2172  * has been created in the previous step (or is an old one in case of retrying a failed unit).
2173  * Via queueNames and queueNameCount you can specify the list of bgRFC queues, into which this unit
2174  * shall later be inserted. If no queues are given (queueNameCount == 0), a synchronous unit is created
2175  * (type 'T') that will later be executed immediately. Otherwise an asynchronous unit (type 'Q') is created,
2176  * which will be inserted into the named queues and executed asynchronously by the bgRFC scheduler.
2177  *
2178  *
2179  * \in rfcHandle An open RFC connection into the system that will later receive the unit.
2180  * \in uid A 32 digit unique identifier of the unit.
2181  * \in *queueNames[] A list of bgRFC queues in the backend or NULL.
2182  * \in queueNameCount The length of the queueNames list.
2183  * \in *unitAttr A set of attributes that specify the behaviour of the unit in the backend.
2184  * See RFC_UNIT_ATTRIBUTES for more information.
2185  * \out *identifier This identifier can be used in later calls to RfcConfirmUnit() and RfcGetUnitState().
2186  * It is important that these functions are called with the correct unit type ('T' or 'Q'), otherwise
2187  * the backend system won't find the status information corresponding to the uid... Therefore the
2188  * NW RFC lib bundles the uid and the correct unit type here for your convenience.
2189  * \out *errorInfo More details in case something goes wrong.
2190  * \return RFC_OK or RFC_MEMORY_INSUFFICIENT
2191  */
2192  DECL_EXP RFC_UNIT_HANDLE SAP_API RfcCreateUnit(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNITID uid, SAP_UC const *queueNames[], unsigned queueNameCount,
2193  const RFC_UNIT_ATTRIBUTES* unitAttr, RFC_UNIT_IDENTIFIER* identifier, RFC_ERROR_INFO* errorInfo);
2194 
2195  /**
2196  * \brief Adds a function module to a bgRFC unit.
2197  * \ingroup bgrfc
2198  *
2199  * Serializes the payload of the function module data container into bgRFC format and inserts
2200  * it into the data container for the bgRFC unit. The funcHandle can afterwards be freed
2201  * using RfcDestroyFunction(), because the data is copied, not referenced.
2202  *
2203  * \note Despite the name "invoke", nothing is executed in the backend system, yet!
2204  *
2205  *
2206  * \in unitHandle A valid (unsubmitted) bgRFC unit, to which the given function module shall be added.
2207  * \in funcHandle A function module, whose payload (IMPORTING/CHANGING/TABLES) shall be added to the unit.
2208  * \out *errorInfo More details in case something goes wrong.
2209  * \return RFC_OK, RFC_INVALID_HANDLE or RFC_MEMORY_INSUFFICIENT
2210  */
2211  DECL_EXP RFC_RC SAP_API RfcInvokeInUnit(RFC_UNIT_HANDLE unitHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* errorInfo);
2212 
2213  /**
2214  * \brief Executes a bgRFC unit in the backend.
2215  * \ingroup bgrfc
2216  *
2217  * Sends the bgRFC unit into the backend, where it will be executed synchronously or persisted
2218  * in the given inbound queues and executed asynchronously by the bgRFC scheduler, depending on
2219  * whether the unit type is 'T' or 'Q'.
2220  * If the type is 'T', this function will wait until the unit is completely executed and then
2221  * return the success or error information. If the type is 'Q', this function only inserts the
2222  * unit into the specified queues and then returns. Processing of the unit in the backend system
2223  * happens asynchronously. The return code of this function indicates, whether the unit could
2224  * be persisted in the given queues successfully. In order to get information about the processing
2225  * status of the unit, use RfcGetUnitState() at a later point.
2226  *
2227  * \note Despite the name "invoke", nothing is executed in the backend system, yet!
2228  *
2229  *
2230  * \in unitHandle A valid (unsubmitted) bgRFC unit, which shall be sent into the backend system.
2231  * \out *errorInfo More details in case something goes wrong.
2232  * \return RFC_OK, RFC_INVALID_HANDLE, RFC_MEMORY_INSUFFICIENT, RFC_COMMUNICATION_FAILURE
2233  */
2234  DECL_EXP RFC_RC SAP_API RfcSubmitUnit(RFC_UNIT_HANDLE unitHandle, RFC_ERROR_INFO* errorInfo);
2235 
2236  /**
2237  * \brief Removes the UID from the backend's status management.
2238  * \ingroup bgrfc
2239  *
2240  * After RfcSubmitUnit() returned successfully, you should use this function to cleanup
2241  * the status information for this unit on backend side. However, be careful: if you have
2242  * a three-tier architecture, don't bundle Submit and Confirm into one single logical step.
2243  * Otherwise you run the risk, that the middle tier (the NW RFC lib) successfully executes
2244  * both, the Submit and the Confirm, but on the way back to the first tier an error occurs
2245  * and the first tier can not be sure that the unit was really executed in the backend and
2246  * therefore decides to re-execute it. This will now result in a duplicate execution in the
2247  * backend, because the Confirm step in the first try has already deleted the UID in the
2248  * backend, and consequently the backend is no longer protected against re-execution of this
2249  * UID. In a three-tier architecture, the first tier should trigger both steps separately:
2250  * first the Submit, and after it knows that the Submit was successful, the Confirm.
2251  * Also in case the Confirm runs into an error, do NOT execute the Submit again, never!
2252  * You may try the Confirm again at a later point, but otherwise just ignore the error.
2253  * Better a left-over entry in the status information table than a duplicate unit...
2254  *
2255  * \in rfcHandle A connection into the same system, into which the corresponding bgRFC unit
2256  * has been sent via RfcSubmitUnit().
2257  * \in *identifier The correct combination of UID and type of the unit. Best use the output
2258  * you get from RfcCreateUnit().
2259  * \out *errorInfo More details in case something goes wrong.
2260  * \return RFC_OK, RFC_INVALID_HANDLE, RFC_COMMUNICATION_FAILURE
2261  */
2262  DECL_EXP RFC_RC SAP_API RfcConfirmUnit(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER* identifier, RFC_ERROR_INFO* errorInfo);
2263 
2264  /**
2265  * \brief Releases the memory of the bgRFC unit container.
2266  * \ingroup bgrfc
2267  *
2268  *
2269  * \in unitHandle A unit handle that is no longer needed.
2270  * \out *errorInfo Not much that can go wrong here...
2271  * \return RFC_RC
2272  */
2273  DECL_EXP RFC_RC SAP_API RfcDestroyUnit(RFC_UNIT_HANDLE unitHandle, RFC_ERROR_INFO* errorInfo);
2274 
2275  /**
2276  * \brief Retrieves the processing status of the given background unit from the backend system's status management.
2277  * \ingroup bgrfc
2278  *
2279  *
2280  * \in rfcHandle A connection into the same system, into which the corresponding bgRFC unit
2281  * has been sent via RfcSubmitUnit().
2282  * \in *identifier The correct combination of UID and type of the unit. Best use the output
2283  * you get from RfcCreateUnit().
2284  * \out *state The state of the unit. See RFC_UNIT_STATE for more details.
2285  * \out *errorInfo Not much that can go wrong here...
2286  * \return RFC_RC
2287  */
2288  DECL_EXP RFC_RC SAP_API RfcGetUnitState(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER* identifier, RFC_UNIT_STATE* state, RFC_ERROR_INFO* errorInfo);
2289 
2290 
2291 
2292  /* ***********************************************************************/
2293  /* */
2294  /* Installation of Callback Functions for RFC Servers */
2295  /* */
2296  /* ***********************************************************************/
2297 
2298  /**
2299  * \brief Installs a callback function of type RFC_SERVER_FUNCTION, which will be triggered when a request for
2300  * the function module corresponding to funcDescHandle comes in from the R/3 system corresponding to sysId.
2301  * \ingroup installer
2302  *
2303  * If you pass NULL as "sysId", the serverFunction will be used for calls from any backend system.
2304  *
2305  * The main inputs of RFC_SERVER_FUNCTION are as follows:
2306  * - RFC_CONNECTION_HANDLE\n A connection handle, which can be used to query logon information about
2307  * the current (backend) user or to make callbacks into the backend.
2308  * - RFC_FUNCTION_HANDLE\n A data container that represents the current function call. Read the importing
2309  * parameters, which came from the backend, from this container via the RfcGetX functions and
2310  * write the exporting parameters, which are to be returned to the backend, into this container
2311  * using the RfcSetX functions.\n
2312  * The memory of that container is automatically released by the RFC Runtime after the
2313  * RFC_SERVER_FUNCTION returns.
2314  * - RFC_ERROR_INFO*\n If you want to return an ABAP Exception or ABAP Message to the backend, fill the
2315  * parameters of that container and return RFC_ABAP_EXCEPTION or RFC_ABAP_MESSAGE from
2316  * your RFC_SERVER_FUNCTION implementation.\n
2317  * If you want to return a SYSTEM_FAILURE to the backend, fill the message parameter of
2318  * this container and return RFC_EXTERNAL_FAILURE from your RFC_SERVER_FUNCTION implementation.
2319  * If your RFC_SERVER_FUNCTION implementation processed the function call successfully, you should return RFC_OK.
2320  *
2321  *
2322  * \in *sysId System ID of the R/3 system, for which this function module implementation shall be used.
2323  * If you set this to NULL, this server function will be used for calls from all backends, for whose SysID no
2324  * explicit server function has been installed.
2325  * \in funcDescHandle A function description giving the name of the function module and its parameters.\n
2326  * Note that the NW RFC library does not create a copy of this function description. So if you are using
2327  * self-defined (hard-coded) function descriptions (see RfcCreateFunctionDesc()), then you need to make
2328  * sure, that these function descriptions are not destroyed as long as they are still used in a server
2329  * function installation!
2330  * \in serverFunction Pointer to a C function of type RFC_SERVER_FUNCTION. If you pass a null-pointer here,
2331  * any previously installed server function for the given function module will be uninstalled.
2332  * \out *errorInfo Not much that can go wrong here.
2333  * \return RFC_RC
2334  */
2335  DECL_EXP RFC_RC SAP_API RfcInstallServerFunction(SAP_UC const *sysId, RFC_FUNCTION_DESC_HANDLE funcDescHandle, RFC_SERVER_FUNCTION serverFunction, RFC_ERROR_INFO* errorInfo);
2336 
2337  /**
2338  * \brief Installs a generic callback function of type RFC_SERVER_FUNCTION together with a callback
2339  * function of type RFC_FUNC_DESC_CALLBACK for obtaining the metadata description of unknown function modules.
2340  * \ingroup installer
2341  *
2342  * The RFC Runtime calls the callback function RFC_SERVER_FUNCTION, if it receives a function call, for whose
2343  * function module name no matching callback function has been installed via RfcInstallServerFunction()
2344  * (neither for the current system ID nor for SysID=NULL).
2345  *
2346  * In addition to the handler function you need to provide a second callback function: RFC_FUNC_DESC_CALLBACK.
2347  * The RFC runtime calls it to obtain an RFC_FUNCTION_DESC_HANDLE for the current function module from you.
2348  * So this function either needs to return hardcoded meta data or needs to be able to perform a DDIC lookup
2349  * using a valid client connection and RfcGetFunctionDesc(). If your implementation of RFC_FUNC_DESC_CALLBACK
2350  * is not able to provide a function description for the current function module name, it should return RFC_NOT_FOUND.
2351  * The RFC runtime will then notify the backend, that this function module cannot be processed by your
2352  * RFC server.
2353  *
2354  *
2355  * \in serverFunction A pointer to a function that can handle "all" function modules.
2356  * \in funcDescProvider A pointer to a function that can provide metadata descriptions of "all" function modules.
2357  * \out *errorInfo Again not much that can go wrong at this point.
2358  * \return
2359  */
2360  DECL_EXP RFC_RC SAP_API RfcInstallGenericServerFunction(RFC_SERVER_FUNCTION serverFunction, RFC_FUNC_DESC_CALLBACK funcDescProvider, RFC_ERROR_INFO* errorInfo);
2361 
2362  /**
2363  * \brief Installs the necessary callback functions for processing incoming tRFC/qRFC calls.
2364  * \ingroup installer
2365  *
2366  * These functions need to be implemented by you and will be used by the RFC runtime in the following way:
2367  * -# The RFC_ON_CHECK_TRANSACTION function is called when a local transaction is starting. Since a transactional
2368  * RFC call can be issued many times by the client system, the function is responsible for storing the transaction ID
2369  * in permanent storage. The return value should be one of the following:
2370  * - RFC_OK\n Transaction ID stored, transaction can be started.
2371  * - RFC_EXECUTED\n This transaction has already been processed successfully in an earlier attempt. Skip the execution now.
2372  * - RFC_EXTERNAL_FAILURE\n Currently unable to access my permanent storage. Raise an exception in the sending system, so
2373  * that the sending system will try to resend the transaction at a later time.
2374  * -# The next step will be the execution of the RFC_SERVER_FUNCTIONs for all function modules contained in the LUW.
2375  * -# If one of the RFC_SERVER_FUNCTION implementations returns an error code, RFC_ON_ROLLBACK_TRANSACTION is called.
2376  * Here you should roll back all the work of all the previous RFC_SERVER_FUNCTIONs. (The easiest way is to do
2377  * a database ROLLBACK WORK here.)\n
2378  * If all RFC_SERVER_FUNCTIONs complete successfully, RFC_ON_COMMIT_TRANSACTION is called at the end.
2379  * Persist all the changes here (e.g. do a COMMIT WORK).\n
2380  * Note: Normally you'll only have "one-function-module LUWs", e.g. IDocs. In this case the RFC_SERVER_FUNCTION
2381  * can already commit/rollback its own work, before returning RFC_OK or an error code. So the two functions
2382  * RFC_ON_ROLLBACK_TRANSACTION and RFC_ON_COMMIT_TRANSACTION can be empty in this case.
2383  * -# In the end RFC_ON_CONFIRM_TRANSACTION will be called. All information stored about that transaction can now be
2384  * discarded by the server, as it no longer needs to protect itself against duplicates.
2385  * In general this function can be used to delete the transaction ID from permanent storage.
2386  *
2387  * If you pass NULL as "sysId", the transaction handlers will be used for tRFC calls from any backend system,
2388  * for which no explicit handlers have been installed.
2389  *
2390  *
2391  * \in *sysId System ID of the SAP system for which to use this set of transaction handlers, or NULL.
2392  * \in onCheckFunction Pointer to a function of type RFC_ON_CHECK_TRANSACTION.
2393  * \in onCommitFunction Pointer to a function of type RFC_ON_COMMIT_TRANSACTION.
2394  * \in onRollbackFunction Pointer to a function of type RFC_ON_ROLLBACK_TRANSACTION.
2395  * \in onConfirmFunction Pointer to a function of type RFC_ON_CONFIRM_TRANSACTION.
2396  * \out *errorInfo Additional information, in case the handlers could not be installed.
2397  * \return RFC_RC
2398  */
2399  DECL_EXP RFC_RC SAP_API RfcInstallTransactionHandlers (SAP_UC const *sysId, RFC_ON_CHECK_TRANSACTION onCheckFunction,
2400  RFC_ON_COMMIT_TRANSACTION onCommitFunction, RFC_ON_ROLLBACK_TRANSACTION onRollbackFunction,
2401  RFC_ON_CONFIRM_TRANSACTION onConfirmFunction, RFC_ERROR_INFO* errorInfo);
2402 
2403 
2404  /**
2405  * \brief Installs the necessary callback functions for processing incoming bgRFC calls.
2406  * \ingroup installer
2407  *
2408  * These functions need to be implemented by you and will be used by the RFC runtime in the following way:
2409  * -# The RFC_ON_CHECK_UNIT function is called when a local background unit is starting. Since a background
2410  * RFC call can be issued many times by the client system, the function is responsible for storing the unit ID
2411  * and type in permanent storage. The return value should be one of the following:
2412  * - RFC_OK\n Unit ID stored, LUW can be started.
2413  * - RFC_EXECUTED\n This LUW has already been processed successfully in an earlier attempt. Skip the execution now.
2414  * - RFC_EXTERNAL_FAILURE\n Currently unable to access my permanent storage. Raise an exception in the sending system, so
2415  * that the sending system will try to resend the unit at a later time.
2416  * -# The next step will be the execution of the RFC_SERVER_FUNCTIONs for all function modules contained in the LUW.
2417  * -# If one of the RFC_SERVER_FUNCTION implementations returns an error code, RFC_ON_ROLLBACK_UNIT is called.
2418  * Here you should roll back all the work of all the previous RFC_SERVER_FUNCTIONs. (The easiest way is to do
2419  * a database ROLLBACK WORK here.)\n
2420  * If all RFC_SERVER_FUNCTIONs complete successfully, RFC_ON_COMMIT_UNIT is called at the end.
2421  * Persist all the changes here (e.g. do a COMMIT WORK).\n
2422  * Note: Normally you'll only have "one-function-module LUWs", e.g. IDocs. In this case the RFC_SERVER_FUNCTION
2423  * can already commit/rollback its own work, before returning RFC_OK or an error code. So the two functions
2424  * RFC_ON_ROLLBACK_UNIT and RFC_ON_COMMIT_UNIT can be empty in this case.
2425  * -# In the end RFC_ON_CONFIRM_UNIT will be called. All information stored about that LUW can now be
2426  * discarded by the server, as it no longer needs to protect itself against duplicates.
2427  * In general this function can be used to delete the unit ID from permanent storage.
2428  * -# At various points in the processing of a background unit, the backend system may or may not inquire
2429  * the status of the currently (or previously) processed unit by calling RFC_ON_GET_UNIT_STATE. Your implementation
2430  * of this function should check your permanent storage for status information about the given unit ID and
2431  * fill the RFC_UNIT_STATE* accordingly.
2432  *
2433  * If you pass NULL as "sysId", the transaction handlers will be used for bgRFC calls from any backend system,
2434  * for which no explicit handlers have been installed.
2435  *
2436  *
2437  * \in *sysId System ID of the SAP system for which to use this set of transaction handlers, or NULL.
2438  * \in onCheckFunction Pointer to a function of type RFC_ON_CHECK_UNIT.
2439  * \in onCommitFunction Pointer to a function of type RFC_ON_COMMIT_UNIT.
2440  * \in onRollbackFunction Pointer to a function of type RFC_ON_ROLLBACK_UNIT.
2441  * \in onConfirmFunction Pointer to a function of type RFC_ON_CONFIRM_UNIT.
2442  * \in onGetStateFunction Pointer to a function of type RFC_ON_GET_UNIT_STATE.
2443  * \out *errorInfo Additional information, in case the handlers could not be installed.
2444  * \return RFC_RC
2445  */
2446  DECL_EXP RFC_RC SAP_API RfcInstallBgRfcHandlers (SAP_UC const *sysId, RFC_ON_CHECK_UNIT onCheckFunction,
2447  RFC_ON_COMMIT_UNIT onCommitFunction, RFC_ON_ROLLBACK_UNIT onRollbackFunction,
2448  RFC_ON_CONFIRM_UNIT onConfirmFunction, RFC_ON_GET_UNIT_STATE onGetStateFunction, RFC_ERROR_INFO* errorInfo);
2449 
2450 
2451  /**
2452  * \brief Installs the necessary callback functions for processing Extended Passport (EPP) events.
2453  * \ingroup installer
2454  *
2455  * Extended Passports is a feature that supersedes Distributed Statistical Records (DSRs).
2456  * It allows to track certain performance attributes across system boundaries. These callback functions
2457  * allow the application to exchange passports with the backend system. The actual data contained in the
2458  * passports, can be processed with the eppslib library.
2459  * \note Normal RFC applications should never need to deal with this topic at all...
2460  *
2461  *
2462  * \in onClientCallStart Pointer to a function of type RFC_PM_CALLBACK. The RFC lib calls this function, before it sends a client request into the backend. Here you can provide the passport that is to be sent along with the RFC request.
2463  * \in onClientCallEnd Pointer to a function of type RFC_PM_CALLBACK. The RFC lib calls this function, after the RFC response was received from the backend. You can read the updated passport information.
2464  * \in onServerCallStart Pointer to a function of type RFC_PM_CALLBACK. The RFC lib calls this function, when it received an RFC request from the backend. Here you can read the passport that accompanied the request.
2465  * \in onServerCallEnd Pointer to a function of type RFC_PM_CALLBACK. The RFC lib calls this function, before it will send the response to the above request back to the backend. You can update the passport data with information about processing performance of the current call.
2466  * \out *errorInfo Additional information, in case the handlers could not be installed.
2467  * \return RFC_RC
2468  */
2469  DECL_EXP RFC_RC SAP_API RfcInstallPassportManager (RFC_PM_CALLBACK onClientCallStart,
2470  RFC_PM_CALLBACK onClientCallEnd,
2471  RFC_PM_CALLBACK onServerCallStart,
2472  RFC_PM_CALLBACK onServerCallEnd, RFC_ERROR_INFO* errorInfo);
2473 
2474 
2475  /**
2476  * \brief Installs an optional callback function for processing password change events.
2477  * \ingroup installer
2478  *
2479  * Whenever a logon attempt is made with a user, whose password is still initial, the backend system
2480  * challenges this user to change his/her password. If this happens during a call to RfcOpenConnection(),
2481  * the RFC library calls this callback function (if installed), and allows you to change the user's password.
2482  * In your implementation, you can either return RFC_EXTERNAL_FAILURE, if you can't/don't want to change
2483  * the password. In that case RfcOpenConnection() will end with RFC_LOGON_FAILURE and any additional text from
2484  * errorInfo->message will be returned to the application. Or you can fill the old and new password with correct
2485  * values and return RFC_OK, upon which the RFC library will attempt to change the password accordingly.
2486  * \note See also the documentation of the logon parameter PASSWORD_CHANGE_ENFORCED in the sample sapnwrfc.ini file,
2487  * which specifies, whether the application is allowed to get by without a PasswordChangeHandler and keep using
2488  * the initial/expired password for login.
2489  *
2490  *
2491  * \in onPasswordChange Pointer to a function of type RFC_ON_PASSWORD_CHANGE. The RFC lib calls this function, whenever an initial password is detected during a call to RfcOpenConnection().
2492  * \out *errorInfo Additional information, in case the handler could not be installed.
2493  * \return RFC_RC
2494  */
2496 
2497 
2498  /**
2499  * \brief Installs an optional callback function for performing authorization checks on incoming function calls.
2500  * \ingroup installer
2501  *
2502  * After an RFC call arrives at the RFC library, and before the library executes the corresponding
2503  * server implementation for that function module, it calls this callback function, if installed.
2504  * Here you can implement a central authorization check, defining exactly which user from which backend
2505  * system is allowed to execute what functions in your RFC server program.
2506  * The actual function module implementations can then concentrate on their business logic and don't
2507  * need to pay attention to access and authorization checks.
2508  *
2509  *
2510  * \in onAuthorizationCheck Pointer to a function of type RFC_ON_AUTHORIZATION_CHECK. The RFC lib calls this function, whenever an RFC request arrives from the backend.
2511  * \out *errorInfo Additional information, in case the handler could not be installed.
2512  * \return RFC_RC
2513  */
2515 
2516 
2517 
2518  /* ***********************************************************************/
2519  /* */
2520  /* Data container API (Function modules, structures & tables) */
2521  /* */
2522  /* ***********************************************************************/
2523 
2524  /**
2525  * \brief Creates a data container that can be used to execute function calls in the backend via RfcInvoke().
2526  * \ingroup container
2527  *
2528  * The importing parameters can be set using the RfcSetX functions. After the RfcInvoke() call returned
2529  * successfully, the exporting parameters can be read from this data container via the RfcGetX functions.
2530  *
2531  *
2532  * \in funcDescHandle Metadata description ("blueprint") for the data container to be created.
2533  * \out *errorInfo Error information in case the parameters are incorrect or there's not enough memory.
2534  * \return A handle to the function module container.
2535  */
2537 
2538  /**
2539  * \brief Releases all memory used by the data container.
2540  * \ingroup container
2541  *
2542  * \warning Be careful: if you have obtained a handle to a structure (RFC_STRUCTURE_HANDLE) or
2543  * table parameter (RFC_TABLE_HANDLE) from that function module, that handle will be invalid afterwards,
2544  * as that memory will be released as well!
2545  *
2546  *
2547  * \in funcHandle Data container to release.
2548  * \out *errorInfo Not much that can go wrong here.
2549  * \return RFC_RC
2550  */
2551  DECL_EXP RFC_RC SAP_API RfcDestroyFunction(RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* errorInfo);
2552 
2553  /**
2554  * \brief Allows to deactivate certain parameters in the function module interface.
2555  * \ingroup container
2556  *
2557  * This is particularly useful for BAPIs which have many large tables, in which you are not interested.
2558  * Deactivate those and leave only those tables active, in which you are interested. This reduces
2559  * network traffic and memory consumption in your application considerably.
2560  *
2561  * \note This functionality can be used for input and output parameters. If the parameter is an input,
2562  * no data for that parameter will be sent to the backend. If it's an output, the backend will be
2563  * informed not to return data for that parameter.
2564  *
2565  * \in funcHandle A function module data container.
2566  * \in *paramName The name of a parameter of this function module.
2567  * \in isActive 1 = activate, 0 = deactivate.
2568  * \out *errorInfo Error information in case something goes wrong (e.g. a parameter of that name does not exist).
2569  * \return RFC_RC
2570  */
2571  DECL_EXP RFC_RC SAP_API RfcSetParameterActive(RFC_FUNCTION_HANDLE funcHandle, SAP_UC const* paramName, int isActive, RFC_ERROR_INFO* errorInfo);
2572 
2573  /**
2574  * \brief Query whether a parameter is active.
2575  * \ingroup container
2576  *
2577  * Useful for example in a server function implementation: Before creating a large table,
2578  * you may want to check, whether the client (the backend system), has requested that table at all.
2579  *
2580  * \in funcHandle A function module data container (usually handed to your server function from the RFC library).
2581  * \in *paramName The name of a parameter of this function module.
2582  * \out *isActive 1 = is active, 0 = is not active.
2583  * \out *errorInfo Error information in case something goes wrong (e.g. a parameter of that name does not exist).
2584  * \return RFC_RC
2585  */
2586  DECL_EXP RFC_RC SAP_API RfcIsParameterActive(RFC_FUNCTION_HANDLE funcHandle, SAP_UC const* paramName, int *isActive, RFC_ERROR_INFO* errorInfo);
2587 
2588  /**
2589  * \brief Creates a data container for a structure.
2590  * \ingroup container
2591  *
2592  *
2593  * \in typeDescHandle The metadata description (blueprint) for the structure to be created.
2594  * \out *errorInfo Error information in case the parameters are incorrect or there's not enough memory.
2595  * \return A handle to the structure.
2596  */
2598 
2599  /**
2600  * \brief Clones a sructure including the data in it.
2601  * \ingroup container
2602  *
2603  *
2604  * \in srcStructureHandle The structure to clone.
2605  * \out *errorInfo Not enough memory?
2606  * \return A handle to the newly created copy of the input structure.
2607  */
2608  DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcCloneStructure(RFC_STRUCTURE_HANDLE srcStructureHandle, RFC_ERROR_INFO* errorInfo);
2609 
2610  /**
2611  * \brief Releases all memory for a particular structure
2612  * \ingroup container
2613  *
2614  * \warning Do not call this function on structures, which you have obtained from another data container
2615  * (e.g. a function module) via RfcGetStructure(). In that case the memory will be released, when the
2616  * parent container will be destroyed. If you destroy a child structure separately, you will get a
2617  * segmentation fault, when the parent structure is destroyed!
2618  *
2619  * \in structHandle Structure to release.
2620  * \out *errorInfo Not much that can go wrong here.
2621  * \return RFC_RC
2622  */
2623  DECL_EXP RFC_RC SAP_API RfcDestroyStructure(RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO* errorInfo);
2624 
2625  /**
2626  * \brief Creates a data container for a table.
2627  * \ingroup container
2628  *
2629  *
2630  * \in typeDescHandle The metadata description (blueprint) for the line type of the table to be created.
2631  * \out *errorInfo More details in case there was an invalid parameter or not enough memory.
2632  * \return The freshly created table.
2633  */
2634  DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCreateTable(RFC_TYPE_DESC_HANDLE typeDescHandle, RFC_ERROR_INFO* errorInfo);
2635 
2636  /**
2637  * \brief Clones a table including all the data in it. (Use with care...)
2638  * \ingroup container
2639  *
2640  *
2641  * \in srcTableHandle The table to duplicate.
2642  * \out *errorInfo In case there is not enough memory.
2643  * \return A handle to the cloned table.
2644  */
2645  DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCloneTable(RFC_TABLE_HANDLE srcTableHandle, RFC_ERROR_INFO* errorInfo);
2646 
2647  /**
2648  * \brief Releases the memory of a table and all its lines.
2649  * \ingroup container
2650  *
2651  * \warning Be careful: if you still have a reference to a certain table line (an RFC_STRUCTURE_HANDLE you got
2652  * from RfcGetCurrentRow() / RfcAppendNewRow() / RfcInsertNewRow()), this handle will be invalid after %RfcDestroyTable()!
2653  * Using a handle to a table line after the table has been destroyed, will lead to a segmentation fault.
2654  *
2655  * \in tableHandle The table to release.
2656  * \out *errorInfo Nothing can go wrong here...
2657  * \return RFC_RC
2658  */
2659  DECL_EXP RFC_RC SAP_API RfcDestroyTable(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2660 
2661  /**
2662  * \brief Returns the table row, on which the "table cursor" is currently positioned.
2663  * \ingroup container
2664  *
2665  * \note that the rows are numbered from 0 to n-1, not from 1 to n, as it's done in ABAP.
2666  *
2667  * \in tableHandle The table to read data from.
2668  * \out *errorInfo If the table cursor is not on a valid position.
2669  * \return A handle to the current row.
2670  * \warning Do not destroy the returned RFC_STRUCTURE_HANDLE.
2671  */
2673 
2674  /**
2675  * \brief Appends a new empty row at the end of the table and moves the table cursor to that row.
2676  * \ingroup container
2677  *
2678  *
2679  * \in tableHandle The table to enlarge.
2680  * \out *errorInfo More information in case of errors (e.g. not enough memory).
2681  * \return A handle to the newly created row.
2682  */
2684 
2685  /**
2686  * \brief Reserves memory without changing the size of a table so that new rows can be appended without new memory allocation.
2687  * \ingroup container
2688  *
2689  *
2690  * \in tableHandle The table to enlarge.
2691  * \in numRows Number of rows to reserve.
2692  * \out *errorInfo More information in case of errors (e.g. not enough memory).
2693  * \return RFC_OK, RFC_INVALID_HANDLE or RFC_MEMORY_INSUFFICIENT.
2694  */
2695  DECL_EXP RFC_RC SAP_API RfcReserveCapacity(RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO* errorInfo);
2696 
2697  /**
2698  * \brief Appends a set of new empty rows at the end of the table and moves the table cursor to the first new row.
2699  * \ingroup container
2700  *
2701  *
2702  * \in tableHandle The table to enlarge.
2703  * \in numRows Number of rows to add.
2704  * \out *errorInfo More information in case of errors (e.g. not enough memory).
2705  * \return RFC_OK, RFC_INVALID_HANDLE or RFC_MEMORY_INSUFFICIENT.
2706  */
2707  DECL_EXP RFC_RC SAP_API RfcAppendNewRows(RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO* errorInfo);
2708 
2709  /**
2710  * \brief Inserts a new empty row at the current position of the table cursor.
2711  * \ingroup container
2712  *
2713  * The row, on which the table cursor is currently positioned, and all following rows are moved
2714  * one index "down". E.g. if the table currently has rows nos 0 - n-1 and the cursor points to row i,
2715  * then the rows i - n-1 are moved to positions i+1 - n, and the new row is inserted at position i.
2716  *
2717  *
2718  * \in tableHandle The table to enlarge.
2719  * \out *errorInfo More information in case of errors (e.g. not enough memory).
2720  * \return A handle to the newly created row.
2721  */
2723 
2724  /**
2725  * \brief Appends an existing row to the end of the table and moves the table cursor to that row.
2726  * \ingroup container
2727  *
2728  *
2729  * \in tableHandle The table to enlarge.
2730  * \in structHandle The row to append to the table.
2731  * \out *errorInfo More information in case something goes wrong (e.g. the line types of the table and the structure don't match).
2732  * \return RFC_RC
2733  */
2734  DECL_EXP RFC_RC SAP_API RfcAppendRow(RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO* errorInfo);
2735 
2736  /**
2737  * \brief Inserts an existing row at the current position of the table cursor.
2738  * \ingroup container
2739  *
2740  * The row, on which the table cursor is currently positioned, and all following rows are moved
2741  * one index "down". E.g. if the table currently has rows nos 0 - n-1 and the cursor points to row i,
2742  * then the rows i - n-1 are moved to positions i+1 - n, and the given row is inserted at position i.
2743  *
2744  *
2745  * \in tableHandle The table to enlarge.
2746  * \in structHandle The row to insert into the table.
2747  * \out *errorInfo More information in case something goes wrong (e.g. the line types of the table and the structure don't match).
2748  * \return RFC_RC
2749  */
2750  DECL_EXP RFC_RC SAP_API RfcInsertRow(RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO* errorInfo);
2751 
2752  /**
2753  * \brief Deletes the row, on which the table cursor is currently positioned.
2754  * \ingroup container
2755  *
2756  * If the row cursor is currently at an index i between 0 - n-2, then row i will be deleted and the
2757  * rows i+1 - n-1 will be moved on index "up", e.g. will now be rows i - n-2. The table cursor will
2758  * remain fixed at index i.\n
2759  * If the cursor is currently on the last row (n-1), then that row will be deleted, all other position
2760  * will remain unchanged, and the table cursor will move up to n-2 (the new last row of the table).
2761  *
2762  *
2763  * \in tableHandle The table from which to delete a row.
2764  * \out *errorInfo Error information in case the table cursor is not on a valid position.
2765  * \return RFC_RC
2766  */
2767  DECL_EXP RFC_RC SAP_API RfcDeleteCurrentRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2768 
2769  /**
2770  * \brief Deletes all rows from the table.
2771  * \ingroup container
2772  *
2773  *
2774  * \in tableHandle The table to clear.
2775  * \out *errorInfo Not much that can go wrong here (except an invalid table handle).
2776  * \return RFC_RC
2777  */
2778  DECL_EXP RFC_RC SAP_API RfcDeleteAllRows(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2779 
2780  /**
2781  * \brief Positions the table cursor at the first row (or at index "-1", if the table is empty).
2782  * \ingroup container
2783  *
2784  *
2785  * \in tableHandle A table.
2786  * \out *errorInfo Not much that can go wrong here (except an invalid table handle).
2787  * \return RFC_RC
2788  */
2789  DECL_EXP RFC_RC SAP_API RfcMoveToFirstRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2790 
2791  /**
2792  * \brief Positions the table cursor at the last row (or at index "-1", if the table is empty).
2793  * \ingroup container
2794  *
2795  *
2796  * \in tableHandle A table.
2797  * \out *errorInfo Not much that can go wrong here (except an invalid table handle).
2798  * \return RFC_RC
2799  */
2800  DECL_EXP RFC_RC SAP_API RfcMoveToLastRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2801 
2802  /**
2803  * \brief Increments the table cursor by one.
2804  * \ingroup container
2805  *
2806  *
2807  * \in tableHandle A table.
2808  * \out *errorInfo Not much that can go wrong here (except an invalid table handle).
2809  * \return RFC_RC
2810  */
2811  DECL_EXP RFC_RC SAP_API RfcMoveToNextRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2812 
2813  /**
2814  * \brief Decrements the table cursor by one.
2815  * \ingroup container
2816  *
2817  *
2818  * \in tableHandle A table.
2819  * \out *errorInfo Not much that can go wrong here (except an invalid table handle).
2820  * \return RFC_RC
2821  */
2822  DECL_EXP RFC_RC SAP_API RfcMoveToPreviousRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2823 
2824  /**
2825  * \brief Sets the table cursor to a specific index.
2826  * \ingroup container
2827  *
2828  *
2829  * \in tableHandle A table.
2830  * \in index The index to which to move the cursor.
2831  * \out *errorInfo Index out of bounds or invalid table handle.
2832  * \return RFC_RC
2833  */
2834  DECL_EXP RFC_RC SAP_API RfcMoveTo(RFC_TABLE_HANDLE tableHandle, unsigned index, RFC_ERROR_INFO* errorInfo);
2835 
2836  /**
2837  * \brief Returns the number of rows in a table.
2838  * \ingroup container
2839  *
2840  *
2841  * \in tableHandle A table.
2842  * \out *rowCount The number of rows in the table.
2843  * \out *errorInfo Not much that can go wrong.
2844  * \return RFC_RC
2845  */
2846  DECL_EXP RFC_RC SAP_API RfcGetRowCount(RFC_TABLE_HANDLE tableHandle, unsigned* rowCount, RFC_ERROR_INFO* errorInfo);
2847 
2848  /**
2849  * \brief Returns a type description handle describing the line type (metadata) of this table.
2850  * \ingroup container
2851  *
2852  *
2853  * \in tableHandle A table.
2854  * \out *errorInfo Not much that can go wrong.
2855  * \return A type description handle that provides information about this table's fields (for each field: fieldname, the field's datatype, length, offset, etc.)
2856  */
2857  DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetRowType(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO* errorInfo);
2858 
2859  /**
2860  * \brief Creates an ABAP object handle with the given class description handle.
2861  * \ingroup container
2862  *
2863  * \in classDescHandle class description handle.
2864  * \out *errorInfo Contains more information, for example if memory runs out (code = RFC_MEMORY_INSUFFICIENT).
2865  * \return A handle to the created ABAP object.
2866  */
2868 
2869  /**
2870  * \brief Destroys an ABAP object handle.
2871  * \ingroup container
2872  *
2873  * \in objHandle ABAP object handle to be destroyed.
2874  * \out *errorInfo Should always return successfully.
2875  * \return RFC_RC
2876  */
2878 
2879 
2880  /* ****************************************************************************
2881  *
2882  * API for accessing the fields of a data container
2883  *
2884  * API for reading the exporting parameters of an RFC_FUNCTION_HANDLE in the
2885  * client case, the importing parameters of an RFC_FUNCTION_HANDLE in the
2886  * server case and the fields of an RFC_STRUCTURE_HANDLE or RFC_TABLE_HANDLE.
2887  * ****************************************************************************/
2888 
2889  /**
2890  * \brief Returns the value of the specified field as char array.
2891  * \ingroup container
2892  *
2893  * The charBuffer will be filled with a string representation of the given field. The remaining
2894  * places in the buffer will be filled with trailing spaces. In case the buffer is too small,
2895  * the function will return RFC_BUFFER_TOO_SMALL. The result will not be null-terminated.
2896  *
2897  * The field specified by name needs to be of one of the following data types. If the field
2898  * has one of the listed non-char-like data types, the RFC library will convert the field value
2899  * to string format. Example:\n
2900  * If "name" specifies a field of type INT4 with the value 4711 and charBuffer is an SAP_CHAR[10],
2901  * then the buffer will be filled as follows: "4711 ".
2902  *
2903  * \note If the target field has type BYTE or XSTRING, the bytes will be
2904  * converted to a hex encoded string representation.
2905  *
2906  * - RFCTYPE_CHAR
2907  * - RFCTYPE_STRING
2908  * - RFCTYPE_NUM
2909  * - RFCTYPE_DATE
2910  * - RFCTYPE_TIME
2911  * - RFCTYPE_INTx
2912  * - RFCTYPE_FLOAT
2913  * - RFCTYPE_BCD
2914  * - RFCTYPE_DECFxx
2915  * - RFCTYPE_BYTE
2916  * - RFCTYPE_XSTRING
2917  * - RFCTYPE_UTCLONG
2918  *
2919  *
2920  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
2921  * is a table handle, the function will read the field value of the current row.
2922  * \in *name The name of the field.
2923  * \out *charBuffer A pre-allocated buffer, which will receive the (converted) field value.
2924  * \in bufferLength Size of the buffer in RFC_CHARs.
2925  * \out *errorInfo Field doesn't exist, cannot be converted to char, etc.
2926  * \return RFC_RC
2927  */
2928  DECL_EXP RFC_RC SAP_API RfcGetChars(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
2929 
2930  /**
2931  * \brief Returns the value of the specified field as char array.
2932  * \ingroup container
2933  *
2934  * This function works exactly like RfcGetChars(), the difference being that the field is
2935  * addressed by its index within the structure/table/function module. The first field has index 0,
2936  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
2937  *
2938  *
2939  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
2940  * is a table handle, the function will read the field value of the current row.
2941  * \in index The index of the field.
2942  * \out *charBuffer A pre-allocated buffer, which will receive the (converted) field value.
2943  * \in bufferLength Size of the buffer in RFC_CHARs.
2944  * \out *errorInfo Field doesn't exist, cannot be converted to char, etc.
2945  * \return RFC_RC
2946  */
2947  DECL_EXP RFC_RC SAP_API RfcGetCharsByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
2948 
2949  /**
2950  * \brief Returns the value of the specified field as num-char array (digits only).
2951  * \ingroup container
2952  *
2953  * The charBuffer will be filled with a string representation of the field (from right to left).
2954  * The remaining places in the buffer will be filled with leading zero digits. In case
2955  * the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. The result is not
2956  * null-terminated.
2957  *
2958  * The field specified by name needs to be of one of the following data types. If the field
2959  * has one of the listed non-char-like data types, the RFC library will convert the field value
2960  * to string format. Example:\n
2961  * If "name" specifies a field of type INT4 with the value 4711 and charBuffer is an SAP_CHAR[10],
2962  * then the buffer will be filled as follows: "0000004711".
2963  *
2964  * - RFCTYPE_CHAR
2965  * - RFCTYPE_STRING
2966  * - RFCTYPE_NUM
2967  * - RFCTYPE_DATE
2968  * - RFCTYPE_TIME
2969  * - RFCTYPE_INTx
2970  *
2971  *
2972  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
2973  * is a table handle, the function will read the field value of the current row.
2974  * \in *name The name of the field.
2975  * \out *charBuffer A pre-allocated buffer, which will receive the (converted) field value.
2976  * \in bufferLength Size of the buffer in RFC_CHARs.
2977  * \out *errorInfo Field doesn't exist, cannot be converted to numc, etc.
2978  * \return RFC_RC
2979  */
2980  DECL_EXP RFC_RC SAP_API RfcGetNum(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
2981 
2982  /**
2983  * \brief Returns the value of the specified field as num-char array (digits only).
2984  * \ingroup container
2985  *
2986  * This function works exactly like RfcGetNum(), the difference being that the field is
2987  * addressed by its index within the structure/table/function module. The first field has index 0,
2988  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
2989  *
2990  *
2991  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
2992  * is a table handle, the function will read the field value of the current row.
2993  * \in index The index of the field.
2994  * \out *charBuffer A pre-allocated buffer, which will receive the (converted) field value.
2995  * \in bufferLength Size of the buffer in RFC_CHARs.
2996  * \out *errorInfo Field doesn't exist, cannot be converted to numc, etc.
2997  * \return RFC_RC
2998  */
2999  DECL_EXP RFC_RC SAP_API RfcGetNumByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
3000 
3001  /**
3002  * \brief Reads a DATE field.
3003  * \ingroup container
3004  *
3005  *
3006  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3007  * is a table handle, the function will read the field value of the current row.
3008  * \in *name The name of the field to read. The field must be of type RFCTYPE_DATE.
3009  * \out emptyDate An RFC_DATE object, which will receive the field value.
3010  * \out *errorInfo More information in case something goes wrong.
3011  * \return RFC_RC
3012  */
3013  DECL_EXP RFC_RC SAP_API RfcGetDate(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_DATE emptyDate, RFC_ERROR_INFO* errorInfo);
3014 
3015  /**
3016  * \brief Reads a DATE field.
3017  * \ingroup container
3018  *
3019  * This function works exactly like RfcGetDate(), the difference being that the field is
3020  * addressed by its index within the structure/table/function module. The first field has index 0,
3021  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3022  *
3023  *
3024  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3025  * is a table handle, the function will read the field value of the current row.
3026  * \in index The index of the field to read. The field must be of type RFCTYPE_DATE.
3027  * \out emptyDate An RFC_DATE object, which will receive the field value.
3028  * \out *errorInfo More information in case something goes wrong.
3029  * \return RFC_RC
3030  */
3031  DECL_EXP RFC_RC SAP_API RfcGetDateByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DATE emptyDate, RFC_ERROR_INFO* errorInfo);
3032 
3033  /**
3034  * \brief Reads a TIME field.
3035  * \ingroup container
3036  *
3037  *
3038  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3039  * is a table handle, the function will read the field value of the current row.
3040  * \in *name The name of the field to read. The field must be of type RFCTYPE_TIME.
3041  * \out emptyTime An RFC_TIME object, which will receive the field value.
3042  * \out *errorInfo More information in case something goes wrong.
3043  * \return RFC_RC
3044  */
3045  DECL_EXP RFC_RC SAP_API RfcGetTime(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_TIME emptyTime, RFC_ERROR_INFO* errorInfo);
3046 
3047  /**
3048  * \brief Reads a TIME field.
3049  * \ingroup container
3050  *
3051  * This function works exactly like RfcGetTime(), the difference being that the field is
3052  * addressed by its index within the structure/table/function module. The first field has index 0,
3053  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3054  *
3055  *
3056  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3057  * is a table handle, the function will read the field value of the current row.
3058  * \in index The index of the field to read. The field must be of type RFCTYPE_TIME.
3059  * \out emptyTime An RFC_TIME object, which will receive the field value.
3060  * \out *errorInfo More information in case something goes wrong.
3061  * \return RFC_RC
3062  */
3063  DECL_EXP RFC_RC SAP_API RfcGetTimeByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TIME emptyTime, RFC_ERROR_INFO* errorInfo);
3064 
3065  /**
3066  * \brief Returns the value of the specified field as null-terminated string.
3067  * \ingroup container
3068  *
3069  * The charBuffer will be filled with a null-terminated string representation of the field value.
3070  * In case the buffer is too small, e.g. no place for string termination, the function will
3071  * return RFC_BUFFER_TOO_SMALL. stringLength contains the number of written characters, or the
3072  * required number of characters in case RFC_BUFFER_TOO_SMALL was thrown.
3073  * The result will be null-terminated.
3074  *
3075  * The field specified by name needs to be of one of the following data types. If the field
3076  * has one of the listed non-char-like data types, the RFC library will convert the field value
3077  * to string format. Example:\n
3078  * If "name" specifies a field of type INT4 with the value 4711 and stringBuffer is an SAP_UC[10],
3079  * then the buffer will be filled as follows: "4711\0xxxxx". (x: left unchanged.)
3080  *
3081  * \note If the target field has type BYTE or XSTRING, the bytes will be
3082  * converted to a hex encoded string representation.
3083  *
3084  * - RFCTYPE_CHAR
3085  * - RFCTYPE_STRING
3086  * - RFCTYPE_NUM
3087  * - RFCTYPE_DATE
3088  * - RFCTYPE_TIME
3089  * - RFCTYPE_INTx
3090  * - RFCTYPE_FLOAT
3091  * - RFCTYPE_BCD
3092  * - RFCTYPE_DECFxx
3093  * - RFCTYPE_BYTE
3094  * - RFCTYPE_XSTRING
3095  * - RFCTYPE_UTCLONG
3096  *
3097  *
3098  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3099  * is a table handle, the function will read the field value of the current row.
3100  * \in *name The name of the field to read.
3101  * \out *stringBuffer Pre-allocated buffer, which will receive the (converted) field value.
3102  * \in bufferLength Size of the buffer in SAP_UC.
3103  * \out *stringLength Always returns the string's length, no matter whether the stringBuffer had
3104  * been large enough or not. (Note that if you want to try again after an RFC_BUFFER_TOO_SMALL,
3105  * you need to make the stringBuffer at least *stringLength + 1 in order to account for the terminating null.)
3106  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3107  * \return RFC_RC
3108  */
3109  DECL_EXP RFC_RC SAP_API RfcGetString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, SAP_UC *stringBuffer, unsigned bufferLength, unsigned* stringLength, RFC_ERROR_INFO* errorInfo);
3110 
3111  /**
3112  * \brief Returns the value of the specified field as null-terminated string.
3113  * \ingroup container
3114  *
3115  * This function works exactly like RfcGetString(), the difference being that the field is
3116  * addressed by its index within the structure/table/function module. The first field has index 0,
3117  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3118  *
3119  *
3120  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3121  * is a table handle, the function will read the field value of the current row.
3122  * \in index The index of the field to read.
3123  * \out *stringBuffer Pre-allocated buffer, which will receive the (converted) field value.
3124  * \in bufferLength Size of the buffer in SAP_UC.
3125  * \out *stringLength Always returns the string's length, no matter whether the stringBuffer had
3126  * been large enough or not. (Note that if you want to try again after an RFC_BUFFER_TOO_SMALL,
3127  * you need to make the stringBuffer at least *stringLength + 1 in order to account for the termnating null.)
3128  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3129  * \return RFC_RC
3130  */
3131  DECL_EXP RFC_RC SAP_API RfcGetStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_UC *stringBuffer, unsigned bufferLength, unsigned* stringLength, RFC_ERROR_INFO* errorInfo);
3132 
3133  /**
3134  * \brief Returns the value of the specified field as byte array.
3135  * \ingroup container
3136  *
3137  * Should mainly be used with fields of type RAW (RFCTYPE_BYTE), but also works with
3138  * a number of other data types. In case of numerical data types it simply gives the
3139  * binary representation of the value, in case of character data types it gives the
3140  * UTF-16 representation (little endian/big endian, depending on the host platform).
3141  * In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL.
3142  * In case the buffer is longer than the field, it will be filled with 0x00 values.
3143  * Example: The field is of type INT4 and contains the value 4711, byteBuffer is an SAP_RAW[10].
3144  * Then the buffer will be filled as follows: 67 12 00 00 00 00 00 00 00 00 (little endian system)
3145  * or 00 00 12 67 00 00 00 00 00 00 (big endian system).
3146  *
3147  * The field specified by name needs to be of one of the following data types:
3148  * - RFCTYPE_BYTE
3149  * - RFCTYPE_XSTRING
3150  * - RFCTYPE_CHAR
3151  * - RFCTYPE_NUM
3152  * - RFCTYPE_DATE
3153  * - RFCTYPE_TIME
3154  * - RFCTYPE_INTx
3155  * - RFCTYPE_FLOAT
3156  * - RFCTYPE_BCD
3157  * - RFCTYPE_DECFxx
3158  *
3159  *
3160  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3161  * is a table handle, the function will read the field value of the current row.
3162  * \in *name The name of the field to read.
3163  * \out *byteBuffer Pre-allocated buffer, which will receive the (converted) field value.
3164  * \in bufferLength Size of the buffer in bytes.
3165  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3166  * \return RFC_RC
3167  */
3168  DECL_EXP RFC_RC SAP_API RfcGetBytes(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
3169 
3170  /**
3171  * \brief Returns the value of the specified field as byte array.
3172  * \ingroup container
3173  *
3174  * This function works exactly like RfcGetBytes(), the difference being that the field is
3175  * addressed by its index within the structure/table/function module. The first field has index 0,
3176  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3177  *
3178  *
3179  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3180  * is a table handle, the function will read the field value of the current row.
3181  * \in index The index of the field to read.
3182  * \out *byteBuffer Pre-allocated buffer, which will receive the (converted) field value.
3183  * \in bufferLength Size of the buffer in bytes.
3184  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3185  * \return RFC_RC
3186  */
3187  DECL_EXP RFC_RC SAP_API RfcGetBytesByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
3188 
3189  /**
3190  * \brief Returns the value of the specified field as byte array.
3191  * \ingroup container
3192  *
3193  * In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL.
3194  * xstringLength contains the number of written bytes, or the required number of bytes
3195  * in case of RFC_BUFFER_TOO_SMALL.
3196  * The remaining buffer won't be changed.
3197  *
3198  * Example: The field is of type INT4 and contains the value 4711, byteBuffer is an SAP_RAW[10].
3199  * Then the buffer will be filled as follows: 67 12 00 00 x x x x x x (little endian system)
3200  * or 00 00 12 67 x x x x x x (big endian system). (x: unchanged) In both cases *xstringLength
3201  * will be 4.
3202  *
3203  * The field specified by name needs to be of one of the following data types:
3204  * - RFCTYPE_BYTE
3205  * - RFCTYPE_XSTRING
3206  * - RFCTYPE_CHAR
3207  * - RFCTYPE_NUM
3208  * - RFCTYPE_DATE
3209  * - RFCTYPE_TIME
3210  * - RFCTYPE_INTx
3211  * - RFCTYPE_FLOAT
3212  * - RFCTYPE_BCD
3213  * - RFCTYPE_DECFxx
3214  *
3215  *
3216  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3217  * is a table handle, the function will read the field value of the current row.
3218  * \in *name The name of the field to read.
3219  * \out *byteBuffer Pre-allocated buffer, which will receive the (converted) field value.
3220  * \in bufferLength Size of the buffer in bytes.
3221  * \out *xstringLength Byte length of the result (in both cases, no matter whether the byteBuffer had
3222  * been large enough or not).
3223  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3224  * \return RFC_RC
3225  */
3226  DECL_EXP RFC_RC SAP_API RfcGetXString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned* xstringLength, RFC_ERROR_INFO* errorInfo);
3227 
3228  /**
3229  * \brief Returns the value of the specified field as byte array.
3230  * \ingroup container
3231  *
3232  * This function works exactly like RfcGetXString(), the difference being that the field is
3233  * addressed by its index within the structure/table/function module. The first field has index 0,
3234  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3235  *
3236  *
3237  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3238  * is a table handle, the function will read the field value of the current row.
3239  * \in index The index of the field to read.
3240  * \out *byteBuffer Pre-allocated buffer, which will receive the (converted) field value.
3241  * \in bufferLength Size of the buffer in bytes.
3242  * \out *xstringLength Byte length of the result (in both cases, no matter whether the byteBuffer had
3243  * been large enough or not).
3244  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3245  * \return RFC_RC
3246  */
3247  DECL_EXP RFC_RC SAP_API RfcGetXStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned* xstringLength, RFC_ERROR_INFO* errorInfo);
3248 
3249  /**
3250  * \brief Returns the value of the specified field as RFC_INT (signed).
3251  * \ingroup container
3252  *
3253  * If the field is a character type, an "atoi-like" conversion is performed. If the field is of type
3254  * RFCTYPE_BYTE/RFCTYPE_XSTRING, this function interprets the bytes in big-endian byte order when
3255  * converting them to int. Note that in this case the byte length of the field value must not exceed 4!
3256  *
3257  * The field specified by name needs to be of one of the following data types:
3258  * <ul>
3259  * <li>RFCTYPE_INT8
3260  * <li>RFCTYPE_INT
3261  * <li>RFCTYPE_INT2
3262  * <li>RFCTYPE_INT1
3263  * <li>RFCTYPE_BYTE is interpreted as big endian sequence of an int
3264  * <li>RFCTYPE_XSTRING is interpreted as big endian sequence of an int
3265  * <li>RFCTYPE_CHAR
3266  * <li>RFCTYPE_NUM
3267  * <li>RFCTYPE_STRING
3268  * </ul>
3269  *
3270  *
3271  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3272  * is a table handle, the function will read the field value of the current row.
3273  * \in *name The name of the field to read.
3274  * \out *value The (converted) integer value.
3275  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3276  * \return RFC_RC
3277  */
3278 
3279  DECL_EXP RFC_RC SAP_API RfcGetInt(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_INT *value, RFC_ERROR_INFO* errorInfo);
3280 
3281  /**
3282  * \brief Returns the value of the specified field as RFC_INT (signed).
3283  * \ingroup container
3284  *
3285  * This function works exactly like RfcGetInt(), the difference being that the field is
3286  * addressed by its index within the structure/table/function module. The first field has index 0,
3287  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3288  *
3289  *
3290  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3291  * is a table handle, the function will read the field value of the current row.
3292  * \in index The index of the field to read.
3293  * \out *value The (converted) integer value.
3294  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3295  * \return RFC_RC
3296  */
3297  DECL_EXP RFC_RC SAP_API RfcGetIntByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT *value, RFC_ERROR_INFO* errorInfo);
3298 
3299  /**
3300  * \brief Returns the value of a field as an unsigned one byte integer.
3301  * \ingroup container
3302  *
3303  * The current field value must not be bigger than 255, otherwise you'll get an RFC_CONVERSION_ERROR.
3304  * If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1 byte.
3305  *
3306  * The field specified by name needs to be of one of the following data types:
3307  * <ul>
3308  * <li>RFCTYPE_INT8
3309  * <li>RFCTYPE_INT
3310  * <li>RFCTYPE_INT2
3311  * <li>RFCTYPE_INT1
3312  * <li>RFCTYPE_BYTE
3313  * <li>RFCTYPE_XSTRING
3314  * </ul>
3315  *
3316  *
3317  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3318  * is a table handle, the function will read the field value of the current row.
3319  * \in *name The name of the field to read.
3320  * \out *value The (converted) integer value.
3321  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3322  * \return RFC_RC
3323  */
3324  DECL_EXP RFC_RC SAP_API RfcGetInt1(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_INT1 *value, RFC_ERROR_INFO* errorInfo);
3325 
3326  /**
3327  * \brief Returns the value of a field as an unsigned one byte integer.
3328  * \ingroup container
3329  *
3330  * This function works exactly like RfcGetInt1(), the difference being that the field is
3331  * addressed by its index within the structure/table/function module. The first field has index 0,
3332  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3333  *
3334  *
3335  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3336  * is a table handle, the function will read the field value of the current row.
3337  * \in index The index of the field to read.
3338  * \out *value The (converted) integer value.
3339  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3340  * \return RFC_RC
3341  */
3342  DECL_EXP RFC_RC SAP_API RfcGetInt1ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT1 *value, RFC_ERROR_INFO* errorInfo);
3343 
3344  /**
3345  * \brief Returns the field value as a signed two byte integer.
3346  * \ingroup container
3347  *
3348  * The current field value must be between -32768 and 32767, otherwise you'll get an RFC_CONVERSION_ERROR.
3349  * If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1 or 2 bytes.
3350  *
3351  * The field specified by name needs to be of one of the following data types:
3352  * <ul>
3353  * <li>RFCTYPE_INT8
3354  * <li>RFCTYPE_INT
3355  * <li>RFCTYPE_INT2
3356  * <li>RFCTYPE_INT1
3357  * <li>RFCTYPE_BYTE is interpreted as big endian sequence of a short
3358  * <li>RFCTYPE_XSTRING is interpreted as big endian sequence of a short
3359  * </ul>
3360  *
3361  *
3362  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3363  * is a table handle, the function will read the field value of the current row.
3364  * \in *name The name of the field to read.
3365  * \out *value The (converted) integer value.
3366  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3367  * \return RFC_RC
3368  */
3369  DECL_EXP RFC_RC SAP_API RfcGetInt2(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_INT2 *value, RFC_ERROR_INFO* errorInfo);
3370 
3371  /**
3372  * \brief Returns the field value as a signed two byte integer.
3373  * \ingroup container
3374  *
3375  * This function works exactly like RfcGetInt2(), the difference being that the field is
3376  * addressed by its index within the structure/table/function module. The first field has index 0,
3377  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3378  *
3379  *
3380  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3381  * is a table handle, the function will read the field value of the current row.
3382  * \in index The index of the field to read.
3383  * \out *value The (converted) integer value.
3384  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3385  * \return RFC_RC
3386  */
3387  DECL_EXP RFC_RC SAP_API RfcGetInt2ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT2 *value, RFC_ERROR_INFO* errorInfo);
3388 
3389 
3390  /**
3391  * \brief Returns the field value as a signed eight byte integer.
3392  * \ingroup container
3393  *
3394  * If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1, 2, 4 or 8 bytes.
3395  *
3396  * The field specified by name needs to be of one of the following data types:
3397  * - RFCTYPE_INT8
3398  * - RFCTYPE_INT
3399  * - RFCTYPE_INT2
3400  * - RFCTYPE_INT1
3401  * - RFCTYPE_BYTE is interpreted as big endian sequence of a long long
3402  * - RFCTYPE_XSTRING is interpreted as big endian sequence of a long long
3403  * - RFCTYPE_UTCLONG
3404  *
3405  *
3406  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3407  * is a table handle, the function will read the field value of the current row.
3408  * \in *name The name of the field to read.
3409  * \out *value The (converted) integer value.
3410  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3411  * \return RFC_RC
3412  */
3413  DECL_EXP RFC_RC SAP_API RfcGetInt8(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_INT8* value, RFC_ERROR_INFO* errorInfo);
3414 
3415 
3416  /**
3417  * \brief Returns the field value as a signed eight byte integer.
3418  * \ingroup container
3419  *
3420  * This function works exactly like RfcGetInt8(), the difference being that the field is
3421  * addressed by its index within the structure/table/function module. The first field has index 0,
3422  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3423  *
3424  *
3425  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3426  * is a table handle, the function will read the field value of the current row.
3427  * \in index The index of the field to read.
3428  * \out *value The (converted) integer value.
3429  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3430  * \return RFC_RC
3431  */
3432  DECL_EXP RFC_RC SAP_API RfcGetInt8ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT8* value, RFC_ERROR_INFO* errorInfo);
3433 
3434  /**
3435  * \brief Returns the value of the given field as an RFC_FLOAT.
3436  * \ingroup container
3437  *
3438  * The field specified by name needs to be of one of the following data types:
3439  * - RFCTYPE_FLOAT
3440  * - RFCTYPE_BCD
3441  *
3442  *
3443  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3444  * is a table handle, the function will read the field value of the current row.
3445  * \in *name The name of the field to read.
3446  * \out *value The floating point value.
3447  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3448  * \return RFC_RC
3449  */
3450  DECL_EXP RFC_RC SAP_API RfcGetFloat(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_FLOAT *value, RFC_ERROR_INFO* errorInfo);
3451 
3452  /**
3453  * \brief Returns the value of the given field as an RFC_FLOAT.
3454  * \ingroup container
3455  *
3456  * This function works exactly like RfcGetFloat(), the difference being that the field is
3457  * addressed by its index within the structure/table/function module. The first field has index 0,
3458  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3459  *
3460  *
3461  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3462  * is a table handle, the function will read the field value of the current row.
3463  * \in index The index of the field to read.
3464  * \out *value The floating point value.
3465  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3466  * \return RFC_RC
3467  */
3468  DECL_EXP RFC_RC SAP_API RfcGetFloatByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_FLOAT *value, RFC_ERROR_INFO* errorInfo);
3469 
3470  /**
3471  * \brief Returns the field as an 8 byte IEEE 754r decimal floating point.
3472  * \ingroup container
3473  *
3474  * See the header sapdecf.h for how to work with RFC_DECF16 objects. If the field has a binary
3475  * data type, its field length needs to be 8 bytes.
3476  *
3477  * The field specified by name needs to be of one of the following data types:
3478  * - RFCTYPE_DECF16
3479  * - RFCTYPE_DECF34
3480  * - RFCTYPE_FLOAT
3481  * - RFCTYPE_BCD
3482  * - RFCTYPE_INT8
3483  * - RFCTYPE_INT
3484  * - RFCTYPE_INT2
3485  * - RFCTYPE_INT1
3486  * - RFCTYPE_CHAR
3487  * - RFCTYPE_NUM
3488  * - RFCTYPE_STRING
3489  * - RFCTYPE_BYTE is interpreted as IEEE 754r format
3490  * - RFCTYPE_XSTRING is interpreted as IEEE 754r format
3491  *
3492  *
3493  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3494  * is a table handle, the function will read the field value of the current row.
3495  * \in *name The name of the field to read.
3496  * \out *value The (converted) decimal floating point value.
3497  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3498  * \return RFC_RC
3499  */
3500  DECL_EXP RFC_RC SAP_API RfcGetDecF16(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_DECF16 *value, RFC_ERROR_INFO* errorInfo);
3501 
3502  /**
3503  * \brief Returns the field as an 8 byte IEEE 754r decimal floating point.
3504  * \ingroup container
3505  *
3506  * This function works exactly like RfcGetDecF16(), the difference being that the field is
3507  * addressed by its index within the structure/table/function module. The first field has index 0,
3508  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3509  *
3510  *
3511  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3512  * is a table handle, the function will read the field value of the current row.
3513  * \in index The index of the field to read.
3514  * \out *value The (converted) decimal floating point value.
3515  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3516  * \return RFC_RC
3517  */
3518  DECL_EXP RFC_RC SAP_API RfcGetDecF16ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF16 *value, RFC_ERROR_INFO* errorInfo);
3519 
3520  /**
3521  * \brief Returns the field as a 16 byte IEEE 754r decimal floating point.
3522  * \ingroup container
3523  *
3524  * See the header sapdecf.h for how to work with RFC_DECF16 objects. If the field has a binary
3525  * data type, its field length needs to be 16 bytes.
3526  *
3527  * The field specified by name needs to be of one of the following data types:
3528  * - RFCTYPE_DECF16
3529  * - RFCTYPE_DECF34
3530  * - RFCTYPE_FLOAT
3531  * - RFCTYPE_BCD
3532  * - RFCTYPE_INT8
3533  * - RFCTYPE_INT
3534  * - RFCTYPE_INT2
3535  * - RFCTYPE_INT1
3536  * - RFCTYPE_CHAR
3537  * - RFCTYPE_NUM
3538  * - RFCTYPE_STRING
3539  * - RFCTYPE_BYTE is interpreted as IEEE 754r format
3540  * - RFCTYPE_XSTRING is interpreted as IEEE 754r format
3541  *
3542  *
3543  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3544  * is a table handle, the function will read the field value of the current row.
3545  * \in *name The name of the field to read.
3546  * \out *value The (converted) decimal floating point value.
3547  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3548  * \return RFC_RC
3549  */
3550  DECL_EXP RFC_RC SAP_API RfcGetDecF34(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_DECF34 *value, RFC_ERROR_INFO* errorInfo);
3551 
3552  /**
3553  * \brief Returns the field as a 16 byte IEEE 754r decimal floating point.
3554  * \ingroup container
3555  *
3556  * This function works exactly like RfcGetDecF34(), the difference being that the field is
3557  * addressed by its index within the structure/table/function module. The first field has index 0,
3558  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3559  *
3560  *
3561  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3562  * is a table handle, the function will read the field value of the current row.
3563  * \in index The index of the field to read.
3564  * \out *value The (converted) decimal floating point value.
3565  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3566  * \return RFC_RC
3567  */
3568  DECL_EXP RFC_RC SAP_API RfcGetDecF34ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF34 *value, RFC_ERROR_INFO* errorInfo);
3569 
3570  /**
3571  * \brief Returns a handle to a structure.
3572  * \ingroup container
3573  *
3574  * The field specified by name must be of type RFCTYPE_STRUCTURE. If that field has not yet
3575  * been accessed/filled previously, a new empty structure is created from the metadata of the
3576  * parent data container ("dataHandle") and returned.
3577  * \warning The memory of that data container will be released, when the parent container gets
3578  * destroyed. So don't destroy the returned structure handle, nor continue to use it, after the
3579  * parent has been destroyed!
3580  *
3581  *
3582  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3583  * is a table handle, the function will read the field value of the current row.
3584  * \in *name The name of the field to read.
3585  * \out *structHandle A handle to the sub-structure.
3586  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3587  * \return RFC_RC
3588  */
3589  DECL_EXP RFC_RC SAP_API RfcGetStructure(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_STRUCTURE_HANDLE* structHandle, RFC_ERROR_INFO* errorInfo);
3590 
3591  /**
3592  * \brief Returns a handle to a structure.
3593  * \ingroup container
3594  *
3595  * This function works exactly like RfcGetStructure(), the difference being that the field is
3596  * addressed by its index within the structure/table/function module. The first field has index 0,
3597  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3598  *
3599  *
3600  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3601  * is a table handle, the function will read the field value of the current row.
3602  * \in index The index of the field to read.
3603  * \out *structHandle A handle to the sub-structure.
3604  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3605  * \return RFC_RC
3606  */
3607  DECL_EXP RFC_RC SAP_API RfcGetStructureByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_STRUCTURE_HANDLE* structHandle, RFC_ERROR_INFO* errorInfo);
3608 
3609  /**
3610  * \brief Returns the entire structure value as a single char buffer.
3611  * \ingroup container
3612  *
3613  * The charBuffer will be filled with the data of the structure as if it were a single char field.
3614  *
3615  * In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL.
3616  * The result will <b>not</b> be null-terminated.
3617  *
3618  * This mimics the way structures have been handled by the classic RFC library librfc32.
3619  * It can conveniently be used for fetching an RFC structure into a C struct, which has been defined
3620  * like in the ABAP DDIC.
3621  * In addition to programming convenience, it should also improve runtime performance compared to fetching
3622  * each single field one-by-one.
3623  *
3624  * This function can only be applied to structures/tables if they contain char-like fields (CHAR, NUMC, DATE, TIME)
3625  * The result will be aligned exactly as on ABAP side, including padding bytes.
3626  *
3627  * \in dataHandle A data container (structure handle or table handle). If dataHandle
3628  * is a table handle, the function will read the structure data of the current row.
3629  * \out *charBuffer Pre-allocated buffer, which will receive the structure value.
3630  * \in bufferLength Size of the buffer in SAP_UC.
3631  * \out *errorInfo More information in case the structure cannot be returned as char buffer.
3632  * \return RFC_RC
3633  */
3634  DECL_EXP RFC_RC SAP_API RfcGetStructureIntoCharBuffer(DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
3635 
3636  /**
3637  * \brief Returns a handle to a table.
3638  * \ingroup container
3639  *
3640  * The field specified by name must be of type RFCTYPE_TABLE. If that field has not yet
3641  * been accessed/filled previously, a new empty structure is created from the metadata of the
3642  * parent data container ("dataHandle") and returned.
3643  * \warning The memory of that data container will be released, when the parent container gets
3644  * destroyed. So don't destroy the returned table handle, nor continue to use it, after the
3645  * parent has been destroyed!
3646  *
3647  *
3648  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3649  * is a table handle, the function will read the field value of the current row.
3650  * \in *name The name of the field to read.
3651  * \out *tableHandle A handle to the sub-table.
3652  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3653  * \return RFC_RC
3654  */
3655  DECL_EXP RFC_RC SAP_API RfcGetTable(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_TABLE_HANDLE* tableHandle, RFC_ERROR_INFO* errorInfo);
3656 
3657  /**
3658  * \brief Returns a handle to a table.
3659  * \ingroup container
3660  *
3661  * This function works exactly like RfcGetTable(), the difference being that the field is
3662  * addressed by its index within the structure/table/function module. The first field has index 0,
3663  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3664  *
3665  *
3666  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3667  * is a table handle, the function will read the field value of the current row.
3668  * \in index The index of the field to read.
3669  * \out *tableHandle A handle to the sub-table.
3670  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3671  * \return RFC_RC
3672  */
3673  DECL_EXP RFC_RC SAP_API RfcGetTableByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TABLE_HANDLE* tableHandle, RFC_ERROR_INFO* errorInfo);
3674 
3675  /**
3676  * \brief Returns a handle to an abap object.
3677  * \ingroup container
3678  *
3679  * The field specified by name must be of type RFCTYPE_ABAPOBJECT. If that field has not yet
3680  * been filled previously, NULL is returned.
3681  * \warning The memory of that data container will be released, when the parent container gets
3682  * destroyed. So don't destroy the returned table handle, nor continue to use it, after the
3683  * parent has been destroyed!
3684  *
3685  *
3686  * \in dataHandle A data container (function handle, structure handle, table handle or object handle). If dataHandle
3687  * is a table handle, the function will read the field value of the current row.
3688  * \in *name The name of the field to read.
3689  * \out *objHandle A handle to the object.
3690  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3691  * \return RFC_RC
3692  */
3693  DECL_EXP RFC_RC SAP_API RfcGetAbapObject(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, RFC_ABAP_OBJECT_HANDLE* objHandle, RFC_ERROR_INFO* errorInfo);
3694 
3695  /**
3696  * \brief Returns a handle to an abap object.
3697  * \ingroup container
3698  *
3699  * This function works exactly like RfcGetAbapObject(), the difference being that the field is
3700  * addressed by its index within the structure/table/function module. The first field has index 0,
3701  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3702  *
3703  *
3704  * \in dataHandle A data container (function handle, structure handle, table handle or object handle). If dataHandle
3705  * is a table handle, the function will read the field value of the current row.
3706  * \in index The index of the field to read.
3707  * \out *objHandle A handle to the object.
3708  * \out *errorInfo Field does not exist, is of wrong type or out of memory.
3709  * \return RFC_RC
3710  */
3711  DECL_EXP RFC_RC SAP_API RfcGetAbapObjectByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_ABAP_OBJECT_HANDLE* objHandle, RFC_ERROR_INFO* errorInfo);
3712 
3713  /**
3714  * \brief Returns the length of the value of a STRING or XSTRING parameter.
3715  * \ingroup container
3716  *
3717  * The field specified by name must be of type RFCTYPE_STRING or RFCTYPE_XSTRING. If that field is
3718  * of type STRING, the returned length is measured in characters, otherwise in bytes.
3719  *
3720  *
3721  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3722  * is a table handle, the function will read the field value of the current row.
3723  * \in *name The name of a STRING or XSTRING field.
3724  * \out *stringLength Length of the current field value.
3725  * \out *errorInfo Wrong field type?
3726  * \return RFC_RC
3727  */
3728  DECL_EXP RFC_RC SAP_API RfcGetStringLength(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, unsigned* stringLength, RFC_ERROR_INFO* errorInfo);
3729 
3730  /**
3731  * \brief Returns the length of the value of a STRING or XSTRING parameter.
3732  * \ingroup container
3733  *
3734  * This function works exactly like RfcGetStringLength(), the difference being that the field is
3735  * addressed by its index within the structure/table/function module. The first field has index 0,
3736  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3737  *
3738  *
3739  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3740  * is a table handle, the function will read the field value of the current row.
3741  * \in index The index of a STRING or XSTRING field.
3742  * \out *stringLength Length of the current field value.
3743  * \out *errorInfo Wrong field type?
3744  * \return RFC_RC
3745  */
3746  DECL_EXP RFC_RC SAP_API RfcGetStringLengthByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, unsigned* stringLength, RFC_ERROR_INFO* errorInfo);
3747 
3748 
3749 
3750  /* *****************************************************************************
3751  *
3752  * API for setting the importing parameters of an RFC_FUNCTION_HANDLE in the
3753  * client case, the exporting parameters of an RFC_FUNCTION_HANDLE in the server
3754  * case and the subfields of an RFC_STRUCTURE_HANDLE or RFC_TABLE_HANDLE.
3755  *
3756  *******************************************************************************/
3757 
3758  /**
3759  * \brief Sets the given char value (charValue/valueLength) into the field.
3760  * \ingroup container
3761  *
3762  * The field specified by name needs to be of one of the following data types:
3763  * - RFCTYPE_CHAR
3764  * - RFCTYPE_STRING
3765  * - RFCTYPE_NUM
3766  * - RFCTYPE_DATE
3767  * - RFCTYPE_TIME
3768  * - RFCTYPE_INTx
3769  * - RFCTYPE_FLOAT
3770  * - RFCTYPE_BCD
3771  * - RFCTYPE_DECFxx
3772  * - RFCTYPE_BYTE
3773  * - RFCTYPE_XSTRING
3774  * - RFCTYPE_UTCLONG
3775  *
3776  * \note If the target field is a numerical type, the RFC library tries to convert the string
3777  * to a number. If the target field has type BYTE or XSTRING, the char value will be interpreted as
3778  * hex encoded string representation of the bytes. Its length needs to be even in that case.\n
3779  * Example: the 8 characters "CAFEBABE" will be converted to 4 bytes 0xCA 0xFE 0xBA 0xBE.
3780  *
3781  * If the value cannot be converted to the desired target type, RFC_CONVERSION_ERROR will be
3782  * returned.
3783  *
3784  *
3785  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3786  * is a table handle, the function will set the field value of the current row.
3787  * \in *name The name of the field to set.
3788  * \in *charValue The characters to write into the field.
3789  * \in valueLength The number of characters to read from charValue.
3790  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3791  * \return RFC_RC
3792  */
3793  DECL_EXP RFC_RC SAP_API RfcSetChars(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3794 
3795  /**
3796  * \brief Sets the given char value (charValue/valueLength) into the field.
3797  * \ingroup container
3798  *
3799  * This function works exactly like RfcSetChars(), the difference being that the field is
3800  * addressed by its index within the structure/table/function module. The first field has index 0,
3801  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3802  *
3803  *
3804  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3805  * is a table handle, the function will set the field value of the current row.
3806  * \in *index The index of the field to set.
3807  * \in *charValue The characters to write into the field.
3808  * \in valueLength The number of characters to read from charValue.
3809  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3810  * \return RFC_RC
3811  */
3812  DECL_EXP RFC_RC SAP_API RfcSetCharsByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3813 
3814  /**
3815  * \brief Sets the value of a NUMC field.
3816  * \ingroup container
3817  *
3818  * The target field needs to be of type RFCTYPE_NUM.
3819  *
3820  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3821  * is a table handle, the function will set the field value of the current row.
3822  * \in *name The name of the field to set.
3823  * \in *charValue The digits [0..9] to write into the field.
3824  * \in valueLength The number of characters to read from charValue.
3825  * \out *errorInfo More information in case the field does not exist or the parameter value is invalid.
3826  * \return RFC_RC
3827  */
3828  DECL_EXP RFC_RC SAP_API RfcSetNum(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3829 
3830  /**
3831  * \brief Sets the value of a NUMC field.
3832  * \ingroup container
3833  *
3834  * This function works exactly like RfcSetNum(), the difference being that the field is
3835  * addressed by its index within the structure/table/function module. The first field has index 0,
3836  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3837  *
3838  *
3839  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3840  * is a table handle, the function will set the field value of the current row.
3841  * \in *index The index of the field to set.
3842  * \in *charValue The digits [0..9] to write into the field.
3843  * \in valueLength The number of characters to read from charValue.
3844  * \out *errorInfo More information in case the field does not exist or the parameter value is invalid.
3845  * \return RFC_RC
3846  */
3847  DECL_EXP RFC_RC SAP_API RfcSetNumByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3848 
3849  /**
3850  * \brief Sets the given string value (stringValue/valueLength) into the field.
3851  * \ingroup container
3852  *
3853  * The field specified by name needs to be of one of the following data types:
3854  * - RFCTYPE_CHAR
3855  * - RFCTYPE_STRING
3856  * - RFCTYPE_NUM
3857  * - RFCTYPE_DATE
3858  * - RFCTYPE_TIME
3859  * - RFCTYPE_INTx
3860  * - RFCTYPE_FLOAT
3861  * - RFCTYPE_BCD
3862  * - RFCTYPE_DECFxx
3863  * - RFCTYPE_BYTE
3864  * - RFCTYPE_XSTRING
3865  * - RFCTYPE_UTCLONG
3866  *
3867  * \note If the target field is a numerical type, the RFC library tries to convert the string
3868  * to a number. If the target field has type BYTE or XSTRING, the char value will be interpreted as
3869  * hex encoded string representation of the bytes. Its length needs to be even in that case.\n
3870  * Example: the 8 characters "CAFEBABE" will be converted to 4 bytes 0xCA 0xFE 0xBA 0xBE.
3871  *
3872  * If the value cannot be converted to the desired target type, RFC_CONVERSION_ERROR will be
3873  * returned.
3874  *
3875  *
3876  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3877  * is a table handle, the function will set the field value of the current row.
3878  * \in *name The name of the field to set.
3879  * \in *stringValue The characters to write into the field.
3880  * \in valueLength The number of characters to read from stringValue.
3881  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3882  * \return RFC_RC
3883  */
3884  DECL_EXP RFC_RC SAP_API RfcSetString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3885 
3886  /**
3887  * \brief Sets the given string value (stringValue/valueLength) into the field.
3888  * \ingroup container
3889  *
3890  * This function works exactly like RfcSetString(), the difference being that the field is
3891  * addressed by its index within the structure/table/function module. The first field has index 0,
3892  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3893  *
3894  *
3895  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3896  * is a table handle, the function will set the field value of the current row.
3897  * \in *index The index of the field to set.
3898  * \in *stringValue The characters to write into the field.
3899  * \in valueLength The number of characters to read from stringValue.
3900  * \out *errorInfo More information in case the field does not exist or a conversion fails.
3901  * \return RFC_RC
3902  */
3903  DECL_EXP RFC_RC SAP_API RfcSetStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
3904 
3905  /**
3906  * \brief Sets the value of a DATE field.
3907  * \ingroup container
3908  *
3909  * The target field needs to be of type RFCTYPE_DATE.
3910  *
3911  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3912  * is a table handle, the function will set the field value of the current row.
3913  * \in *name The name of the field to set.
3914  * \in date The date value to write into the field.
3915  * \out *errorInfo Is the field not of type DATE?
3916  * \return RFC_RC
3917  */
3918  DECL_EXP RFC_RC SAP_API RfcSetDate(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_DATE date, RFC_ERROR_INFO* errorInfo);
3919 
3920  /**
3921  * \brief Sets the value of a DATE field.
3922  * \ingroup container
3923  *
3924  * This function works exactly like RfcSetDate(), the difference being that the field is
3925  * addressed by its index within the structure/table/function module. The first field has index 0,
3926  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3927  *
3928  *
3929  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3930  * is a table handle, the function will set the field value of the current row.
3931  * \in *index The index of the field to set.
3932  * \in date The date value to write into the field.
3933  * \out *errorInfo Is the field not of type DATE?
3934  * \return RFC_RC
3935  */
3936  DECL_EXP RFC_RC SAP_API RfcSetDateByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DATE date, RFC_ERROR_INFO* errorInfo);
3937 
3938  /**
3939  * \brief Sets the value of a TIME field.
3940  * \ingroup container
3941  *
3942  * The target field needs to be of type RFCTYPE_TIME.
3943  *
3944  *
3945  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3946  * is a table handle, the function will set the field value of the current row.
3947  * \in *name The name of the field to set.
3948  * \in time The time value to write into the field.
3949  * \out *errorInfo Is the field not of type TIME?
3950  * \return RFC_RC
3951  */
3952  DECL_EXP RFC_RC SAP_API RfcSetTime(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_TIME time, RFC_ERROR_INFO* errorInfo);
3953 
3954  /**
3955  * \brief Sets the value of a TIME field.
3956  * \ingroup container
3957  *
3958  * This function works exactly like RfcSetTime(), the difference being that the field is
3959  * addressed by its index within the structure/table/function module. The first field has index 0,
3960  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
3961  *
3962  *
3963  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3964  * is a table handle, the function will set the field value of the current row.
3965  * \in *index The index of the field to set.
3966  * \in time The time value to write into the field.
3967  * \out *errorInfo Is the field not of type TIME?
3968  * \return RFC_RC
3969  */
3970  DECL_EXP RFC_RC SAP_API RfcSetTimeByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TIME time, RFC_ERROR_INFO* errorInfo);
3971 
3972  /**
3973  * \brief Sets the given byte value (byteValue/valueLength) into the field.
3974  * \ingroup container
3975  *
3976  * The field specified by name needs to be of one of the following data types:
3977  * - RFCTYPE_BYTE
3978  * - RFCTYPE_XSTRING
3979  * - RFCTYPE_CHAR
3980  * - RFCTYPE_STRING
3981  * - RFCTYPE_INTx
3982  * - RFCTYPE_FLOAT
3983  * - RFCTYPE_BCD
3984  * - RFCTYPE_DECFxx
3985  * \note: If the target field has type CHAR or STRING, the byte value
3986  * will be stored as a hex representation of the bytes.\n
3987  * If the target field has a numerical type, the byte value will be
3988  * assigned only if the given valueLength matches the field length.
3989  * In order to use this feature, you need to know exactly what you are doing...
3990  * E.g. when setting 8 bytes into an RFC_FLOAT field, you need to understand the
3991  * IEEE floating point format. Better only use this function for setting RAW fields.
3992  *
3993  *
3994  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
3995  * is a table handle, the function will set the field value of the current row.
3996  * \in *name The name of the field to set.
3997  * \in *byteValue The byte value to write into the field.
3998  * \in valueLength The number of bytes to use from byteValue.
3999  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4000  * \return RFC_RC
4001  */
4002  DECL_EXP RFC_RC SAP_API RfcSetBytes(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
4003 
4004  /**
4005  * \brief Sets the given byte value (byteValue/valueLength) into the field.
4006  * \ingroup container
4007  *
4008  * This function works exactly like RfcSetBytes(), the difference being that the field is
4009  * addressed by its index within the structure/table/function module. The first field has index 0,
4010  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4011  *
4012  *
4013  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4014  * is a table handle, the function will set the field value of the current row.
4015  * \in *index The index of the field to set.
4016  * \in *byteValue The byte value to write into the field.
4017  * \in valueLength The number of bytes to use from byteValue.
4018  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4019  * \return RFC_RC
4020  */
4021  DECL_EXP RFC_RC SAP_API RfcSetBytesByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
4022 
4023  /**
4024  * \brief Sets the given byte value (byteValue/valueLength) into the field.
4025  * \ingroup container
4026  *
4027  * The field specified by name needs to be of one of the following data types:
4028  * - RFCTYPE_BYTE
4029  * - RFCTYPE_XSTRING
4030  * - RFCTYPE_CHAR
4031  * - RFCTYPE_STRING
4032  * - RFCTYPE_INTx
4033  * - RFCTYPE_FLOAT
4034  * - RFCTYPE_BCD
4035  * - RFCTYPE_DECFxx
4036  * \note: If the target field has type CHAR or STRING, the byte value
4037  * will be stored as a hex representation of the bytes.\n
4038  * If the target field has a numerical type, the byte value will be
4039  * assigned only if the given valueLength matches the field length.
4040  * In order to use this feature, you need to know exactly what you are doing...
4041  * E.g. when setting 8 bytes into an RFC_FLOAT field, you need to understand the
4042  * IEEE floating point format. Better only use this function for setting RAW fields.
4043  *
4044  *
4045  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4046  * is a table handle, the function will set the field value of the current row.
4047  * \in *name The name of the field to set.
4048  * \in *byteValue The byte value to write into the field.
4049  * \in valueLength The number of bytes to use from byteValue.
4050  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4051  * \return RFC_RC
4052  */
4053  DECL_EXP RFC_RC SAP_API RfcSetXString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
4054 
4055  /**
4056  * \brief Sets the given byte value (byteValue/valueLength) into the field.
4057  * \ingroup container
4058  *
4059  * This function works exactly like RfcSetXString(), the difference being that the field is
4060  * addressed by its index within the structure/table/function module. The first field has index 0,
4061  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4062  *
4063  *
4064  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4065  * is a table handle, the function will set the field value of the current row.
4066  * \in *index The index of the field to set.
4067  * \in *byteValue The byte value to write into the field.
4068  * \in valueLength The number of bytes to use from byteValue.
4069  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4070  * \return RFC_RC
4071  */
4072  DECL_EXP RFC_RC SAP_API RfcSetXStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO* errorInfo);
4073 
4074  /**
4075  * \brief Sets the value of an INT4 field.
4076  * \ingroup container
4077  *
4078  * The field specified by name needs to be of one of the following data types:
4079  * - RFCTYPE_CHAR
4080  * - RFCTYPE_STRING
4081  * - RFCTYPE_INTx
4082  * - RFCTYPE_DECFxx
4083  *
4084  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4085  * is a table handle, the function will set the field value of the current row.
4086  * \in *name The name of the field to set.
4087  * \in value The integer value to set.
4088  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4089  * \return RFC_RC
4090  */
4091  DECL_EXP RFC_RC SAP_API RfcSetInt(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_INT value, RFC_ERROR_INFO* errorInfo);
4092 
4093  /**
4094  * \brief Sets the value of an INT4 field.
4095  * \ingroup container
4096  *
4097  * This function works exactly like RfcSetInt(), the difference being that the field is
4098  * addressed by its index within the structure/table/function module. The first field has index 0,
4099  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4100  *
4101  *
4102  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4103  * is a table handle, the function will set the field value of the current row.
4104  * \in *index The index of the field to set.
4105  * \in value The integer value to set.
4106  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4107  * \return RFC_RC
4108  */
4109  DECL_EXP RFC_RC SAP_API RfcSetIntByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT value, RFC_ERROR_INFO* errorInfo);
4110 
4111  /**
4112  * \brief Sets the value of an INT1 field.
4113  * \ingroup container
4114  *
4115  * The field specified by name needs to be of one of the following data types:
4116  * - RFCTYPE_CHAR
4117  * - RFCTYPE_STRING
4118  * - RFCTYPE_INTx
4119  * - RFCTYPE_DECFxx
4120  *
4121  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4122  * is a table handle, the function will set the field value of the current row.
4123  * \in *name The name of the field to set.
4124  * \in value The integer value to set.
4125  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4126  * \return RFC_RC
4127  */
4128  DECL_EXP RFC_RC SAP_API RfcSetInt1(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_INT1 value, RFC_ERROR_INFO* errorInfo);
4129 
4130  /**
4131  * \brief Sets the value of an INT1 field.
4132  * \ingroup container
4133  *
4134  * This function works exactly like RfcSetInt1(), the difference being that the field is
4135  * addressed by its index within the structure/table/function module. The first field has index 0,
4136  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4137  *
4138  *
4139  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4140  * is a table handle, the function will set the field value of the current row.
4141  * \in *index The index of the field to set.
4142  * \in value The integer value to set.
4143  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4144  * \return RFC_RC
4145  */
4146  DECL_EXP RFC_RC SAP_API RfcSetInt1ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT1 value, RFC_ERROR_INFO* errorInfo);
4147 
4148  /**
4149  * \brief Sets the value of an INT2 field.
4150  * \ingroup container
4151  *
4152  * The field specified by name needs to be of one of the following data types:
4153  * - RFCTYPE_CHAR
4154  * - RFCTYPE_STRING
4155  * - RFCTYPE_INTx
4156  * - RFCTYPE_DECFxx
4157  *
4158  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4159  * is a table handle, the function will set the field value of the current row.
4160  * \in *name The name of the field to set.
4161  * \in value The integer value to set.
4162  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4163  * \return RFC_RC
4164  */
4165  DECL_EXP RFC_RC SAP_API RfcSetInt2(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_INT2 value, RFC_ERROR_INFO* errorInfo);
4166 
4167  /**
4168  * \brief Sets the value of an INT2 field.
4169  * \ingroup container
4170  *
4171  * This function works exactly like RfcSetInt2(), the difference being that the field is
4172  * addressed by its index within the structure/table/function module. The first field has index 0,
4173  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4174  *
4175  *
4176  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4177  * is a table handle, the function will set the field value of the current row.
4178  * \in *index The index of the field to set.
4179  * \in value The integer value to set.
4180  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4181  * \return RFC_RC
4182  */
4183  DECL_EXP RFC_RC SAP_API RfcSetInt2ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT2 value, RFC_ERROR_INFO* errorInfo);
4184 
4185  /**
4186  * \brief Sets the value of an INT8 field.
4187  * \ingroup container
4188  *
4189  * The field specified by name needs to be of one of the following data types:
4190  * - RFCTYPE_CHAR
4191  * - RFCTYPE_STRING
4192  * - RFCTYPE_INTx
4193  * - RFCTYPE_DECFxx
4194  * - RFCTYPE_UTCLONG.
4195  *
4196  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4197  * is a table handle, the function will set the field value of the current row.
4198  * \in *name The name of the field to set.
4199  * \in value The integer value to set.
4200  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4201  * \return RFC_RC
4202  */
4203  DECL_EXP RFC_RC SAP_API RfcSetInt8(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_INT8 value, RFC_ERROR_INFO* errorInfo);
4204 
4205  /**
4206  * \brief Sets the value of an INT8 field.
4207  * \ingroup container
4208  *
4209  * This function works exactly like RfcSetInt8(), the difference being that the field is
4210  * addressed by its index within the structure/table/function module. The first field has index 0,
4211  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4212  *
4213  *
4214  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4215  * is a table handle, the function will set the field value of the current row.
4216  * \in *index The index of the field to set.
4217  * \in value The integer value to set.
4218  * \out *errorInfo More information in case the field does not exist or a conversion fails.
4219  * \return RFC_RC
4220  */
4221  DECL_EXP RFC_RC SAP_API RfcSetInt8ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT8 value, RFC_ERROR_INFO* errorInfo);
4222 
4223 
4224  /**
4225  * \brief Sets a floating point field.
4226  * \ingroup container
4227  *
4228  * The field specified by name needs to be of one of the following data types:
4229  * - RFCTYPE_FLOAT
4230  * - RFCTYPE_BCD
4231  * - RFCTYPE_CHAR
4232  * - RFCTYPE_STRING
4233  * - RFCTYPE_NUM
4234  * - RFCTYPE_DECF16
4235  * - RFCTYPE_DECF34
4236  * \note If the target field is CHAR or STRING, the value will be converted to a string in
4237  * scientific notation. If it is NUMC, it will be truncated to the next integer.
4238  *
4239  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4240  * is a table handle, the function will set the field value of the current row.
4241  * \in *name The name of the field to set.
4242  * \in value The double value to set.
4243  * \out *errorInfo Field does not exist or is not of a supported type?
4244  * \return RFC_RC
4245  */
4246  DECL_EXP RFC_RC SAP_API RfcSetFloat(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_FLOAT value, RFC_ERROR_INFO* errorInfo);
4247 
4248  /**
4249  * \brief Sets a floating point field.
4250  * \ingroup container
4251  *
4252  * This function works exactly like RfcSetFloat(), the difference being that the field is
4253  * addressed by its index within the structure/table/function module. The first field has index 0,
4254  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4255  *
4256  *
4257  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4258  * is a table handle, the function will set the field value of the current row.
4259  * \in *index The index of the field to set.
4260  * \in value The double value to set.
4261  * \out *errorInfo Field does not exist or is not of a supported type?
4262  * \return RFC_RC
4263  */
4264  DECL_EXP RFC_RC SAP_API RfcSetFloatByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_FLOAT value, RFC_ERROR_INFO* errorInfo);
4265 
4266 
4267  /**
4268  * \brief Sets the value of an 8 byte decfloat object into a field.
4269  * \ingroup container
4270  *
4271  * The field specified by name needs to be of one of the following data types:
4272  * - RFCTYPE_DECF16
4273  * - RFCTYPE_DECF34
4274  * - RFCTYPE_FLOAT
4275  * - RFCTYPE_BCD
4276  * - RFCTYPE_INT
4277  * - RFCTYPE_INT2
4278  * - RFCTYPE_INT1
4279  * - RFCTYPE_CHAR
4280  * - RFCTYPE_NUM
4281  * - RFCTYPE_STRING
4282  * - RFCTYPE_BYTE Needs to be 8 byte long.
4283  * - RFCTYPE_XSTRING
4284  * \note If the target field is CHAR or STRING, the value will be converted to a string in
4285  * scientific notation. If it is NUMC, it will be truncated to the next integer.
4286  *
4287  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4288  * is a table handle, the function will set the field value of the current row.
4289  * \in *name The name of the field to set.
4290  * \in value The decfloat value to set.
4291  * \out *errorInfo Field does not exist or is not of a supported type?
4292  * \return RFC_RC
4293  */
4294  DECL_EXP RFC_RC SAP_API RfcSetDecF16(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_DECF16 value, RFC_ERROR_INFO* errorInfo);
4295 
4296  /**
4297  * \brief Sets the value of an 8 byte decfloat object into a field.
4298  * \ingroup container
4299  *
4300  * This function works exactly like RfcSetDecF16(), the difference being that the field is
4301  * addressed by its index within the structure/table/function module. The first field has index 0,
4302  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4303  *
4304  *
4305  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4306  * is a table handle, the function will set the field value of the current row.
4307  * \in *index The index of the field to set.
4308  * \in value The decfloat value to set.
4309  * \out *errorInfo Field does not exist or is not of a supported type?
4310  * \return RFC_RC
4311  */
4312  DECL_EXP RFC_RC SAP_API RfcSetDecF16ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF16 value, RFC_ERROR_INFO* errorInfo);
4313 
4314 
4315  /**
4316  * \brief Sets the value of a 16 byte decfloat object into a field.
4317  * \ingroup container
4318  *
4319  * The field specified by name needs to be of one of the following data types:
4320  * - RFCTYPE_DECF16
4321  * - RFCTYPE_DECF34
4322  * - RFCTYPE_FLOAT
4323  * - RFCTYPE_BCD
4324  * - RFCTYPE_INT
4325  * - RFCTYPE_INT2
4326  * - RFCTYPE_INT1
4327  * - RFCTYPE_CHAR
4328  * - RFCTYPE_NUM
4329  * - RFCTYPE_STRING
4330  * - RFCTYPE_BYTE Needs to be 8 byte long.
4331  * - RFCTYPE_XSTRING
4332  * \note If the target field is CHAR or STRING, the value will be converted to a string in
4333  * scientific notation. If it is NUMC, it will be truncated to the next integer.
4334  *
4335  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4336  * is a table handle, the function will set the field value of the current row.
4337  * \in *name The name of the field to set.
4338  * \in value The decfloat value to set.
4339  * \out *errorInfo Field does not exist or is not of a supported type?
4340  * \return RFC_RC
4341  */
4342  DECL_EXP RFC_RC SAP_API RfcSetDecF34(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_DECF34 value, RFC_ERROR_INFO* errorInfo);
4343 
4344  /**
4345  * \brief Sets the value of a 16 byte decfloat object into a field.
4346  * \ingroup container
4347  *
4348  * This function works exactly like RfcSetDecF34(), the difference being that the field is
4349  * addressed by its index within the structure/table/function module. The first field has index 0,
4350  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4351  *
4352  *
4353  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4354  * is a table handle, the function will set the field value of the current row.
4355  * \in *index The index of the field to set.
4356  * \in value The decfloat value to set.
4357  * \out *errorInfo Field does not exist or is not of a supported type?
4358  * \return RFC_RC
4359  */
4360  DECL_EXP RFC_RC SAP_API RfcSetDecF34ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF34 value, RFC_ERROR_INFO* errorInfo);
4361 
4362 
4363  /**
4364  * \brief Copies the given structure into the target structure of the parent container.
4365  * \ingroup container
4366  *
4367  * The target field needs to be of type RFCTYPE_STRUCTURE.
4368  *
4369  * \note If you want to avoid the copy operation, use RfcGetStructure() and set the subfields here,
4370  * instead of the sequence RfcCreateStructure()/ setting the subfields/ #RfcSetStructure().
4371  *
4372  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4373  * is a table handle, the function will set the field value of the current row.
4374  * \in *name The name of the field to set.
4375  * \in value The structure to copy.
4376  * \out *errorInfo Out of memory, field does not exist or is not of type RFCTYPE_STRUCTURE?
4377  * \return RFC_RC
4378  */
4379  DECL_EXP RFC_RC SAP_API RfcSetStructure(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO* errorInfo);
4380 
4381  /**
4382  * \brief Copies the given structure into the target structure of the parent container.
4383  * \ingroup container
4384  *
4385  * This function works exactly like RfcSetStructure(), the difference being that the field is
4386  * addressed by its index within the structure/table/function module. The first field has index 0,
4387  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4388  *
4389  *
4390  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4391  * is a table handle, the function will set the field value of the current row.
4392  * \in *index The index of the field to set.
4393  * \in value The structure to copy.
4394  * \out *errorInfo Out of memory, field does not exist or is not of type RFCTYPE_STRUCTURE?
4395  * \return RFC_RC
4396  */
4397  DECL_EXP RFC_RC SAP_API RfcSetStructureByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO* errorInfo);
4398 
4399  /**
4400  * \brief Set single char value buffer to the entire structure.
4401  * \ingroup container
4402  *
4403  * The structure will be filled with the data of bufferas if it were a single char field.
4404  *
4405  * In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL.
4406  * The result will <b>not</b> be null-terminated.
4407  *
4408  * This mimics the way structures have been handled by the classic RFC library librfc32.
4409  * It can conveniently be used for fetching an RFC structure into a C struct, which has been defined
4410  * like in the ABAP DDIC.
4411  * In addition to programming convenience, it should also improve runtime performance compared to fetching
4412  * each single field one-by-one.
4413  *
4414  * This function can only be applied to structures/tables if they contain char-like fields (CHAR, NUMC, DATE, TIME)
4415  * The result will be aligned exactly as on ABAP side, including padding bytes.
4416  *
4417  * \out dataHandle A data container (structure handle or table handle). If dataHandle
4418  * is a table handle, the function will read the structure data of the current row.
4419  * \in *charBuffer Pre-allocated buffer, which will receive the structure value.
4420  * \in bufferLength Size of the buffer in SAP_UC.
4421  * \out *errorInfo More information in case the structure cannot be returned as char buffer.
4422  * \return RFC_RC
4423  */
4424  DECL_EXP RFC_RC SAP_API RfcSetStructureFromCharBuffer(DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO* errorInfo);
4425 
4426  /**
4427  * \brief Copies the given table into the target table of the parent container.
4428  * \ingroup container
4429  *
4430  * The target field needs to be of type RFCTYPE_TABLE.
4431  *
4432  * \note If you want to avoid the copy operation, use RfcGetTable() and set the subfields here,
4433  * instead of the sequence RfcCreateTable()/ setting the subfields/ #RfcSetTable().
4434  *
4435  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4436  * is a table handle, the function will set the field value of the current row.
4437  * \in *name The name of the field to set.
4438  * \in value The table to copy.
4439  * \out *errorInfo Field does not exist or is not of type RFCTYPE_TABLE?
4440  * \return RFC_RC
4441  */
4442  DECL_EXP RFC_RC SAP_API RfcSetTable(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO* errorInfo);
4443 
4444  /**
4445  * \brief Copies the given table into the target table of the parent container.
4446  * \ingroup container
4447  *
4448  * This function works exactly like RfcSetTable(), the difference being that the field is
4449  * addressed by its index within the structure/table/function module. The first field has index 0,
4450  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4451  *
4452  *
4453  * \in dataHandle A data container (function handle, structure handle or table handle). If dataHandle
4454  * is a table handle, the function will set the field value of the current row.
4455  * \in *index The index of the field to set.
4456  * \in value The table to copy.
4457  * \out *errorInfo Field does not exist or is not of type RFCTYPE_TABLE?
4458  * \return RFC_RC
4459  */
4460  DECL_EXP RFC_RC SAP_API RfcSetTableByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO* errorInfo);
4461 
4462  /**
4463  * \brief Copies the object into the target object of the parent container.
4464  * \ingroup container
4465  *
4466  * The target field needs to be of type RFCTYPE_ABAPOBJECT.
4467  *
4468  * \note If you want to avoid the copy operation, use RfcGetAbapObject() and if the instance already exists set the subfields here,
4469  * instead of the sequence RfcCreateAbapObject()/ setting the subfields/ #RfcSetAbapObject().
4470  *
4471  * \in dataHandle A data container (function handle, structure handle, table handle or object handle). If dataHandle
4472  * is a table handle, the function will set the field value of the current row.
4473  * \in *name The name of the field to set.
4474  * \in value The object to copy.
4475  * \out *errorInfo Field does not exist or is not of type RFCTYPE_ABAPOBJECT?
4476  * \return RFC_RC
4477  */
4478  DECL_EXP RFC_RC SAP_API RfcSetAbapObject(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const* name, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO* errorInfo);
4479 
4480  /**
4481  * \brief Copies the object into the target object of the parent container.
4482  * \ingroup container
4483  *
4484  * This function works exactly like RfcSetAbapObject(), the difference being that the field is
4485  * addressed by its index within the structure/table/function module. The first field has index 0,
4486  * last field has index n-1, the order of the fields is as defined in the ABAP DDIC.
4487  *
4488  *
4489  * \in dataHandle A data container (function handle, structure handle, table handle or object handle). If dataHandle
4490  * is a table handle, the function will set the field value of the current row.
4491  * \in *index The index of the field to set.
4492  * \in value The object to copy.
4493  * \out *errorInfo Field does not exist or is not of type RFCTYPE_ABAPOBJECT?
4494  * \return RFC_RC
4495  */
4496  DECL_EXP RFC_RC SAP_API RfcSetAbapObjectByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO* errorInfo);
4497 
4498 
4499  /**
4500  * \brief Gets the ABAP exception object handle from the given function handle.
4501  * \ingroup container
4502  *
4503  * If a call to #RfcInvoke() returned RFC_ABAP_CLASS_EXCEPTION, the RFC client calls this function afterwards with the original function handle
4504  * in order to get access to the details of the class exception.
4505  * \in funcHandle Function module data container.
4506  * \out *errorInfo Should always return successfully.
4507  * \return A handle to an ABAP class exception object .
4508  */
4510 
4511  /**
4512  * \brief Sets the ABAP exception object handle to the given function handle.
4513  * \ingroup container
4514  *
4515  * If an RFC server function wants to throw an ABAP class exception, it calls this function before it returns with RFC_ABAP_CLASS_EXCEPTION.
4516  * \in funcHandle Function module data container .
4517  * \in excpHandle Object handle to the class exception to be thrown.
4518  * \in exceptionText Exception text.
4519  * \out *errorInfo Should always return successfully.
4520  * \return RFC_RC
4521  */
4522  DECL_EXP RFC_RC SAP_API RfcSetAbapClassException(RFC_FUNCTION_HANDLE funcHandle, RFC_ABAP_OBJECT_HANDLE excpHandle, const SAP_UC *exceptionText, RFC_ERROR_INFO* errorInfo);
4523 
4524  /**
4525  * \brief Returns the metadata description for the given function module.
4526  * \ingroup container
4527  *
4528  *
4529  * \in funcHandle A function module.
4530  * \out *errorInfo Can't possibly go wrong...
4531  * \return The metadata description that had been used when creating the function module container.
4532  */
4534 
4535  /**
4536  * \brief Returns the metadata description of the given structure or table (RFC_STRUCTURE_HANDLE or RFC_TABLE_HANDLE).
4537  * \ingroup container
4538  *
4539  *
4540  * \in dataHandle A structure or table.
4541  * \out *errorInfo Can't possibly go wrong...
4542  * \return The type description of the given structure (in case dataHandle is a structure), or the
4543  * type description of the table line type (in case dataHandle is a table).
4544  */
4546 
4547 
4548  /* ************************************************************************/
4549  /* */
4550  /* Metadata and Repository API */
4551  /* */
4552  /* ************************************************************************/
4553 
4554  /* 1. Repository API */
4555 
4556  /**
4557  * \brief Returns the function description that is valid for the system to which rfcHandle points to.
4558  * \ingroup repository
4559  *
4560  * If the function description is already in the repository cache for that system ID, it will be
4561  * returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using
4562  * the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.
4563  *
4564  * The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different
4565  * from R/3 release to R/3 release.
4566  * This is the main API that should be used.
4567  *
4568  * \in rfcHandle Open client connection to the R/3 System, for which you need the function module description.
4569  * \in *funcName Name of the function module to look up.
4570  * \out *errorInfo More error details in case something goes wrong.
4571  * \return The metadata description of the given function module.
4572  */
4573  DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcGetFunctionDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const * funcName, RFC_ERROR_INFO* errorInfo);
4574 
4575  /**
4576  * \brief Looks for a cached function description.
4577  * \ingroup repository
4578  *
4579  * This API should be used with care and is only for special scenarios, for example:
4580  * 1. You know for sure, that a function description has already been cached via RfcGetFunctionDesc(),
4581  * and don't want to open an extra rfcHandle that will never be used.
4582  * In this case simply use the SAP System ID as the repositoryID.
4583  * 2. You have created a hard-coded repository via RfcAddFunctionDesc(), which contains function modules
4584  * that do not exist in the backend's DDIC.
4585  *
4586  * If repositoryID is NULL, the "default repository" is used.
4587  *
4588  * \in *repositoryID System ID of R/3 System, for which this function module description has been cached,
4589  * or NULL in case you want to look for it in the default repository.
4590  * \in *funcName Name of the function module.
4591  * \out *errorInfo Requested function name not in cache?
4592  * \return The requested function description.
4593  */
4594  DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcGetCachedFunctionDesc(SAP_UC const * repositoryID, SAP_UC const * funcName, RFC_ERROR_INFO* errorInfo);
4595 
4596  /**
4597  * \brief Adds a function description to the cache for the specified R/3 System.
4598  * \ingroup repository
4599  *
4600  * This API should be used with care and is only for special scenarios, e.g. if you want to
4601  * write an RFC server that offers function modules, which do not exist in the R/3 system's DDIC.
4602  * If repositoryID is NULL, the description is added to the "default repository".
4603  *
4604  *
4605  * \in *repositoryID System ID of R/3 System, to whose cache you want to add the function description,
4606  * or NULL for the default repository.
4607  * \in funcDesc The function description.
4608  * \out *errorInfo Not much that can go wrong here.
4609  * \return RFC_RC
4610  */
4611  DECL_EXP RFC_RC SAP_API RfcAddFunctionDesc(SAP_UC const * repositoryID, RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO* errorInfo);
4612 
4613  /**
4614  * \brief Removes a function description from the cache for the specified R/3 System.
4615  * \ingroup repository
4616  *
4617  * This API can be used, e.g. if the signature (imports, exports, etc.) of a function module has
4618  * been changed in the backend, while the external RFC program is still running. If the RFC library
4619  * continues using the old cached metadata description, garbage values (if fields have been deleted
4620  * from the function module) or missing values (if new fields have been added to the function module)
4621  * will result.
4622  * If repositoryID is NULL, the description is removed from the "default repository".
4623  *
4624  *
4625  * \in *repositoryID System ID of R/3 System, to whose cache you want to add the function description,
4626  * or NULL for the default repository.
4627  * \in *functionName The name of the function module, whose description is to be removed from the cache.
4628  * \out *errorInfo Not much that can go wrong here.
4629  * \return RFC_RC
4630  */
4631  DECL_EXP RFC_RC SAP_API RfcRemoveFunctionDesc(SAP_UC const * repositoryID, SAP_UC const * functionName, RFC_ERROR_INFO* errorInfo);
4632 
4633  /**
4634  * \brief Returns the structure description that is valid for the system to which rfcHandle points to.
4635  * \ingroup repository
4636  *
4637  * If the structure description is already in the repository cache for that system ID, it will be
4638  * returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using
4639  * the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.
4640  *
4641  * The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different
4642  * from R/3 release to R/3 release.
4643  * \note Normally it should not be necessary to lookup separate structure descriptions. They are
4644  * already looked up as part of the function module, in which they are used.
4645  *
4646  * \in rfcHandle Open client connection to the R/3 System, for which you need the structure description.
4647  * \in *typeName Name of a DDIC structure or table.
4648  * \out *errorInfo More error details in case something goes wrong.
4649  * \return The metadata description of the given structure/table.
4650  */
4651  DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetTypeDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const * typeName, RFC_ERROR_INFO* errorInfo);
4652 
4653  /**
4654  * \brief Looks for a cached structure/table description.
4655  * \ingroup repository
4656  *
4657  * Similar to RfcGetTypeDesc(), but it only looks into the cache. Again it should almost never
4658  * be necessary to get a metadata description of a single structure.
4659  *
4660  * \in *repositoryID System ID of R/3 System, for which this type description has been cached,
4661  * or NULL in case you want to look for it in the default repository.
4662  * \in *typeName Name of the DDIC structure/table.
4663  * \out *errorInfo Requested type name not in cache?
4664  * \return The requested type description.
4665  */
4666  DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetCachedTypeDesc(SAP_UC const * repositoryID, SAP_UC const * typeName, RFC_ERROR_INFO* errorInfo);
4667 
4668  /**
4669  * \brief Adds a type description to the cache.
4670  * \ingroup repository
4671  *
4672  *
4673  * \in *repositoryID System ID of R/3 System, to whose cache you want to add the type description,
4674  * or NULL for the default repository.
4675  * \in typeHandle The type description.
4676  * \out *errorInfo Not much that can go wrong here.
4677  * \return RFC_RC
4678  */
4679  DECL_EXP RFC_RC SAP_API RfcAddTypeDesc(SAP_UC const * repositoryID, RFC_TYPE_DESC_HANDLE typeHandle, RFC_ERROR_INFO* errorInfo);
4680 
4681  /**
4682  * \brief Removes a type description from the cache.
4683  * \ingroup repository
4684  *
4685  *
4686  * \in *repositoryID System ID of R/3 System, from whose cache you want to remove the type description,
4687  * or NULL for the default repository.
4688  * \in *typeName The name of the type, whose description is to be removed from the cache.
4689  * \out *errorInfo Not much that can go wrong here.
4690  * \return RFC_RC
4691  */
4692  DECL_EXP RFC_RC SAP_API RfcRemoveTypeDesc(SAP_UC const * repositoryID, SAP_UC const * typeName, RFC_ERROR_INFO* errorInfo);
4693 
4694  /**
4695  * \brief Returns the class description that is valid for the system to which rfcHandle points to.
4696  * \ingroup repository
4697  *
4698  * If the class description is already in the repository cache for that system ID, it will be
4699  * returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using
4700  * the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.
4701  *
4702  * The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different
4703  * from R/3 release to R/3 release.
4704  * This is the main API that should be used.
4705  *
4706  * \in rfcHandle Open client connection to the R/3 System, for which you need the class description.
4707  * \in *className Name of the class to look up.
4708  * \out *errorInfo More error details in case something goes wrong.
4709  * \return The metadata description of the given function module.
4710  */
4711  DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcGetClassDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const * className, RFC_ERROR_INFO* errorInfo);
4712 
4713  /**
4714  * \brief Looks for a cached class description.
4715  * \ingroup repository
4716  *
4717  * This API should be used with care and is only for special scenarios, for example:
4718  * 1. You know for sure, that a class description has already been cached via RfcGetClassDesc(),
4719  * and don't want to open an extra rfcHandle that will never be used.
4720  * In this case simply use the SAP System ID as the repositoryID.
4721  * 2. You have created a hard-coded repository via RfcAddClassDesc(), which contains classes
4722  * that do not exist in the backend's DDIC.
4723  *
4724  * If repositoryID is NULL, the "default repository" is used.
4725  *
4726  * \in *repositoryID System ID of R/3 System, for which this class description has been cached,
4727  * or NULL in case you want to look for it in the default repository.
4728  * \in *className Name of the class.
4729  * \out *errorInfo Requested class name not in cache?
4730  * \return The requested class description.
4731  */
4732  DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcGetCachedClassDesc(SAP_UC const * repositoryID, SAP_UC const * className, RFC_ERROR_INFO* errorInfo);
4733 
4734  /**
4735  * \brief Returns the metadata description of the given ABAP object handle.
4736  * \ingroup container
4737  *
4738  *
4739  * \in objectHandle An ABAP object.
4740  * \out *errorInfo Can't possibly go wrong...
4741  * \return The class description of the given ABAP object.
4742  */
4744 
4745  /**
4746  * \brief Adds a class description to the cache for the specified R/3 System.
4747  * \ingroup repository
4748  *
4749  * This API should be used with care and is only for special scenarios, e.g. if you want to
4750  * write an RFC server that offers/uses classes, which do not exist in the R/3 system's DDIC.
4751  * If repositoryID is NULL, the description is added to the "default repository".
4752  *
4753  *
4754  * \in *repositoryID System ID of R/3 System, to whose cache you want to add the class description,
4755  * or NULL for the default repository.
4756  * \in classDesc The class description.
4757  * \out *errorInfo Not much that can go wrong here.
4758  * \return RFC_RC
4759  */
4760  DECL_EXP RFC_RC SAP_API RfcAddClassDesc(SAP_UC const * repositoryID, RFC_CLASS_DESC_HANDLE classDesc, RFC_ERROR_INFO* errorInfo);
4761 
4762  /**
4763  * \brief Removes a class description from the cache for the specified R/3 System.
4764  * \ingroup repository
4765  *
4766  * If repositoryID is NULL, the description is removed from the "default repository".
4767  *
4768  *
4769  * \in *repositoryID System ID of R/3 System, from whose cache you want to remove the class description,
4770  * or NULL for the default repository.
4771  * \in *className The name of the ABAP class, whose description you want to remove.
4772  * \out *errorInfo Not much that can go wrong here.
4773  * \return RFC_RC
4774  */
4775  DECL_EXP RFC_RC SAP_API RfcRemoveClassDesc(SAP_UC const * repositoryID, SAP_UC const * className, RFC_ERROR_INFO* errorInfo);
4776 
4777 
4778  /**
4779  * \brief Removes all metadata from the repository cache of the specified R/3 System.
4780  * \ingroup repository
4781  *
4782  * If repositoryID is NULL, the "default repository" is cleared.
4783  *
4784  *
4785  * \in *repositoryID System ID of R/3 System, whose cache you want to clear,
4786  * or NULL for the default repository.
4787  * \out *errorInfo Not much that can go wrong here.
4788  * \return RFC_RC
4789  */
4790  DECL_EXP RFC_RC SAP_API RfcClearRepository(SAP_UC const * repositoryID, RFC_ERROR_INFO* errorInfo);
4791 
4792  /**
4793  * \brief Stores the currently cached objects of a repository into a JSON formatted text file.
4794  * \ingroup repository
4795  *
4796  * This function will create a JSON formatted text file that contains all currently cached function module descriptions with their parameters,
4797  * so it can be reloaded at another time (see RfcLoadRepository()) without opening connections to the backend and fetching metadata from the DDIC.
4798  * This JSON file can also be used by the SAP .NET Connector and SAP Java Connector.
4799  *
4800  * \in *repositoryID System ID of R/3 System, whose cache you want to save, or NULL for the default cache.
4801  * \in *targetStream FILE pointer opened by the user.
4802  * \out *errorInfo More error details in case something goes wrong.
4803  * \return RFC_RC
4804  */
4805  DECL_EXP RFC_RC SAP_API RfcSaveRepository(SAP_UC const * repositoryID, FILE* const targetStream, RFC_ERROR_INFO* errorInfo);
4806 
4807 
4808  /**
4809  * \brief Retrieves metadata from a JSON formatted text file and creates the according repository to use for function calls.
4810  * \ingroup repository
4811  *
4812  * This function will create a repository with the given ID - or a default repository, if the ID is NULL - and populate it with
4813  * the function descriptions and parameter descriptions contained in the JSON formatted text file (see RfcSaveRepository()).
4814  * That way the RFC program does not need to fetch the metadata from the backend DDIC, which is useful, if you want to
4815  * improve the startup performance of your program or if your program is an RFC server that does not have login parameters
4816  * for the backend.
4817  * It is also possible to use JSON files created by SAP .NET Connector and SAP Java Connector.
4818  *
4819  * \note Special care needs to be taken to guarantee that the loaded metadata indeed matches the function and structure
4820  * descriptions defined in the backend system(s) against which it is to be used. Otherwise the risk of data corruption is very high.
4821  * \note If a repository with the given ID already exists, %RfcLoadRepository() will delete it and replace it with the contents
4822  * of the JSON file.
4823  *
4824  *
4825  * \in *repositoryID System ID of R/3 System, for which you want to use the metadata contained in the JSON file, or NULL
4826  * for the default repository.
4827  * \in *targetStream FILE pointer opened by the user.
4828  * \out *errorInfo More error details in case something goes wrong.
4829  * \return RFC_RC
4830  */
4831  DECL_EXP RFC_RC SAP_API RfcLoadRepository(SAP_UC const * repositoryID, FILE* const targetStream, RFC_ERROR_INFO* errorInfo);
4832 
4833  /* 2. Metadata API */
4834  /* 2.1. Metadata API for structure descriptions */
4835 
4836  /**
4837  * \brief Creates an empty type description with the given name.
4838  * \ingroup structure
4839  *
4840  * API for creating hard-coded metadata descriptions, e.g. for function modules that
4841  * don't exist in the R/3 backend.
4842  * Add field descriptions to the type description using RfcAddTypeField() and at the end
4843  * set the total byte length of the structure using RfcSetTypeLength().
4844  * \warning It is not easy to get the total length right, as you also need to take
4845  * alignment bytes into account...
4846  *
4847  * Finished type definitions can then be used for creating data containers (RfcCreateStructure()
4848  * or RfcCreateTable()) and for adding field/table descriptions to a function module description
4849  * (in RFC_PARAMETER_DESCs in RfcAddParameter()).
4850  *
4851  * After the handle was used for creating a container, any modifications are forbidden.
4852  *
4853  * \in *name An (arbitrary) name for the type.
4854  * \out *errorInfo Not enough memory?
4855  * \return The new type description.
4856  */
4857  DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcCreateTypeDesc(SAP_UC const* name, RFC_ERROR_INFO* errorInfo);
4858 
4859  /**
4860  * \brief Adds a new field to the type description.
4861  * \ingroup structure
4862  *
4863  * \note After a type description has been used (e.g. via RfcCreateStructure(), RfcCreateTable() or
4864  * RfcAddTypeDesc()), it can no longer be modified!
4865  *
4866  * \in typeHandle
4867  * \in *fieldDescr
4868  * \out *errorInfo
4869  * \return RFC_RC
4870  */
4871  DECL_EXP RFC_RC SAP_API RfcAddTypeField(RFC_TYPE_DESC_HANDLE typeHandle, const RFC_FIELD_DESC* fieldDescr, RFC_ERROR_INFO* errorInfo);
4872 
4873  /**
4874  * \brief Sets the total byte length of the type description.
4875  * \ingroup structure
4876  *
4877  * Before a type description can be used, this function needs to be called.
4878  * The RFC library does not automatically calculate the correct length based on
4879  * the fields that have been added, because this task is non-trivial and possibly
4880  * platform dependend. (Especially if the structure contains sub-structures.)\n
4881  * For integer and floating point types the correct alignments need to be taken into
4882  * account (start address divisible by 4 or 8), fixed sub-structures are inlined,
4883  * complex structures are referenced by an 8-byte pointer, etc. In general you will need
4884  * to do a bit of trial and error, before you get it right.\n
4885  * If you really need more details/tips for the process of hardcoding metadata, see
4886  * <A HREF="https://wiki.scn.sap.com/wiki/x/FD67Gg">this article</A>.
4887  *
4888  *
4889  * \in typeHandle The type description.
4890  * \in nucByteLength Total byte length of the structure in a non-Unicode system (1 byte per CHAR).
4891  * \in ucByteLength Total byte length of the structure in a Unicode system (2 bytes per CHAR).
4892  * \out *errorInfo The function returns an error, if the given byte lengths are smaller than
4893  * the sum of all field lengths, or if the nucByteLength is smaller than the ucByteLength.
4894  * \return RFC_RC
4895  */
4896  DECL_EXP RFC_RC SAP_API RfcSetTypeLength(RFC_TYPE_DESC_HANDLE typeHandle, unsigned nucByteLength, unsigned ucByteLength, RFC_ERROR_INFO* errorInfo);
4897 
4898  /**
4899  * \brief Returns the name of the type.
4900  * \ingroup structure
4901  *
4902  *
4903  * \in typeHandle The type description.
4904  * \out bufferForName Will receive the null-terminated DDIC name of the structure definition.
4905  * \out *errorInfo Should always return successfully...
4906  * \return RFC_RC
4907  */
4908  DECL_EXP RFC_RC SAP_API RfcGetTypeName(RFC_TYPE_DESC_HANDLE typeHandle, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO* errorInfo);
4909 
4910  /**
4911  * \brief Returns the number of fields in a structure definition.
4912  * \ingroup structure
4913  *
4914  *
4915  * \in typeHandle The type description.
4916  * \out *count The number of (direct) fields of this structure.
4917  * \out *errorInfo Should always return successfully...
4918  * \return RFC_RC
4919  */
4920  DECL_EXP RFC_RC SAP_API RfcGetFieldCount(RFC_TYPE_DESC_HANDLE typeHandle, unsigned* count, RFC_ERROR_INFO* errorInfo);
4921 
4922  /**
4923  * \brief Reads the field description of the structure's ith field.
4924  * \ingroup structure
4925  *
4926  * Useful mostly when looping over the fields of a structure.
4927  *
4928  * \in typeHandle The type description.
4929  * \in index The index of the field you are interested in.
4930  * \out *fieldDescr Will be filled with field's description.
4931  * \out *errorInfo Index out of bounds?
4932  * \return RFC_RC
4933  */
4934  DECL_EXP RFC_RC SAP_API RfcGetFieldDescByIndex(RFC_TYPE_DESC_HANDLE typeHandle, unsigned index, RFC_FIELD_DESC* fieldDescr, RFC_ERROR_INFO* errorInfo);
4935 
4936  /**
4937  * \brief Reads the field description of a field given by name.
4938  * \ingroup structure
4939  *
4940  *
4941  * \in typeHandle The type description.
4942  * \in *name The name of the field of interest.
4943  * \out *fieldDescr Will be filled with field's description.
4944  * \out *errorInfo No such field?
4945  * \return RFC_RC
4946  */
4947  DECL_EXP RFC_RC SAP_API RfcGetFieldDescByName(RFC_TYPE_DESC_HANDLE typeHandle, SAP_UC const* name, RFC_FIELD_DESC* fieldDescr, RFC_ERROR_INFO* errorInfo);
4948 
4949  /**
4950  * \brief Returns the total byte length of a structure definition.
4951  * \ingroup structure
4952  *
4953  *
4954  * \in typeHandle The type description.
4955  * \out nucByteLength Total byte length in a non-Unicode system.
4956  * \out ucByteLength Total byte length in a Unicode system.
4957  * \out *errorInfo Should always return successfully.
4958  * \return RFC_RC
4959  */
4960  DECL_EXP RFC_RC SAP_API RfcGetTypeLength(RFC_TYPE_DESC_HANDLE typeHandle, unsigned* nucByteLength, unsigned* ucByteLength, RFC_ERROR_INFO* errorInfo);
4961 
4962  /**
4963  * \brief Deletes the type description and releases the allocated resources.
4964  * \ingroup structure
4965  *
4966  * Only descriptions, which are not stored in a repository cache and not used by the application, can be deleted.
4967  * Deleting a cached description will cause an error, and deleting a description that is still in use, will lead
4968  * to a crash.
4969  *
4970  *
4971  * \inout typeHandle The type description to be deleted.
4972  * \out *errorInfo
4973  * \return
4974  */
4975  DECL_EXP RFC_RC SAP_API RfcDestroyTypeDesc(RFC_TYPE_DESC_HANDLE typeHandle, RFC_ERROR_INFO *errorInfo);
4976 
4977 
4978 
4979  /* 2.2. Metadata API for function modules */
4980 
4981  /**
4982  * \brief Creates an empty function description with the given name.
4983  * \ingroup function
4984  *
4985  * Add parameter descriptions and exception descriptions to the new RFC_FUNCTION_DESC_HANDLE
4986  * via RfcAddParameter() and RfcAddException().\n
4987  *
4988  * After the handle was used for creating a container, any modifications are forbidden.
4989  *
4990  * \in *name The name of the function module.
4991  * \out *errorInfo Probably not enough memory left?!
4992  * \return An empty function description that can be used for constructing hard-coded metadata.
4993  */
4995 
4996  /**
4997  * \brief Returns a function module's DDIC name.
4998  * \ingroup function
4999  *
5000  *
5001  * \in funcDesc The function module description.
5002  * \out bufferForName Will receive the function module's DDIC name.
5003  * \out *errorInfo Should always return successfully.
5004  * \return RFC_RC
5005  */
5006  DECL_EXP RFC_RC SAP_API RfcGetFunctionName(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO* errorInfo);
5007 
5008  /**
5009  * \brief Adds a new parameter (IMPORTING, EXPORTING, CHANGING, TABLES) to the function description.
5010  * \ingroup function
5011  *
5012  * \note After the function description has been used via RfcCreateFunction() or RfcAddFunctionDesc(),
5013  * it can no longer be modified!
5014  *
5015  * \in funcDesc The function module description.
5016  * \in *paramDescr Metadata description of the new parameter.
5017  * \out *errorInfo More details in case something goes wrong.
5018  * \return RFC_RC
5019  */
5020  DECL_EXP RFC_RC SAP_API RfcAddParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_PARAMETER_DESC* paramDescr, RFC_ERROR_INFO* errorInfo);
5021 
5022  /**
5023  * \brief Returns the number of parameters in the function module definition.
5024  * \ingroup function
5025  *
5026  *
5027  * \in funcDesc The function module's metadata description.
5028  * \out *count The number of parameters (IMPORTING, EXPORTING, CHANGING, TABLES).
5029  * \out *errorInfo Nothing can go wrong here.
5030  * \return RFC_RC
5031  */
5032  DECL_EXP RFC_RC SAP_API RfcGetParameterCount(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned* count, RFC_ERROR_INFO* errorInfo);
5033 
5034  /**
5035  * \brief Reads the metadata description of the function module's ith parameter.
5036  * \ingroup function
5037  *
5038  * \note Mostly be useful when looping over all parameters of a function module.
5039  *
5040  * \in funcDesc The function module's metadata description.
5041  * \in index The index of the parameter to describe.
5042  * \out *paramDesc Metadata description of the specified parameter.
5043  * \out *errorInfo Index out of bounds?
5044  * \return RFC_RC
5045  */
5046  DECL_EXP RFC_RC SAP_API RfcGetParameterDescByIndex(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_PARAMETER_DESC* paramDesc, RFC_ERROR_INFO* errorInfo);
5047 
5048  /**
5049  * \brief Reads the metadata description of a function module parameter given by name.
5050  * \ingroup function
5051  *
5052  *
5053  * \in funcDesc The function module's metadata description.
5054  * \in *name The name of the parameter to describe.
5055  * \out *paramDesc Metadata description of the specified parameter.
5056  * \out *errorInfo No such parameter?
5057  * \return RFC_RC
5058  */
5059  DECL_EXP RFC_RC SAP_API RfcGetParameterDescByName(RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const* name, RFC_PARAMETER_DESC* paramDesc, RFC_ERROR_INFO* errorInfo);
5060 
5061  /**
5062  * \brief Adds a new ABAP Exception to the function description.
5063  * \ingroup function
5064  *
5065  * \note After the function description has been used via RfcCreateFunction() or RfcAddFunctionDesc(),
5066  * it can no longer be modified!
5067  *
5068  *
5069  * \in funcDesc The function module's metadata description.
5070  * \in *excDesc The description of the exception to add.
5071  * \out *errorInfo Not much that can go wrong here.
5072  * \return RFC_RC
5073  */
5074  DECL_EXP RFC_RC SAP_API RfcAddException(RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_EXCEPTION_DESC* excDesc, RFC_ERROR_INFO* errorInfo);
5075 
5076  /**
5077  * \brief Returns the number of ABAP Exceptions of the function module.
5078  * \ingroup function
5079  *
5080  *
5081  * \in funcDesc The function module's metadata description.
5082  * \out *count The number of the function module's ABAP Exceptions.
5083  * \out *errorInfo Not much that can go wrong here.
5084  * \return RFC_RC
5085  */
5086  DECL_EXP RFC_RC SAP_API RfcGetExceptionCount(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned* count, RFC_ERROR_INFO* errorInfo);
5087 
5088  /**
5089  * \brief Reads the metadata description of the function module's ith ABAP Exception.
5090  * \ingroup function
5091  *
5092  *
5093  * \in funcDesc The function module's metadata description.
5094  * \in index The index of the exception to describe.
5095  * \out *excDesc The ABAP Exception's metadata description.
5096  * \out *errorInfo Index out of bounds?
5097  * \return RFC_RC
5098  */
5099  DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByIndex(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_EXCEPTION_DESC* excDesc, RFC_ERROR_INFO* errorInfo);
5100 
5101  /**
5102  * \brief Reads the metadata description of a function module's ABAP Exception given by name.
5103  * \ingroup function
5104  *
5105  *
5106  * \in funcDesc The function module's metadata description.
5107  * \in *name The name of the exception to describe.
5108  * \out *excDesc The ABAP Exception's metadata description.
5109  * \out *errorInfo No such ABAP Exception?
5110  * \return RFC_RC
5111  */
5112  DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByName(RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const* name, RFC_EXCEPTION_DESC* excDesc, RFC_ERROR_INFO* errorInfo);
5113 
5114  /**
5115  * \brief Enables this function module for the basXML serialization format.
5116  * \ingroup function
5117  *
5118  * R/3 Systems from kernel release 7.10 on support a new serialization format: basXML (binary ABAP serialization).
5119  * Calling %RfcEnableBASXML() allows the RFC library to transport this function module's data via the
5120  * basXML format, if the target backend supports it and the connection parameter NO_BASXML is either not set or set to "0".
5121  *
5122  * \in funcDesc The function module's metadata description.
5123  * \out *errorInfo Should always return successfully.
5124  * \return RFC_RC
5125  */
5126  DECL_EXP RFC_RC SAP_API RfcEnableBASXML(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO* errorInfo);
5127 
5128  /**
5129  * \brief Returns whether this function module has been enabled for basXML.
5130  * \ingroup function
5131  *
5132  * See RfcEnableBASXML()
5133  *
5134  * \in funcDesc The function module's metadata description.
5135  * \out *isEnabled 0 = false, 1 = true.
5136  * \out *errorInfo Should always return successfully.
5137  * \return RFC_RC
5138  */
5139  DECL_EXP RFC_RC SAP_API RfcIsBASXMLSupported(RFC_FUNCTION_DESC_HANDLE funcDesc, int* isEnabled, RFC_ERROR_INFO* errorInfo);
5140 
5141  /**
5142  * \brief Deletes the function description and releases the allocated resources.
5143  * \ingroup function
5144  *
5145  * Only descriptions, which are not stored in a repository cache and not used by the application, can be deleted.
5146  * Deleting a cached description will cause an error, and deleting a description that is still in use, will lead
5147  * to a crash.
5148  *
5149  *
5150  * \in funcDesc A function description.
5151  * \out *errorInfo Should always return successfully...
5152  * \return RFC_RC
5153  */
5155 
5156  /**
5157  * \brief Enables this function handle for ABAP class exception support.
5158  * \ingroup function
5159  *
5160  * R/3 Systems from kernel release 7.11 on support ABAP class exceptions.
5161  * Calling %RfcEnableAbapClassException() allows an RFC client to inform the ABAP backend that it can handle ABAP class exceptions
5162  * for the current function call using this function handle. If the ABAP backend supports class-based exceptions as well,
5163  * it can now safely throw such an exception.\n
5164  * Needs to be called before the corresponding RfcInvoke().
5165  *
5166  * \in funcHandle Function module data container.
5167  * \in rfcHandleRepository RFC connection handle to the repository system from where the missing metadata can be
5168  * dynamically retrieved during de-serializing the received ABAP class exceptions. This handle can be NULL but should not be
5169  * the same that is used for the RFC call itself.
5170  * \out *errorInfo Should always return successfully.
5171  * \return RFC_RC
5172  */
5173  DECL_EXP RFC_RC SAP_API RfcEnableAbapClassException(RFC_FUNCTION_HANDLE funcHandle, RFC_CONNECTION_HANDLE rfcHandleRepository, RFC_ERROR_INFO* errorInfo);
5174 
5175  /**
5176  * \brief Checks whether this function handle has been enabled for ABAP class exception support.
5177  * \ingroup function
5178  *
5179  * R/3 Systems from kernel release 7.11 on support ABAP class exception.
5180  * Typically, an RFC server can use this function in order to find out, whether the function module currently being processed has
5181  * ABAP class exceptions enabled in the ABAP backend. Only if this is the case, can the RFC Server safely throw an ABAP class exception.
5182  *
5183  * \in funcHandle Function module data container.
5184  * \out *isEnabled Flag indicating whether the function handle has been enabled for ABAP class based exception support.
5185  * \out *errorInfo Should always return successfully.
5186  * \return RFC_RC
5187  */
5188  DECL_EXP RFC_RC SAP_API RfcIsAbapClassExceptionEnabled(RFC_FUNCTION_HANDLE funcHandle, int* isEnabled, RFC_ERROR_INFO* errorInfo);
5189 
5190 
5191  /* 2.3. Metadata API for ABAP classes */
5192 
5193  /**
5194  * \brief Creates an empty class description with the given name.
5195  * \ingroup class
5196  *
5197  * Add attribute descriptions to the new RFC_CLASS_DESC_HANDLE via RfcAddAttribute().\n
5198  *
5199  * After the handle was used for creating a container, any modifications are forbidden.
5200  *
5201  * \in *name The name of the ABAP class.
5202  * \out *errorInfo Probably not enough memory left?!
5203  * \return An empty function description that can be used for constructing hard-coded metadata.
5204  */
5205  DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcCreateClassDesc(SAP_UC const* name, RFC_ERROR_INFO* errorInfo);
5206 
5207  /**
5208  * \brief Returns the class's DDIC name.
5209  * \ingroup class
5210  *
5211  *
5212  * \in classDesc The class description.
5213  * \out bufferForName Will receive the function module's DDIC name (zero terminated).
5214  * \out *errorInfo Should always return successfully.
5215  * \return RFC_RC
5216  */
5217  DECL_EXP RFC_RC SAP_API RfcGetClassName(RFC_CLASS_DESC_HANDLE classDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO* errorInfo);
5218 
5219  /**
5220  * \brief Adds a new attribute (field, structure, table, method) to the class description.
5221  * \ingroup class
5222  *
5223  * \note After the function description has been used via RfcCreateAbapObject() or RfcAddClassDesc(),
5224  * it can no longer be modified!
5225  *
5226  * \in classDesc The class description.
5227  * \in *attrDesc Metadata description of the new class attribute.
5228  * \out *errorInfo More details in case something goes wrong.
5229  * \return RFC_RC
5230  */
5231  DECL_EXP RFC_RC SAP_API RfcAddClassAttribute(RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_ATTRIBUTE_DESC* attrDesc, RFC_ERROR_INFO* errorInfo);
5232 
5233  /**
5234  * \brief Returns the number of parameters in the function module definition.
5235  * \ingroup class
5236  *
5237  *
5238  * \in classDesc The class description.
5239  * \out *count The number of attributes.
5240  * \out *errorInfo Nothing can go wrong here.
5241  * \return RFC_RC
5242  */
5243  DECL_EXP RFC_RC SAP_API RfcGetClassAttributesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned* count, RFC_ERROR_INFO* errorInfo);
5244 
5245  /**
5246  * \brief Reads the metadata description of the class attribute.
5247  * \ingroup class
5248  *
5249  * \note Is useful mostly when looping over all attributes of a class.
5250  *
5251  * \in classDesc The class metadata description.
5252  * \in index The index of the attributes to describe.
5253  * \out *attrDesc Metadata description of the class attribute.
5254  * \out *errorInfo Index out of bounds?
5255  * \return RFC_RC
5256  */
5257  DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByIndex(RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_ATTRIBUTE_DESC* attrDesc, RFC_ERROR_INFO* errorInfo);
5258 
5259  /**
5260  * \brief Reads the metadata description of a class attribute given by name.
5261  * \ingroup class
5262  *
5263  *
5264  * \in classDesc The class metadata description.
5265  * \in *name The name of the parameter to describe.
5266  * \out *attrDesc Metadata description of the class attribute.
5267  * \out *errorInfo No such parameter?
5268  * \return RFC_RC
5269  */
5271 
5272 
5273  /**
5274  * \brief Returns the parent classes of the given class.
5275  * \ingroup class
5276  *
5277  * \in classDesc The class metadata description.
5278  * \in name The parent class name.
5279  * \in index Index of parent class.
5280  * \out *errorInfo Current class does not inherit from parent class?
5281  * \return RFC_RC
5282  */
5283  DECL_EXP RFC_RC SAP_API RfcGetParentClassByIndex(RFC_CLASS_DESC_HANDLE classDesc, RFC_CLASS_NAME name, unsigned index, RFC_ERROR_INFO* errorInfo);
5284 
5285  /**
5286  * \brief Returns the number of parent classes of the given class.
5287  * \ingroup class
5288  *
5289  *
5290  * \in classDesc The class metadata description.
5291  * \out *parentClassesCount Number of parent classes in the list.
5292  * \out *errorInfo Should always be successful.
5293  * \return RFC_RC
5294  */
5295  DECL_EXP RFC_RC SAP_API RfcGetParentClassesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned* parentClassesCount, RFC_ERROR_INFO* errorInfo);
5296 
5297  /**
5298  * \brief Sets the parent classes of the given class.
5299  * \ingroup class
5300  *
5301  *
5302  * \in classDesc The class metadata description.
5303  * \in name Parent class name to be added.
5304  * \out *errorInfo No such parameter?
5305  * \return RFC_RC
5306  */
5307  DECL_EXP RFC_RC SAP_API RfcAddParentClass(RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_NAME name, RFC_ERROR_INFO* errorInfo);
5308 
5309  /**
5310  * \brief Returns the implemented interfaces of the given class.
5311  * \ingroup class
5312  *
5313  *
5314  * \in classDesc The class metadata description.
5315  * \in index Index of the implemented interface.
5316  * \out name Buffer for the implemented interface's name.
5317  * \out *errorInfo Index out of bounds?
5318  * \return RFC_RC
5319  */
5320  DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfaceByIndex(RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_NAME name, RFC_ERROR_INFO* errorInfo);
5321 
5322  /**
5323  * \brief Returns the number of parent interfaces of the given class.
5324  * \ingroup class
5325  *
5326  *
5327  * \in classDesc The class metadata description.
5328  * \out *implementedInterfacesCount Number of implemented interfaces.
5329  * \out *errorInfo Should always be successful.
5330  * \return RFC_RC
5331  */
5332  DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfacesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned* implementedInterfacesCount, RFC_ERROR_INFO* errorInfo);
5333 
5334  /**
5335  * \brief Adds an interface to the list of implemented interfaces of the given class.
5336  * \ingroup class
5337  *
5338  *
5339  * \in classDesc The class metadata description.
5340  * \in name Name of implemented interface to be added.
5341  * \out *errorInfo Not much can go wrong here except out of memory.
5342  * \return RFC_RC
5343  */
5345 
5346  /**
5347  * \brief Deletes the class description and releases the allocated resources.
5348  * \ingroup class
5349  *
5350  * Only descriptions, which are not stored in a repository cache and not used by the application, can be deleted.
5351  * Deleting a cached description will cause an error, and deleting a description that is still in use, will lead
5352  * to a crash.
5353  *
5354  *
5355  * \in classHandle The class description to be deleted.
5356  * \out *errorInfo More details in case the description can not be destroyed.
5357  * \return RFC_RC
5358  */
5359  DECL_EXP RFC_RC SAP_API RfcDestroyClassDesc(RFC_CLASS_DESC_HANDLE classHandle, RFC_ERROR_INFO *errorInfo);
5360 
5361 
5362  typedef void* RFC_METADATA_QUERY_RESULT_HANDLE; ///< Handle to a metadata query result.
5363 
5364  /** \struct _RFC_METADATA_QUERY_RESULT_ENTRY
5365  * \ingroup repository
5366  *
5367  * Structure containing the error that occurred during the metadata query.
5368  */
5370  {
5374 
5375  /** \enum _RFC_METADATA_OBJ_TYPE
5376  * \ingroup repository
5377  *
5378  * An RFC_METADATA_OBJ_TYPE indicates whether in a call to RfcGetMetadataQueryFailedEntry() or RfcGetMetadataQuerySucceededEntry()
5379  * you are interested in the error/success message for a function module (_FUNCTION), structure/table (_TYPE) or ABAP Class (_CLASS).
5380  * It needs to be passed to the above two functions.
5381  */
5383 
5384  /**
5385  * \brief Creates the metadata query result
5386  * \ingroup repository
5387  *
5388  * Metadata query results contain the names of functions, types and classes queried successfully, and the corresponding
5389  * errors, if the query failed.
5390  *
5391  * \out *errorInfo More details in error case
5392  * \return Handle to a metadata query result
5393  */
5394  DECL_EXP RFC_METADATA_QUERY_RESULT_HANDLE SAP_API RfcCreateMetadataQueryResult(RFC_ERROR_INFO *errorInfo);
5395 
5396  /**
5397  * \brief Destroys the metadata query result
5398  * \ingroup repository
5399  *
5400  * Releases all resources allocated by the metadata query result.
5401  *
5402  * \in handle Handle to a metadata query result
5403  * \out *errorInfo More details in error case
5404  * \return RFC_RC
5405  */
5406  DECL_EXP RFC_RC SAP_API RfcDestroyMetadataQueryResult(RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_ERROR_INFO *errorInfo);
5407 
5408  /**
5409  * \brief Describes the metadata query result
5410  * \ingroup repository
5411  *
5412  * Returns the number of succeeded and failed entries in the metadata query result. The entries' content can be read with
5413  * RfcGetMetadataQueryFailedEntry() and RfcGetMetadataQuerySucceededEntry().
5414  *
5415  * \in handle Handle to a metadata query result
5416  * \in type Type of the metadata objects you are interested in
5417  * \out *successful Number of metadata objects queried successfully
5418  * \out *failed Number of metadata objects that could not be queried
5419  * \out *errorInfo More details in error case
5420  * \return RFC_RC
5421  */
5422  DECL_EXP RFC_RC SAP_API RfcDescribeMetadataQueryResult(RFC_METADATA_QUERY_RESULT_HANDLE handle,
5423  RFC_METADATA_OBJ_TYPE type, unsigned* successful, unsigned *failed, RFC_ERROR_INFO *errorInfo);
5424 
5425  /**
5426  * \brief Returns the error entry from the metadata query result
5427  * \ingroup repository
5428  *
5429  * Returns the object name and the error text, if an error occurred during the query.
5430  *
5431  * \in handle Handle to a metadata query result
5432  * \in type Type of the requested object
5433  * \in index Index of the requested object. Must be between 0 and "failed - 1", where "failed" is the value
5434  * returned from RfcDescribeMetadataQueryResult() for the given RFC_METADATA_OBJ_TYPE.
5435  * \inout *entry Pointer to the allocated structure to store the name of the metadata object and the error text
5436  * \out *errorInfo More details in error case
5437  * \return RFC_RC
5438  */
5439  DECL_EXP RFC_RC SAP_API RfcGetMetadataQueryFailedEntry(RFC_METADATA_QUERY_RESULT_HANDLE handle,
5440  RFC_METADATA_OBJ_TYPE type, unsigned index, RFC_METADATA_QUERY_RESULT_ENTRY* entry, RFC_ERROR_INFO *errorInfo);
5441 
5442  /**
5443  * \brief Returns a succeeded entry from the metadata query result
5444  * \ingroup repository
5445  *
5446  * Returns the object name of a successfully queried object.
5447  *
5448  * \in handle Handle to a metadata query result
5449  * \in type Type of the requested object
5450  * \in index Index of the requested object. Must be between 0 and "successful - 1", where "successful" is the value
5451  * returned from RfcDescribeMetadataQueryResult() for the given RFC_METADATA_OBJ_TYPE.
5452  * \inout *succeedObj Pointer to the allocated buffer to store the name of the metadata object
5453  * \out *errorInfo More details in error case
5454  * \return RFC_RC
5455  */
5456  DECL_EXP RFC_RC SAP_API RfcGetMetadataQuerySucceededEntry(RFC_METADATA_QUERY_RESULT_HANDLE handle,
5457  RFC_METADATA_OBJ_TYPE type, unsigned index, RFC_ABAP_NAME succeedObj, RFC_ERROR_INFO *errorInfo);
5458 
5459 
5460  /**
5461  * \brief Queries the meta data for function, type and class lists.
5462  * \ingroup repository
5463  *
5464  * Queries the meta data for function, type and class lists. All meta data is fetched using one roundtrip,
5465  * the result is cached in the repository cache.
5466  *
5467  * \note You can use this feature only, if your backend system supports it. SAP Note 1456826 describes the
5468  * required minimum support package level that the backend system must have. If the backend system supports
5469  * it, open the RFC_CONNECTION_HANDLE with the additional logon parameter USE_REPOSITORY_ROUNDTRIP_OPTIMIZATION=1,
5470  * before you pass it to %RfcMetadataBatchQuery().
5471  *
5472  * \in rfcHandle Open client connection to the R/3 System, for which you need the function module, type or class descriptions.
5473  * \in *functionNames Names of the function modules to look up
5474  * \in functionCount Length of the function name list
5475  * \in *typeNames Names of the types (structures and tables) to look up
5476  * \in typeCount Length of the type name list
5477  * \in *classNames Names of the classes to look up
5478  * \in classCount Length of the class name list
5479  * \in handle Query result, may be null
5480  * \out *errorInfo More error details in case something goes wrong
5481  * \return RFC_RC
5482  */
5484  const SAP_UC** functionNames, unsigned functionCount, const SAP_UC** typeNames, unsigned typeCount,
5485  const SAP_UC** classNames, unsigned classCount, RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_ERROR_INFO *errorInfo);
5486 
5487 
5488 
5489  /* ***********************************************************************/
5490  /* */
5491  /* Throughput API */
5492  /* */
5493  /* ***********************************************************************/
5494 
5495 
5496  /**
5497  * \brief Creates a throughput object that can be used to measure performance relevant data of connections and servers.
5498  * \ingroup throughput
5499  *
5500  * The created throughput object can be attached to a connection (via RfcSetThroughputOnConnection()) or an automated server (via RfcSetThroughputOnServer())
5501  * and will collect performance relevant data from the outgoing or incoming calls. The throughput object will monitor all relevant data until it is removed from the
5502  * connection or server or the object it is attached to is destroyed, i.e. the connection is closed. Note that only one throughput per connection (or server)
5503  * is possible. On the contrary one throughput can be attached to many connections (and/or servers).
5504  * There are serveral functions that handle the throughput and its lifetime like RfcRemoveThroughputFromConnection() or RfcResetThroughput().
5505  * Additionally there are RfcGetX functions to obtain the aggregated data from the throughput.
5506  *
5507  * \out *errorInfo Error information in case there's not enough memory.
5508  * \return A handle to the throughput object.
5509  */
5511 
5512 
5513  /**
5514  * \brief Releases all memory used by the throughput object.
5515  * \ingroup throughput
5516  *
5517  * \warning Be careful: if you have attached the throughput to a connection (RFC_CONNECTION_HANDLE) or
5518  * server (RFC_SERVER_HANDLE) you have to remove the throughput from the connection or server before deleting it.
5519  * Alternatively you can close the connection or shutdown the server before destroying the throughput object.
5520  *
5521  * \in throughput A handle to the throughput object.
5522  * \out *errorInfo Not much that can go wrong here.
5523  * \return RFC_RC
5524  */
5525  DECL_EXP RFC_RC SAP_API RfcDestroyThroughput(RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO* errorInfo);
5526 
5527 
5528  /**
5529  * \brief Attaches a throughput object to a connection to be monitored by the throughput object.
5530  * \ingroup throughput
5531  *
5532  * Once attached to a connection, the throughput object will collect data of the function calls invoked via this connection.
5533  * If there is already another throughput obejct attached to the connection, the old one will be replaced by the given one.
5534  * The below chart shows a simplified view how the different time measurements apply for a client call.
5535  *
5536  * Client Server (backend) Client
5537  *
5538  * API begin serialization writing server time reading deserialization API return
5539  * ____________|_______________|_________ _|_____________|_ _________|_________________|____________
5540  *
5541  * \in rfcHandle A handle to a currently open RFC connection (client or server connection).
5542  * \in throughput A handle to the throughput object.
5543  * \out *errorInfo More details in error case.
5544  * \return RFC_RC
5545  */
5547 
5548 
5549  /**
5550  * \brief Returns the currently attached throughput object from a connection, if any.
5551  * \ingroup throughput
5552  *
5553  * Returns null if none is attached.
5554  *
5555  * \in rfcHandle A handle to a currently open RFC connection (client or server connection).
5556  * \out *errorInfo More details in error case.
5557  * \return A handle to a throughput object.
5558  */
5560 
5561 
5562  /**
5563  * \brief Removes the throughput object from a connection. The connection will no longer be monitored.
5564  * \ingroup throughput
5565  *
5566  * \in rfcHandle A handle to a currently open RFC connection (client or server connection).
5567  * \out *errorInfo More details in error case.
5568  * \return RFC_RC
5569  */
5571 
5572 
5573  /**
5574  * \brief Attaches a throughput object to an automated server.
5575  * \ingroup throughput
5576  *
5577  * Once attached to a server the throughput object will collect data of the function calls received by this server.
5578  * As the automated server handles its connections by itself, it will also attach the throughput to all of its connections
5579  * and to all connections that might be re-opened.
5580  * If there is already another throughput attached to the server, the old one will be replaced by the given one.
5581  * The below chart shows a simplified view how the different time measurements apply for a call received by the server.
5582  *
5583  * Client automated Server Client
5584  *
5585  * call begin (accepting) reading deserialization C-application serialization writing call end
5586  * ____________|_ _____________|_________|_________________|_______________|_______________|_________ _|___________
5587  *
5588  *
5589  * \in serverHandle A handle to the server object.
5590  * \in throughput A handle to the throughput object.
5591  * \out *errorInfo More details in error case.
5592  * \return RFC_RC
5593  */
5594  DECL_EXP RFC_RC SAP_API RfcSetThroughputOnServer(RFC_SERVER_HANDLE serverHandle, RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO* errorInfo);
5595 
5596 
5597  /**
5598  * \brief Returns the currently attached throughput object from a server, if any.
5599  * \ingroup throughput
5600  *
5601  * Returns null if none is attached.
5602  *
5603  * \in serverHandle A handle to the server object.
5604  * \out *errorInfo More details in error case.
5605  * \return A handle to a throughput object.
5606  */
5608 
5609 
5610  /**
5611  * \brief Removes the throughput from an automated server. The server will no longer be monitored.
5612  * \ingroup throughput
5613  *
5614  * \in serverHandle A handle to the server from which the throughput shall be detached.
5615  * \out *errorInfo More details in error case.
5616  * \return RFC_RC
5617  */
5619 
5620 
5621  /**
5622  * \brief Resets the data so far collected and aggregated by the throughput object.
5623  * \ingroup throughput
5624  *
5625  * \in throughput A handle to the throughput object.
5626  * \out *errorInfo More details in error case.
5627  * \return RFC_RC
5628  */
5629  DECL_EXP RFC_RC SAP_API RfcResetThroughput(RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO* errorInfo);
5630 
5631 
5632  /**
5633  * \brief Returns the cumulated number of calls the throughput object recorded since it was attached or since the last reset.
5634  * \ingroup throughput
5635  *
5636  * If a throughput object is attached to several connections or servers, this is the amount of calls that all these connections
5637  * and servers have processed up to now.
5638  *
5639  * \in throughput A handle to the throughput object.
5640  * \out *numberOfCalls Number of all monitored calls.
5641  * \out *errorInfo More details in error case.
5642  * \return RFC_RC
5643  */
5644  DECL_EXP RFC_RC SAP_API RfcGetNumberOfCalls(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* numberOfCalls, RFC_ERROR_INFO* errorInfo);
5645 
5646 
5647  /**
5648  * \brief Returns the cumulated time of call durations the throughput object recorded since it was attached or since the last reset.
5649  * \ingroup throughput
5650  *
5651  * If a throughput object is attached to several connections or servers, this is the total time of all processed calls.
5652  * This time includes serialization, deserialization, reading from network, writing to network and time consumed in the backend.
5653  * In case of a server it also includes time accepting a connection.
5654  * An approximation of the time for transmission and execution in the backend is defined by
5655  *
5656  * totalTime - serializationTime - deserializationTime (- applicationTime)
5657  *
5658  *
5659  * \in throughput A handle to the throughput object.
5660  * \out *totalTime Cumulated time of all function module calls processed by the corresponding connections or servers. The unit is milliseconds.
5661  * \out *errorInfo More details in error case.
5662  * \return RFC_RC
5663  */
5664  DECL_EXP RFC_RC SAP_API RfcGetTotalTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* totalTime, RFC_ERROR_INFO* errorInfo);
5665 
5666 
5667  /**
5668  * \brief Returns the cumulated serializationtime the throughput object recorded since it was attached or since the last reset.
5669  * \ingroup throughput
5670  *
5671  * If a throughput object is attached to several connections or servers, this is the serialization time of all processed calls.
5672  * Serialization time is defined as the time needed for transforming C/C++ data types into a byte stream that can be sent
5673  * over the network. This includes time needed for codepage conversions, endianness conversions etc., but not the time consumed
5674  * by writing to the network.
5675  *
5676  * \in throughput A handle to the throughput object.
5677  * \out *serializationTime Cumulated time all serialization processes took. The unit is milliseconds.
5678  * \out *errorInfo More details in error case.
5679  * \return RFC_RC
5680  */
5681  DECL_EXP RFC_RC SAP_API RfcGetSerializationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* serializationTime, RFC_ERROR_INFO* errorInfo);
5682 
5683 
5684  /**
5685  * \brief Returns the cumulated deserialization time the throughput object recorded since it was attached or since the last reset.
5686  * \ingroup throughput
5687  *
5688  * If a throughput object is attached to several connections or servers, this is the deserialization time of all processed calls.
5689  * Deserialization time is defined as the time needed for transforming a byte stream received from the network connection into
5690  * C/C++ data types that can be used by the application. This includes time needed for codepage conversions, endianness conversions etc.,
5691  * but not the time consumed by reading from the network.
5692  *
5693  * \in throughput A handle to the throughput object.
5694  * \out *deserializationTime Cumulated time all deserialization processes took. The unit is milliseconds.
5695  * \out *errorInfo More details in error case.
5696  * \return RFC_RC
5697  */
5698  DECL_EXP RFC_RC SAP_API RfcGetDeserializationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* deserializationTime, RFC_ERROR_INFO* errorInfo);
5699 
5700 
5701  /**
5702  * \brief Returns the cumulated time of the C implementations of ABAP function modules that the throughput object recorded
5703  * since it was attached or since the last reset.
5704  * \ingroup throughput
5705  *
5706  * This value is collected only in the case of server connections. (In the client case, function modules are of course
5707  * implemented in ABAP, not in C, and their time is included in the backend time.)
5708  * If a throughput is attached to several connections or servers, this is the application time of all invoked calls.
5709  *
5710  * \in throughput A handle to the throughput object.
5711  * \out *applicationTime Cumulated time all C impelementations of ABAP function modules took. The unit is milliseconds.
5712  * \out *errorInfo More details in error case.
5713  * \return RFC_RC
5714  */
5715  DECL_EXP RFC_RC SAP_API RfcGetApplicationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* applicationTime, RFC_ERROR_INFO* errorInfo);
5716 
5717 
5718  /**
5719  * \brief Returns the cumulated execution time of the requests at the server, that the throughput object recorded
5720  * since it was attached or since the last reset.
5721  * \ingroup throughput
5722  *
5723  * If a throughput object is attached to several connections or servers, this is the server time of all processed calls.
5724  * This value is measured at the backend by the partner and transmitted in the RFC data payload.
5725  *
5726  * \in throughput A handle to the throughput object.
5727  * \out *serverTime Cumulated time spent at the server side for the requests. The unit is milliseconds.
5728  * \out *errorInfo More details in error case.
5729  * \return RFC_RC
5730  */
5731  DECL_EXP RFC_RC SAP_API RfcGetServerTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* serverTime, RFC_ERROR_INFO* errorInfo);
5732 
5733  /**
5734  * \brief Returns the cumulated time that is used to write to network during the requests, that the throughput object recorded
5735  * since it was attached or since the last reset.
5736  * \ingroup throughput
5737  *
5738  * If a throughput object is attached to several connections or servers, this is the time used to write to network of all processed calls.
5739  * The time measures calls to underlying libraries such an NI functions and operating socket functions. Those times might not correctly represent the time
5740  * that is needed to send the data, as there are asynchronous IO functions used or the OS is responsible for sending the data.
5741  *
5742  * \in throughput A handle to the throughput object.
5743  * \out *writingTime Cumulated time spent writing to the network. The unit is milliseconds.
5744  * \out *errorInfo More details in error case.
5745  * \return RFC_RC
5746  */
5747  DECL_EXP RFC_RC SAP_API RfcGetNetworkWritingTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* writingTime, RFC_ERROR_INFO* errorInfo);
5748 
5749  /**
5750  * \brief Returns the cumulated time that is used to read from the network during the requests, that the throughput object recorded
5751  * since it was attached or since the last reset.
5752  * \ingroup throughput
5753  *
5754  * If a throughput object is attached to several connections or servers, this is the time used to read from the network of all processed calls.
5755  * The time measures calls to underlying libraries such an NI functions and operating socket functions. Those times might not correctly represent the time
5756  * that is needed to receive the data, as there are asynchronous IO functions used or the OS is responsible for receiving the data.
5757  *
5758  * \in throughput A handle to the throughput object.
5759  * \out *readingTime Cumulated time spent reading from the network. The unit is milliseconds.
5760  * \out *errorInfo More details in error case.
5761  * \return RFC_RC
5762  */
5763  DECL_EXP RFC_RC SAP_API RfcGetNetworkReadingTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* readingTime, RFC_ERROR_INFO* errorInfo);
5764  /**
5765  * \brief Returns the cumulated amount of sent bytes the throughput object recorded since it was attached or since the last reset.
5766  * \ingroup throughput
5767  *
5768  * If a throughput is attached to several connections or servers, this is the amount of bytes sent by all processed calls.
5769  *
5770  * \in throughput A handle to the throughput object.
5771  * \out *sentBytes Cumulated amount of bytes sent over the network.
5772  * \out *errorInfo More details in error case.
5773  * \return RFC_RC
5774  */
5775  DECL_EXP RFC_RC SAP_API RfcGetSentBytes(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* sentBytes, RFC_ERROR_INFO* errorInfo);
5776 
5777 
5778  /**
5779  * \brief Returns the cumulated amount of received bytes the throughput object recorded since it was attached or since the last reset.
5780  * \ingroup throughput
5781  *
5782  * If a throughput is attached to several connections or servers, this is the amount of bytes received by all processed calls.
5783  *
5784  * \in throughput A handle to the throughput object.
5785  * \out *receivedBytes Cumulated amount of bytes received from the network.
5786  * \out *errorInfo More details in error case.
5787  * \return RFC_RC
5788  */
5789  DECL_EXP RFC_RC SAP_API RfcGetReceivedBytes(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG* receivedBytes, RFC_ERROR_INFO* errorInfo);
5790 
5791 
5792  /**
5793  * \brief Set Timeout for Message Server Response
5794  *
5795  * During Group Logon and during Group Registration (registration of an RFC server at multiple gateways),
5796  * the NW RFC library sends requests to the message server, asking for the currently "least busy" application
5797  * server (load balancing) or for a list of all application servers contained in a group.
5798  * This timeout specifies, how long the NW RFC library will wait for the corresponding responses from the
5799  * message server, before aborting with a timeout error.
5800  *
5801  * \in timeout Timeout in seconds
5802  * \out *errorInfo More details in error case.
5803  * \return RFC_RC
5804  */
5805  DECL_EXP RFC_RC SAP_API RfcSetMessageServerResponseTimeout(unsigned timeout, RFC_ERROR_INFO* errorInfo);
5806 
5807 
5808  /**
5809  * \brief Sets the maximum number of concurrent CPIC conversations.
5810  *
5811  * The API can only be called if there are no current CPIC conversations active. A number smaller than the current maximum
5812  * will be ignored.
5813  * The default value is 200.
5814  *
5815  * The number can also be increased by setting MAX_CPIC_CONVERSATIONS in the DEFAULT section of the sapnwrfc.ini file.
5816  *
5817  * \in maxCpicConversations Maximum of concurrent CPIC conversations
5818  * \out *errorInfo More details in error case.
5819  * \return RFC_RC
5820  */
5821  DECL_EXP RFC_RC SAP_API RfcSetMaximumCpicConversations(unsigned maxCpicConversations, RFC_ERROR_INFO* errorInfo);
5822 
5823  /**
5824  * \brief Gets the maximum number of parallel CPIC conversations.
5825  *
5826  * The default value is 200.
5827  *
5828  * \in *maxCpicConversations Current maximum of parallel CPIC conversations
5829  * \out *errorInfo More details in error case.
5830  * \return RFC_RC
5831  */
5832  DECL_EXP RFC_RC SAP_API RfcGetMaximumCpicConversations(unsigned* maxCpicConversations, RFC_ERROR_INFO* errorInfo);
5833 
5834 
5835  /**
5836  * \brief Sets the global logon timeout in seconds.
5837  *
5838  * Sets the timeout for how long the logon in the ABAP backend can take during RfcOpenConnection().
5839  * The valid range of values is [1,3600].
5840  * The default value is 60 seconds.
5841  *
5842  * The timeout can also be set via RFC_GLOBAL_LOGON_TIMEOUT in the DEFAULT section of the sapnwrfc.ini file.
5843  *
5844  * \in logonTimeout gloabl logon timeout in seconds.
5845  * \out *errorInfo More details in error case.
5846  * \return RFC_RC
5847  */
5848  DECL_EXP RFC_RC SAP_API RfcSetGlobalLogonTimeout(unsigned logonTimeout, RFC_ERROR_INFO* errorInfo);
5849 
5850 #ifdef __cplusplus
5851 }
5852 #endif /*cplusplus*/
5853 
5854 #endif
RFC_UNITID unitID
The 32 digit unit ID of the background unit.
Definition: sapnwrfc.h:317
SAP_UC RFC_TID[RFC_TID_LN+1]
Used for TIDs in inbound and outbound tRFC/qRFC.
Definition: sapnwrfc.h:81
DECL_EXP const SAP_UC *SAP_API RfcGetSessionEventAsString(RFC_SESSION_EVENT sessionEvent)
Converts an RFC_SESSION_EVENT to a human readable string for logging purposes.
DECL_EXP RFC_RC SAP_API RfcGetTableByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TABLE_HANDLE *tableHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to a table.
Authentication with x509 certificate.
Definition: sapnwrfc.h:375
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcDescribeFunction(RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Returns the metadata description for the given function module.
Problems raised by the authentication handler (RFC_ON_AUTHENTICATION_CHECK)
Definition: sapnwrfc.h:188
Handle to a throughput object which can monitor performance relevant data of connections and servers...
Definition: sapnwrfc.h:458
DECL_EXP RFC_RC SAP_API RfcPing(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
Ping the remote communication partner through the passed connection handle.
DECL_EXP RFC_RC SAP_API RfcSetCharsByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given char value (charValue/valueLength) into the field.
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcDescribeType(DATA_CONTAINER_HANDLE dataHandle, RFC_ERROR_INFO *errorInfo)
Returns the metadata description of the given structure or table (RFC_STRUCTURE_HANDLE or RFC_TABLE_H...
Handle to a data container for a function module.
Handle to an authentication object which gives access to relevant authentication data received from t...
Definition: sapnwrfc.h:467
DECL_EXP RFC_RC SAP_API RfcGetTypeLength(RFC_TYPE_DESC_HANDLE typeHandle, unsigned *nucByteLength, unsigned *ucByteLength, RFC_ERROR_INFO *errorInfo)
Returns the total byte length of a structure definition.
Backend system is still in the process of persisting (or executing if type 'T') the payload data...
Definition: sapnwrfc.h:328
SAP_RAW RFC_BCD
Packed numbers, RFCTYPE_BCD /*SAPUNICODEOK_CHARTYPE*/.
Definition: sapnwrfc.h:60
RFC_RC(SAP_API * RFC_ON_COMMIT_TRANSACTION)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *tid)
Definition: sapnwrfc.h:728
RFC_CHAR RFC_CLASS_ATTRIBUTE_DESCRIPTION[511+1]
Default value of a function module parameter. (null-terminated)
Definition: sapnwrfc.h:697
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfacesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned *implementedInterfacesCount, RFC_ERROR_INFO *errorInfo)
Returns the number of parent interfaces of the given class.
DECL_EXP RFC_RC SAP_API RfcInvokeInTransaction(RFC_TRANSACTION_HANDLE tHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Adds a function module call to a transaction.
DECL_EXP RFC_RC SAP_API RfcGetMetadataQuerySucceededEntry(RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_METADATA_OBJ_TYPE type, unsigned index, RFC_ABAP_NAME succeedObj, RFC_ERROR_INFO *errorInfo)
Returns a succeeded entry from the metadata query resultReturns the object name of a successfully que...
DECL_EXP RFC_RC SAP_API RfcGetTime(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_TIME emptyTime, RFC_ERROR_INFO *errorInfo)
Reads a TIME field.
Registered RFC Server.
Definition: sapnwrfc.h:496
Structure used for connecting to a backend system via RfcOpenConnection() or RfcRegisterServer().
Definition: sapnwrfc.h:608
RFC_PROTOCOL_TYPE type
This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER.
Definition: sapnwrfc.h:526
RFC_ABAP_NAME name
Parameter name, null-terminated string.
Definition: sapnwrfc.h:658
Problems raised in the authorization check handler provided by the external server implementation...
Definition: sapnwrfc.h:187
the max. value of RFCTYPEs
Definition: sapnwrfc.h:124
SAP_UC unitType
'T' for "transactional" behavior (unit is executed synchronously), 'Q' for "queued" behavior (unit is...
Definition: sapnwrfc.h:316
DECL_EXP RFC_RC SAP_API RfcSNCKeyToName(SAP_UC const *sncLib, SAP_RAW const *sncKey, unsigned keyLength, SAP_UC *sncName, unsigned nameLength, RFC_ERROR_INFO *errorInfo)
Converts SNC key to SNC name.
time/second, 4-byte integer
Definition: sapnwrfc.h:119
short kernelTrace
If != 0, the backend will write kernel traces, while executing this unit.
Definition: sapnwrfc.h:291
Notifies an RFC Server that a stateful user session has just been created or destroyed.
Definition: sapnwrfc.h:551
RFC_CALL_TYPE type
Specifies the type of function call. Depending on the value of this field, some of the other fields o...
Definition: sapnwrfc.h:359
DECL_EXP RFC_RC SAP_API RfcGetFieldDescByName(RFC_TYPE_DESC_HANDLE typeHandle, SAP_UC const *name, RFC_FIELD_DESC *fieldDescr, RFC_ERROR_INFO *errorInfo)
Reads the field description of a field given by name.
DECL_EXP RFC_RC SAP_API RfcSetInt2ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT2 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT2 field.
short satTrace
If != 0, the backend will write statistic records, while executing this unit.
Definition: sapnwrfc.h:292
date/month, 4-byte integer
Definition: sapnwrfc.h:118
int RFC_INT
4 byte integer, RFCTYPE_INT
Definition: sapnwrfc.h:63
This function call is part of a queued LUW (qRFC).
Definition: sapnwrfc.h:348
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByIndex(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_PARAMETER_DESC *paramDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of the function module's ith parameter.
struct _RFC_FIELD_DESC * P_RFC_FIELD_DESC
DECL_EXP RFC_RC SAP_API RfcSetInt8ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT8 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT8 field.
The operation is not supported on that handle.
Definition: sapnwrfc.h:153
Table parameter. This corresponds to ABAP TABLES parameter.
Definition: sapnwrfc.h:647
const SAP_UC * subject
Distinguished name of the user of the certificate.
Definition: sapnwrfc.h:387
DECL_EXP RFC_RC SAP_API RfcCloseConnection(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
Closes an RFC connectionCan be used to close client connections as well as server connections...
Temporary state between the Confirm event and the time, when the status data will be erased for good...
Definition: sapnwrfc.h:331
DECL_EXP RFC_RC SAP_API RfcGetString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_UC *stringBuffer, unsigned bufferLength, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as null-terminated string.
SAP_UC hostname[40+1]
Sender hostname. Used only when the external program is server. In the client case the nwrfclib fills...
Definition: sapnwrfc.h:305
RFC_RC(SAP_API * RFC_ON_CHECK_UNIT)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier)
Definition: sapnwrfc.h:735
DECL_EXP RFC_RC SAP_API RfcInvokeInUnit(RFC_UNIT_HANDLE unitHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Adds a function module to a bgRFC unit.
calendar day, 2-byte integer
Definition: sapnwrfc.h:121
struct _RFC_CONNECTION_PARAMETER * P_RFC_CONNECTION_PARAMETER
TCP Server.
Definition: sapnwrfc.h:499
RFC_ATTRIBUTES * clientInfo
Pointer to an RFC_ATTRIBUTES structure containing information about this particular client connection...
Definition: sapnwrfc.h:578
RFC_RC(SAP_API * RFC_ON_CONFIRM_UNIT)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier)
Definition: sapnwrfc.h:738
DECL_EXP RFC_RC SAP_API RfcIsBASXMLSupported(RFC_FUNCTION_DESC_HANDLE funcDesc, int *isEnabled, RFC_ERROR_INFO *errorInfo)
Returns whether this function module has been enabled for basXML.
double RFC_FLOAT
Floating point, double precision, RFCTYPE_FLOAT.
Definition: sapnwrfc.h:64
struct _RFC_EXCEPTION_DESC RFC_EXCEPTION_DESC
A problem while serializing or deserializing RFM parameters.
Definition: sapnwrfc.h:147
SAP_UC abapMsgType[1+1]
ABAP message type, e.g. 'E', 'A' or 'X'.
Definition: sapnwrfc.h:216
DECL_EXP RFC_RC SAP_API RfcGetInt2ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT2 *value, RFC_ERROR_INFO *errorInfo)
Returns the field value as a signed two byte integer.
DECL_EXP RFC_RC SAP_API RfcGetStructureByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_STRUCTURE_HANDLE *structHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to a structure.
SAP_UC partnerSystemCodepage[4+1]
Partner system code page.
Definition: sapnwrfc.h:253
SAP_UC type[1+1]
2/3/E/R: R/2,R/3,Ext,Reg.Ext
Definition: sapnwrfc.h:245
Handle to a data container for a table.
Digits, fixed size, leading '0' padded.
Definition: sapnwrfc.h:99
RFC_UNIT_IDENTIFIER * unitIdentifier
If type is RFC_BACKGROUND_UNIT, this pointer is set to the unit identifier of the LUW...
Definition: sapnwrfc.h:361
void * RFC_METADATA_QUERY_RESULT_HANDLE
Handle to a metadata query result.
Definition: sapnwrfc.h:5362
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfaceByIndex(RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
Returns the implemented interfaces of the given class.
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
Removes the throughput from an automated server.
RFC_SESSION_EVENT event
What has been done with that session.
Definition: sapnwrfc.h:553
struct _RFC_TRANSACTION_HANDLE * RFC_TRANSACTION_HANDLE
RFC_TYPE_DESC_HANDLE typeDescHandle
Handle to the structure definition in case this attribute is a structure or table.
Definition: sapnwrfc.h:712
DECL_EXP RFC_RC SAP_API RfcSetParameterActive(RFC_FUNCTION_HANDLE funcHandle, SAP_UC const *paramName, int isActive, RFC_ERROR_INFO *errorInfo)
Allows to deactivate certain parameters in the function module interface.
boxed structure, note: not supported by NW RFC lib
Definition: sapnwrfc.h:122
DECL_EXP RFC_RC SAP_API RfcSetTimeByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TIME time, RFC_ERROR_INFO *errorInfo)
Sets the value of a TIME field.
SAP_UC program[40+1]
Sender Program (optional). Default is current executable name.
Definition: sapnwrfc.h:304
Time out.
Definition: sapnwrfc.h:143
DECL_EXP RFC_RC SAP_API RfcGetBytes(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as byte array.
Problems with the network connection (or backend broke down and killed the connection) ...
Definition: sapnwrfc.h:184
DECL_EXP RFC_ABAP_OBJECT_HANDLE SAP_API RfcGetAbapClassException(RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Gets the ABAP exception object handle from the given function handle.
unsigned char SAP_RAW
unsigned 1 byte integer
DECL_EXP RFC_RC SAP_API RfcSetDecF34(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DECF34 value, RFC_ERROR_INFO *errorInfo)
Sets the value of a 16 byte decfloat object into a field.
SAP_RAW * sncAclKey
Canonical representation of the SNC name of the calling ABAP system, if SNC is enabled. Use this for comparisons and access checks.
Definition: sapnwrfc.h:274
DECL_EXP const SAP_UC *SAP_API RfcGetServerStateAsString(RFC_SERVER_STATE serverState)
Converts an RFC_SERVER_STATE state indicator to a human readable string for logging purposes...
RFC_CHAR RFC_ABAP_NAME[30+1]
Name of ABAP function, function parameter or field in a structure. (null-terminated) ...
Definition: sapnwrfc.h:334
Error while converting a parameter to the correct data type.
Definition: sapnwrfc.h:157
timestamp/minute, 8-byte integer
Definition: sapnwrfc.h:115
DECL_EXP RFC_RC SAP_API RfcGetStructure(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_STRUCTURE_HANDLE *structHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to a structure.
RFC_SERVER_STATE newState
New state of the given server.
Definition: sapnwrfc.h:567
void(SAP_API * RFC_SERVER_ERROR_LISTENER)(RFC_SERVER_HANDLE serverHandle, RFC_ATTRIBUTES *clientInfo, RFC_ERROR_INFO *errorInfo)
Definition: sapnwrfc.h:558
RFC_NUM abapMsgNumber[3+1]
ABAP message number.
Definition: sapnwrfc.h:217
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcCreateTypeDesc(SAP_UC const *name, RFC_ERROR_INFO *errorInfo)
Creates an empty type description with the given name.
DECL_EXP RFC_RC SAP_API RfcInstallTransactionHandlers(SAP_UC const *sysId, RFC_ON_CHECK_TRANSACTION onCheckFunction, RFC_ON_COMMIT_TRANSACTION onCommitFunction, RFC_ON_ROLLBACK_TRANSACTION onRollbackFunction, RFC_ON_CONFIRM_TRANSACTION onConfirmFunction, RFC_ERROR_INFO *errorInfo)
Installs the necessary callback functions for processing incoming tRFC/qRFC calls.
DECL_EXP RFC_RC SAP_API RfcGetFloat(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_FLOAT *value, RFC_ERROR_INFO *errorInfo)
Returns the value of the given field as an RFC_FLOAT.
struct _RFC_SERVER_CONTEXT RFC_SERVER_CONTEXT
unsigned nucLength
Parameter length in bytes in a 1-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:661
short RFC_CDAY
Calandendar day: Day and month.
Definition: sapnwrfc.h:77
SAP_UC * ssoTicket
Logon ticket of the ABAP user, if SSO2 or assertion tickets are enabled.
Definition: sapnwrfc.h:273
Problems when dealing with functions provided by the cryptolibrary.
Definition: sapnwrfc.h:189
DECL_EXP RFC_RC SAP_API RfcSetFloatByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_FLOAT value, RFC_ERROR_INFO *errorInfo)
Sets a floating point field.
Handle to an automated ("multi-count") RFC Server, which can manage multiple parallel listening serve...
Definition: sapnwrfc.h:485
DECL_EXP RFC_RC SAP_API RfcGetAbapObjectByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_ABAP_OBJECT_HANDLE *objHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to an abap object.
An error of any type has occurred. Unit needs to be resent.
Definition: sapnwrfc.h:330
DECL_EXP RFC_RC SAP_API RfcGetChars(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as char array.
struct _RFC_THROUGHPUT_HANDLE * RFC_THROUGHPUT_HANDLE
SAP_RAW RFC_INT1
1 byte integer, RFCTYPE_INT1
Definition: sapnwrfc.h:61
SAP_UC sysNumber[2+1]
R/3 system number.
Definition: sapnwrfc.h:235
Handle to a data container for a structure.
DECL_EXP RFC_RC SAP_API RfcDestroyTransaction(RFC_TRANSACTION_HANDLE tHandle, RFC_ERROR_INFO *errorInfo)
Releases the memory of the transaction container.
RFC_CHAR RFC_CLASS_ATTRIBUTE_DEFVALUE[30+1]
Default value of a function module parameter. (null-terminated)
Definition: sapnwrfc.h:695
DECL_EXP RFC_RC SAP_API RfcRemoveFunctionDesc(SAP_UC const *repositoryID, SAP_UC const *functionName, RFC_ERROR_INFO *errorInfo)
Removes a function description from the cache for the specified R/3 System.
DATA_CONTAINER_HANDLE RFC_TABLE_HANDLE
Definition: sapnwrfc.h:443
Error message raised when logon fails.
Definition: sapnwrfc.h:183
ABAP Message raised in ABAP function modules or in ABAP runtime of the backend (e.g Kernel)
Definition: sapnwrfc.h:182
DECL_EXP RFC_RC SAP_API RfcGetPartnerSNCKey(RFC_CONNECTION_HANDLE rfcHandle, SAP_RAW *sncKey, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets partner's SNC key, if any.
Instance attribute (object member)
Definition: sapnwrfc.h:690
DECL_EXP RFC_RC SAP_API RfcSaveRepository(SAP_UC const *repositoryID, FILE *const targetStream, RFC_ERROR_INFO *errorInfo)
Stores the currently cached objects of a repository into a JSON formatted text file.
enum _RFC_SERVER_STATE RFC_SERVER_STATE
RFC_RC(SAP_API * RFC_ON_PASSWORD_CHANGE)(SAP_UC const *sysId, SAP_UC const *user, SAP_UC const *client, SAP_UC *password, unsigned passwordLength, SAP_UC *newPassword, unsigned newPasswordLength, RFC_ERROR_INFO *cause)
Definition: sapnwrfc.h:740
DECL_EXP RFC_RC SAP_API RfcEnableBASXML(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO *errorInfo)
Enables this function module for the basXML serialization format.
DECL_EXP RFC_RC SAP_API RfcRemoveTypeDesc(SAP_UC const *repositoryID, SAP_UC const *typeName, RFC_ERROR_INFO *errorInfo)
Removes a type description from the cache.
RFC_BYTE optional
Specifies whether this parameter is defined as optional in SE37. 1 is optional, 0 non-optional...
Definition: sapnwrfc.h:667
Structure for reading (RfcGetExceptionDescByIndex() or RfcGetExceptionDescByName()) or defining (RfcA...
Definition: sapnwrfc.h:677
DECL_EXP RFC_RC SAP_API RfcSetStructureByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the given structure into the target structure of the parent container.
SAP_UC key[128]
Error key.
Definition: sapnwrfc.h:213
DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcStartServer(int argc, SAP_UC **argv, RFC_CONNECTION_PARAMETER const *connectionParams, unsigned paramCount, RFC_ERROR_INFO *errorInfo)
Allows a program to be used as an RFC server which is started by the backend on demand.
unsigned ucOffset
Field offset in bytes in a 2-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:631
DECL_EXP RFC_RC SAP_API RfcSetDecF34ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF34 value, RFC_ERROR_INFO *errorInfo)
Sets the value of a 16 byte decfloat object into a field.
DECL_EXP RFC_RC SAP_API RfcSetTableByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the given table into the target table of the parent container.
int RFC_DTMONTH
date/month
Definition: sapnwrfc.h:74
DECL_EXP RFC_RC SAP_API RfcMoveToFirstRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Positions the table cursor at the first row (or at index "-1", if the table is empty).
int RFC_DTWEEK
date/week
Definition: sapnwrfc.h:73
DECL_EXP RFC_RC SAP_API RfcSetStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given string value (stringValue/valueLength) into the field.
DECL_EXP RFC_RC SAP_API RfcInit(void)
Initialization of internal variablesObsolete.
RFC_CLASS_ATTRIBUTE_DEFVALUE defaultValue
Default value as defined in SE37.
Definition: sapnwrfc.h:713
DECL_EXP RFC_RC SAP_API RfcAddParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_PARAMETER_DESC *paramDescr, RFC_ERROR_INFO *errorInfo)
Adds a new parameter (IMPORTING, EXPORTING, CHANGING, TABLES) to the function description.
struct _RFC_SERVER_HANDLE * RFC_SERVER_HANDLE
SAP_UC * sncName
SNC name of the calling ABAP system, if SNC is enabled. Use this only for display or logging purposes...
Definition: sapnwrfc.h:272
SAP_UC progName[128+1]
Name of the calling APAB program (report, module pool)
Definition: sapnwrfc.h:251
Structure returned by RfcGetConnectionAttributes() giving some information about the partner system o...
Definition: sapnwrfc.h:230
struct _RFC_EXCEPTION_DESC * P__RFC_EXCEPTION_DESC
Floating point, double precision.
Definition: sapnwrfc.h:100
#define RFC_TID_LN
Definition: sapnwrfc.h:79
unsigned peakBusyCount
The maximum number of requests the server has been processing in parallel since it has been created...
Definition: sapnwrfc.h:530
Handle to a cached metadata description of a structure or table type.
Definition: sapnwrfc.h:400
SAP_UC * progName
Name of the calling APAB program (report, module pool)
Definition: sapnwrfc.h:271
RFCTYPE type
Field data type.
Definition: sapnwrfc.h:623
DECL_EXP RFC_RC SAP_API RfcSetXStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given byte value (byteValue/valueLength) into the field.
1-byte integer, unsigned. Obsolete, not directly supported by ABAP/4
Definition: sapnwrfc.h:103
DECL_EXP RFC_RC SAP_API RfcGetServerConnectionMonitorData(RFC_SERVER_HANDLE serverHandle, unsigned *numberOfConnections, RFC_SERVER_MONITOR_DATA **connectionData, RFC_ERROR_INFO *errorInfo)
Retrieves detailed information about all clients currently connected to a multi-count Registered Serv...
DATA_CONTAINER_HANDLE RFC_ABAP_OBJECT_HANDLE
Definition: sapnwrfc.h:450
DECL_EXP RFC_RC SAP_API RfcGetSentBytes(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *sentBytes, RFC_ERROR_INFO *errorInfo)
Returns the cumulated amount of sent bytes the throughput object recorded since it was attached or si...
DECL_EXP RFC_RC SAP_API RfcShutdownServer(RFC_SERVER_HANDLE serverHandle, unsigned timeout, RFC_ERROR_INFO *errorInfo)
Stops an automatic server, so that it no longer accepts incoming requests.
"Something" went wrong, but I don't know what...
Definition: sapnwrfc.h:163
struct _RFC_CLASS_ATTRIBUTE_DESC RFC_CLASS_ATTRIBUTE_DESC
DECL_EXP RFC_RC SAP_API RfcSetWebsocketPongTimeout(unsigned pongTimeout, RFC_ERROR_INFO *errorInfo)
Sets the global timeout for a WebSocket keep alive ping reply packet in seconds.
DECL_EXP RFC_RC SAP_API RfcSubmitTransaction(RFC_TRANSACTION_HANDLE tHandle, RFC_ERROR_INFO *errorInfo)
Executes the entire LUW in the backend system as an "atomic unit".
enum _RFCTYPE RFCTYPE
Handle to a data container for a tRFC/qRFC LUW.
Definition: sapnwrfc.h:592
DECL_EXP RFC_RC SAP_API RfcGetServerAttributes(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_ATTRIBUTES *serverAttributes, RFC_ERROR_INFO *errorInfo)
Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server...
SAP_UC codepage[4+1]
Own code page.
Definition: sapnwrfc.h:242
Version mismatch.
Definition: sapnwrfc.h:145
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcCreateStructure(RFC_TYPE_DESC_HANDLE typeDescHandle, RFC_ERROR_INFO *errorInfo)
Creates a data container for a structure.
DECL_EXP RFC_RC SAP_API RfcSetChars(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given char value (charValue/valueLength) into the field.
The server has been stopped via RfcShutdownServer() and is currently not processing nor accepting any...
Definition: sapnwrfc.h:516
The called function module raised an E-, A- or X-Message.
Definition: sapnwrfc.h:139
DECL_EXP RFC_RC SAP_API RfcSetInt1ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT1 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT1 field.
DECL_EXP RFC_RC SAP_API RfcDestroyServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
Cleans up and destroys an automatic server object, once you are done with it.
Problems in the external program (e.g in the external server implementation)
Definition: sapnwrfc.h:186
DECL_EXP RFC_RC SAP_API RfcResetServerContext(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
RFC_RC SAP_API RfcResetServerContextResets the SAP server context ("user context / ABAP session conte...
#define RFC_UNITID_LN
Definition: sapnwrfc.h:80
DECL_EXP RFC_RC SAP_API RfcGetServerContext(RFC_CONNECTION_HANDLE rfcHandle, RFC_SERVER_CONTEXT *context, RFC_ERROR_INFO *errorInfo)
Inside a server function, returns details about the current execution context.
SAP_UC abapMsgV1[50+1]
ABAP message details field 1, corresponds to SY-MSGV1.
Definition: sapnwrfc.h:218
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCloneTable(RFC_TABLE_HANDLE srcTableHandle, RFC_ERROR_INFO *errorInfo)
Clones a table including all the data in it.
DECL_EXP RFC_RC SAP_API RfcGetTimeByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TIME emptyTime, RFC_ERROR_INFO *errorInfo)
Reads a TIME field.
DECL_EXP RFC_RC SAP_API RfcAddTypeDesc(SAP_UC const *repositoryID, RFC_TYPE_DESC_HANDLE typeHandle, RFC_ERROR_INFO *errorInfo)
Adds a type description to the cache.
RFC_TID tid
If type is RFC_TRANSACTIONAL or RFC_QUEUED, this field is filled with the 24 digit TID of the tRFC/qR...
Definition: sapnwrfc.h:360
timestamp/second, 8-byte integer
Definition: sapnwrfc.h:114
Compact structure containing relevant information about the x509 certificate provided by the RFC clie...
Definition: sapnwrfc.h:386
If the external program is the sender of the bgRFC unit, this structure is used to set a bunch of spe...
Definition: sapnwrfc.h:290
struct _RFC_SESSION_CHANGE RFC_SESSION_CHANGE
RFC_RC code
Error code. Should be the same as the API returns if the API has return type RFC_RC.
Definition: sapnwrfc.h:211
DECL_EXP RFC_RC SAP_API RfcGetSaplogonEntries(SAP_UC ***saplogonIDList, unsigned *numSaplogonIDs, RFC_ERROR_INFO *errorInfo)
Returns a list of names of all SAP Systems maintained in SAPLogon (saplogon.ini or SAPUILandscape...
struct _RFC_CONNECTION_PARAMETER RFC_CONNECTION_PARAMETER
DECL_EXP RFC_RC SAP_API RfcAppendNewRows(RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO *errorInfo)
Appends a set of new empty rows at the end of the table and moves the table cursor to the first new r...
RfcListenAndDispatch did not receive an RFC request during the timeout period.
Definition: sapnwrfc.h:149
DECL_EXP RFC_RC SAP_API RfcGetDecF16ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF16 *value, RFC_ERROR_INFO *errorInfo)
Returns the field as an 8 byte IEEE 754r decimal floating point.
DECL_EXP RFC_RC SAP_API RfcSetAbapObject(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the object into the target object of the parent container.
Failed to start and attach SAPGUI to the RFC connection.
Definition: sapnwrfc.h:161
DECL_EXP RFC_RC SAP_API RfcInsertRow(RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
Inserts an existing row at the current position of the table cursor.
Everything O.K. Used by every function.
Definition: sapnwrfc.h:135
enum _RFC_ERROR_GROUP RFC_ERROR_GROUP
RFC_CHAR RFC_DATE[8]
Date, RFCTYPE_DATE (YYYYMMDD)
Definition: sapnwrfc.h:65
DECL_EXP RFC_RC SAP_API RfcGetMetadataQueryFailedEntry(RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_METADATA_OBJ_TYPE type, unsigned index, RFC_METADATA_QUERY_RESULT_ENTRY *entry, RFC_ERROR_INFO *errorInfo)
Returns the error entry from the metadata query resultReturns the object name and the error text...
The authentication handler (RFC_ON_AUTHENTICATION_CHECK) failed to authenticate the user trying to lo...
Definition: sapnwrfc.h:165
DECL_EXP RFC_RC SAP_API RfcGetVersionInternal(void)
This function is intended to be used by SAP Make-factory only.
DECL_EXP RFC_RC SAP_API RfcSetCpicTraceLevel(unsigned traceLevel, RFC_ERROR_INFO *errorInfo)
Sets the global CPIC trace level used by the underlying CPIC libabry to write CPIC tracing informatio...
DECL_EXP RFC_RC SAP_API RfcGetUnitID(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNITID uid, RFC_ERROR_INFO *errorInfo)
Create a 32 digit bgRFC unit ID.
DECL_EXP RFC_RC SAP_API RfcGetUnitState(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER *identifier, RFC_UNIT_STATE *state, RFC_ERROR_INFO *errorInfo)
Retrieves the processing status of the given background unit from the backend system's status managem...
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByName(RFC_CLASS_DESC_HANDLE classDesc, SAP_UC const *name, RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of a class attribute given by name.
SAP_UC * client
ABAP Client ("Mandant")
Definition: sapnwrfc.h:269
short lock
Used only for type Q: If != 0, the unit will be written to the queue, but not processed. The unit can then be started manually in the ABAP debugger.
Definition: sapnwrfc.h:294
DECL_EXP RFC_RC SAP_API RfcGetTable(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_TABLE_HANDLE *tableHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to a table.
void * extendedDescription
Not used by the NW RFC library. This parameter can be used by applications that want to store additio...
Definition: sapnwrfc.h:634
SAP_UC * serverName
This server's name as given when creating the server.
Definition: sapnwrfc.h:525
Allows to retrieve monitoring information about all busy or idle connections of an automated RFC Serv...
Definition: sapnwrfc.h:577
RFC_RC(SAP_API * RFC_SERVER_SESSION_CHANGE_LISTENER)(RFC_SERVER_HANDLE serverHandle, RFC_SESSION_CHANGE *sessionChange)
Definition: sapnwrfc.h:556
Internal table.
Definition: sapnwrfc.h:98
RFC_CHAR RFC_CLASS_NAME[30+1]
Default value of a function module parameter. (null-terminated)
Definition: sapnwrfc.h:696
DECL_EXP RFC_RC SAP_API RfcSubmitUnit(RFC_UNIT_HANDLE unitHandle, RFC_ERROR_INFO *errorInfo)
Executes a bgRFC unit in the backend.
DECL_EXP RFC_RC SAP_API RfcLanguageSapToIso(const SAP_UC *lang, SAP_UC *laiso, RFC_ERROR_INFO *errorInfo)
Converts a 1-char SAP language key to the 2-char SAP language code.
DECL_EXP RFC_RC SAP_API RfcFreeSaplogonEntry(RFC_CONNECTION_PARAMETER **entryParameters, unsigned *numParameters, RFC_ERROR_INFO *errorInfo)
Frees an array of connection parameters obtained from RfcGetSaplogonEntry().
enum _RFC_METADATA_OBJ_TYPE RFC_METADATA_OBJ_TYPE
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByIndex(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of the function module's ith ABAP Exception.
Means that all registrations are dead, e.g. because of gateway being down (in case of Registered Serv...
Definition: sapnwrfc.h:514
DECL_EXP RFC_RC SAP_API RfcGetExceptionCount(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
Returns the number of ABAP Exceptions of the function module.
DECL_EXP RFC_RC SAP_API RfcGetStringLength(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
Returns the length of the value of a STRING or XSTRING parameter.
RFC Client.
Definition: sapnwrfc.h:494
#define SAP_API
Definition: sapnwrfc.h:24
Class attribute (global)
Definition: sapnwrfc.h:691
DECL_EXP RFC_RC SAP_API RfcGetConnectionAttributes(RFC_CONNECTION_HANDLE rfcHandle, RFC_ATTRIBUTES *attr, RFC_ERROR_INFO *errorInfo)
Returns details about the current client or server connection.
SAP_UC user[12+1]
User.
Definition: sapnwrfc.h:238
unsigned decimals
Gives the number of decimals in case this attribute is a packed number (BCD)
Definition: sapnwrfc.h:711
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromConnection(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
Removes the throughput object from a connection.
DECL_EXP RFC_RC SAP_API RfcGetSapRouter(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *sapRouter, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the SAPRouter, if any.
DECL_EXP RFC_RC SAP_API RfcInstallGenericServerFunction(RFC_SERVER_FUNCTION serverFunction, RFC_FUNC_DESC_CALLBACK funcDescProvider, RFC_ERROR_INFO *errorInfo)
Installs a generic callback function of type RFC_SERVER_FUNCTION together with a callback function of...
_RFC_RC
RFC return codes used by all functions that do not directly return a handle.
Definition: sapnwrfc.h:133
SAP_UC reserved[17]
Reserved for later use.
Definition: sapnwrfc.h:256
SAP_RAW RFC_BYTE
Raw data, RFCTYPE_BYTE.
Definition: sapnwrfc.h:59
DECL_EXP RFC_RC SAP_API RfcSetBytesByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given byte value (byteValue/valueLength) into the field.
Connection closed by the other side.
Definition: sapnwrfc.h:141
Handle to an RFC connection (client connection or server connection).
Definition: sapnwrfc.h:475
SAP_UC RFC_CHAR
Characters, RFCTYPE_CHAR.
Definition: sapnwrfc.h:57
DECL_EXP RFC_RC SAP_API RfcGetInt1ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT1 *value, RFC_ERROR_INFO *errorInfo)
Returns the value of a field as an unsigned one byte integer.
unsigned ucLength
Field length in bytes in a 2-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:629
DECL_EXP RFC_RC SAP_API RfcSetInt(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT4 field.
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcDescribeAbapObject(RFC_ABAP_OBJECT_HANDLE objectHandle, RFC_ERROR_INFO *errorInfo)
Returns the metadata description of the given ABAP object handle.
DECL_EXP RFC_RC SAP_API RfcGetInt8ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT8 *value, RFC_ERROR_INFO *errorInfo)
Returns the field value as a signed eight byte integer.
DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcGetThroughputFromConnection(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
Returns the currently attached throughput object from a connection, if any.
enum _RFC_UNIT_STATE RFC_UNIT_STATE
Requesting or freeing critical sections or mutex failed.
Definition: sapnwrfc.h:190
DECL_EXP RFC_RC SAP_API RfcGetDecF16(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DECF16 *value, RFC_ERROR_INFO *errorInfo)
Returns the field as an 8 byte IEEE 754r decimal floating point.
DECL_EXP RFC_RC SAP_API RfcGetXString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned *xstringLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as byte array.
struct _RFC_SECURITY_ATTRIBUTES RFC_SECURITY_ATTRIBUTES
2-byte integer. Obsolete, not directly supported by ABAP/4
Definition: sapnwrfc.h:102
DECL_EXP RFC_RC SAP_API RfcGetDeserializationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *deserializationTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated deserialization time the throughput object recorded since it was attached or si...
enum _RFC_CALL_TYPE RFC_CALL_TYPE
Problems in the RFC runtime of the external program (i.e "this" library)
Definition: sapnwrfc.h:185
_RFC_SERVER_STATE
Used in state information in order to indicate the current state of an RFC Server.
Definition: sapnwrfc.h:510
short RFC_TMINUTE
time/minute
Definition: sapnwrfc.h:76
_RFC_SESSION_EVENT
Used in a server session change listener to notify the application whenever a new user session on the...
Definition: sapnwrfc.h:539
short noCommitCheck
Per default the backend will check during execution of a unit, whether one.
Definition: sapnwrfc.h:295
DECL_EXP RFC_RC SAP_API RfcConfirmTransaction(RFC_TRANSACTION_HANDLE tHandle, RFC_ERROR_INFO *errorInfo)
Removes the TID contained in the RFC_TRANSACTION_HANDLE from the backend's ARFCRSTATE table...
struct _RFC_UNIT_HANDLE * RFC_UNIT_HANDLE
DECL_EXP RFC_RC SAP_API RfcDeleteCurrentRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Deletes the row, on which the table cursor is currently positioned.
SAP_UC partnerType[1+1]
2/3/E/R: R/2,R/3,Ext,Reg.Ext
Definition: sapnwrfc.h:246
RFC_DIRECTION direction
Specifies whether the parameter is an input, output or bi-directional parameter.
Definition: sapnwrfc.h:660
Trying to move the current position after the last row of the table.
Definition: sapnwrfc.h:160
DECL_EXP RFC_RC SAP_API RfcDestroyMetadataQueryResult(RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_ERROR_INFO *errorInfo)
Destroys the metadata query resultReleases all resources allocated by the metadata query result...
IEEE 754r decimal floating point, 8 bytes.
Definition: sapnwrfc.h:107
RFC_CHAR RFC_TIME[6]
Time, RFCTYPE_TIME (HHMMSS)
Definition: sapnwrfc.h:66
DECL_EXP RFC_RC SAP_API RfcAddImplementedInterface(RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
Adds an interface to the list of implemented interfaces of the given class.
DECL_EXP RFC_RC SAP_API RfcDestroyUnit(RFC_UNIT_HANDLE unitHandle, RFC_ERROR_INFO *errorInfo)
Releases the memory of the bgRFC unit container.
Used in all functions of the NW RFC library to return detailed information about an error that has ju...
Definition: sapnwrfc.h:209
DECL_EXP RFC_FUNCTION_HANDLE SAP_API RfcCreateFunction(RFC_FUNCTION_DESC_HANDLE funcDescHandle, RFC_ERROR_INFO *errorInfo)
Creates a data container that can be used to execute function calls in the backend via RfcInvoke()...
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcGetFunctionDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *funcName, RFC_ERROR_INFO *errorInfo)
Returns the function description that is valid for the system to which rfcHandle points to...
SAP_UC cpicConvId[8+1]
CPI-C Conversation ID.
Definition: sapnwrfc.h:250
DECL_EXP RFC_RC SAP_API RfcSetGlobalLogonTimeout(unsigned logonTimeout, RFC_ERROR_INFO *errorInfo)
Sets the global logon timeout in seconds.
DECL_EXP RFC_RC SAP_API RfcGetAbapObject(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_ABAP_OBJECT_HANDLE *objHandle, RFC_ERROR_INFO *errorInfo)
Returns a handle to an abap object.
DECL_EXP RFC_RC SAP_API RfcGetParameterCount(RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
Returns the number of parameters in the function module definition.
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcGetCachedClassDesc(SAP_UC const *repositoryID, SAP_UC const *className, RFC_ERROR_INFO *errorInfo)
Looks for a cached class description.
RFC_CLASS_NAME declaringClass
Declaring class.
Definition: sapnwrfc.h:714
DECL_EXP RFC_RC SAP_API RfcGetInt8(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT8 *value, RFC_ERROR_INFO *errorInfo)
Returns the field value as a signed eight byte integer.
DECL_EXP RFC_RC SAP_API RfcGetSerializationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *serializationTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated serializationtime the throughput object recorded since it was attached or since...
RFC_UNIT_ATTRIBUTES * unitAttributes
If type is RFC_BACKGROUND_UNIT, this pointer is set to the unit attributes of the LUW...
Definition: sapnwrfc.h:362
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetRowType(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Returns a type description handle describing the line type (metadata) of this table.
DECL_EXP RFC_RC SAP_API RfcGetLocalAddress(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *localAddress, unsigned *length, unsigned *localPort, RFC_ERROR_INFO *errorInfo)
Gets the IP address of the local network interface used by this connection.
DECL_EXP RFC_RC SAP_API RfcGetClassAttributesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
Returns the number of parameters in the function module definition.
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcGetClassDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *className, RFC_ERROR_INFO *errorInfo)
Returns the class description that is valid for the system to which rfcHandle points to...
DECL_EXP RFC_RC SAP_API RfcGetNum(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as num-char array (digits only).
Used in RfcGetServerContext() for obtaining more information about the current incoming function call...
Definition: sapnwrfc.h:358
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcGetCachedFunctionDesc(SAP_UC const *repositoryID, SAP_UC const *funcName, RFC_ERROR_INFO *errorInfo)
Looks for a cached function description.
DECL_EXP RFC_RC SAP_API RfcFreeSaplogonEntries(SAP_UC ***saplogonIDList, unsigned *numSaplogonIDs, RFC_ERROR_INFO *errorInfo)
Frees a list of SAPLogon IDs obtained from RfcGetSaplogonEntries().
struct _RFC_ATTRIBUTES RFC_ATTRIBUTES
RFC_SERVER_STATE state
This server's state.
Definition: sapnwrfc.h:528
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByName(RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const *name, RFC_PARAMETER_DESC *paramDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of a function module parameter given by name.
RFC_DATE sendingDate
Sending date in UTC (GMT-0). Used only when the external program is server. In the client case the nw...
Definition: sapnwrfc.h:306
Handle to a cached metadata description of a function module.
Definition: sapnwrfc.h:407
RFC_INT8 RFC_UTCMINUTE
timestamp/minute
Definition: sapnwrfc.h:71
DECL_EXP RFC_RC SAP_API RfcGetPartnerExternalIP(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *partnerExternalIP, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the external IP address of the communication partner.
DECL_EXP RFC_RC SAP_API RfcInvoke(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Executes a function module in the backend system.
SAP system runtime error (SYSTEM_FAILURE): Shortdump on the backend side.
Definition: sapnwrfc.h:138
DECL_EXP RFC_RC SAP_API RfcSetMaximumTraceFileSize(unsigned size, SAP_UC unit, RFC_ERROR_INFO *errorInfo)
Sets the maximum size of the trace file, after which the current file is closed and "rolled over" to ...
unsigned nucLength
Field length in bytes in a 1-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:625
DECL_EXP RFC_RC SAP_API RfcDestroyTable(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Releases the memory of a table and all its lines.
DECL_EXP RFC_RC SAP_API RfcInstallServerFunction(SAP_UC const *sysId, RFC_FUNCTION_DESC_HANDLE funcDescHandle, RFC_SERVER_FUNCTION serverFunction, RFC_ERROR_INFO *errorInfo)
Installs a callback function of type RFC_SERVER_FUNCTION, which will be triggered when a request for ...
This function call is part of a background LUW (bgRFC).
Definition: sapnwrfc.h:349
DECL_EXP RFC_RC SAP_API RfcGetTypeName(RFC_TYPE_DESC_HANDLE typeHandle, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO *errorInfo)
Returns the name of the type.
Data has been persisted (or executed if type 'T') ok on receiver side. Confirm event may now be trigg...
Definition: sapnwrfc.h:329
RFC_RC(SAP_API * RFC_ON_ROLLBACK_TRANSACTION)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *tid)
Definition: sapnwrfc.h:729
Codepage conversion error.
Definition: sapnwrfc.h:156
struct _RFC_PARAMETER_DESC RFC_PARAMETER_DESC
DECL_EXP RFC_RC SAP_API RfcGetMaximumCpicConversations(unsigned *maxCpicConversations, RFC_ERROR_INFO *errorInfo)
Gets the maximum number of parallel CPIC conversations.
A stateful user session has been destroyed, either by the server itself via RfcSetServerStateful(), or by the backend via function module RFC_SET_REG_SERVER_PROPERTY, or because the connection was closed (e.g. the corresponding ABAP user session ended or explicitly closed the connection), or because the connection was broken by network error/system failure etc. The application should now clean up all memory/resources allocated for the given session ID.
Definition: sapnwrfc.h:543
Multi-count registered RFC Server.
Definition: sapnwrfc.h:497
DECL_EXP RFC_RC SAP_API RfcSetTraceType(SAP_UC *traceType, RFC_ERROR_INFO *errorInfo)
Changes the way the NW RFC lib writes trace files.
DECL_EXP RFC_RC SAP_API RfcDestroyAbapObject(RFC_ABAP_OBJECT_HANDLE objHandle, RFC_ERROR_INFO *errorInfo)
Destroys an ABAP object handle.
Notifies the application that an RFC Server changed its state (e.g.
Definition: sapnwrfc.h:565
time/minute, 2-byte integer
Definition: sapnwrfc.h:120
DECL_EXP RFC_RC SAP_API RfcSetIniPath(const SAP_UC *pathName, RFC_ERROR_INFO *errorInfo)
Sets the directory in which to search for the sapnwrfc.ini file.
DECL_EXP RFC_RC SAP_API RfcGetBytesByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as byte array.
DECL_EXP RFC_RC SAP_API RfcGetInt(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT *value, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as RFC_INT (signed).
The called function module raised an Exception (RAISE or MESSAGE ... RAISING)
Definition: sapnwrfc.h:140
RFC_ABAP_NAME name
Attribute name, null-terminated string.
Definition: sapnwrfc.h:707
SAP_ULLONG validTo
UTC Expiration date on which the certificate is no longer considered valid.
Definition: sapnwrfc.h:389
Structure for reading (RfcGetParameterDescByIndex() or RfcGetParameterDescByName()) or defining (RfcA...
Definition: sapnwrfc.h:656
SAP_UC client[3+1]
Client ("Mandant")
Definition: sapnwrfc.h:237
DECL_EXP RFC_RC SAP_API RfcGetInt2(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT2 *value, RFC_ERROR_INFO *errorInfo)
Returns the field value as a signed two byte integer.
Websocket RFC Client.
Definition: sapnwrfc.h:502
SAP_UC dest[64+1]
RFC destination.
Definition: sapnwrfc.h:232
SAP_UC rel[4+1]
My system release.
Definition: sapnwrfc.h:247
Websocket RFC Server.
Definition: sapnwrfc.h:501
DECL_EXP RFC_RC SAP_API RfcGetDecF34ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF34 *value, RFC_ERROR_INFO *errorInfo)
Returns the field as a 16 byte IEEE 754r decimal floating point.
DECL_EXP RFC_RC SAP_API RfcSetXString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given byte value (byteValue/valueLength) into the field.
DECL_EXP RFC_RC SAP_API RfcSetMaximumStoredTraceFiles(int numberOfFiles, RFC_ERROR_INFO *errorInfo)
Sets the maximum size of stored old trace files, after which the current file is closed and "rolled o...
enum _RFC_DIRECTION RFC_DIRECTION
SAP_UC functionModuleName[128]
Name of the ABAP function module currently being processed over this connection (if the connection is...
Definition: sapnwrfc.h:581
DECL_EXP RFC_RC SAP_API RfcDestroyFunctionDesc(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO *errorInfo)
Deletes the function description and releases the allocated resources.
DECL_EXP RFC_RC SAP_API RfcSetAbapObjectByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the object into the target object of the parent container.
unsigned registrationCount
The current number of active registrations (in case of a Registered Server) or the maximum number of ...
Definition: sapnwrfc.h:527
DECL_EXP RFC_RC SAP_API RfcGetFieldCount(RFC_TYPE_DESC_HANDLE typeHandle, unsigned *count, RFC_ERROR_INFO *errorInfo)
Returns the number of fields in a structure definition.
A function call came in from the backend and started processing. This event can probably be ignored b...
Definition: sapnwrfc.h:541
RFC_ABAP_NAME name
Field name, null-terminated string.
Definition: sapnwrfc.h:622
For convenience combines a unit's ID and its type.
Definition: sapnwrfc.h:315
charU SAP_UC
unicode character
DECL_EXP RFC_RC SAP_API RfcDestroyClassDesc(RFC_CLASS_DESC_HANDLE classHandle, RFC_ERROR_INFO *errorInfo)
Deletes the class description and releases the allocated resources.
SAP_UC user[12+1]
Sender User (optional). Default is current operating system User.
Definition: sapnwrfc.h:301
RFC_CLASS_ATTRIBUTE_DESCRIPTION description
Attribute description, null terminated, may be null.
Definition: sapnwrfc.h:715
SAP_UC partnerBytesPerChar[1+1]
Number of bytes per character in the backend's current codepage. Note this is different from the sema...
Definition: sapnwrfc.h:252
DECL_EXP RFC_RC SAP_API RfcGetInt1(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT1 *value, RFC_ERROR_INFO *errorInfo)
Returns the value of a field as an unsigned one byte integer.
Time (HHMMSS)
Definition: sapnwrfc.h:96
RFC_PARAMETER_DEFVALUE defaultValue
Default value as defined in SE37.
Definition: sapnwrfc.h:665
ABAP structure.
Definition: sapnwrfc.h:106
RFC_RC(SAP_API * RFC_ON_COMMIT_UNIT)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier)
Definition: sapnwrfc.h:736
DECL_EXP RFC_TRANSACTION_HANDLE SAP_API RfcCreateTransaction(RFC_CONNECTION_HANDLE rfcHandle, RFC_TID tid, SAP_UC const *queueName, RFC_ERROR_INFO *errorInfo)
Creates a container for executing a (multi-step) transactional call.
Import and export parameter. This corresponds to ABAP CHANGING parameter.
Definition: sapnwrfc.h:646
DECL_EXP RFC_RC SAP_API RfcGetFloatByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_FLOAT *value, RFC_ERROR_INFO *errorInfo)
Returns the value of the given field as an RFC_FLOAT.
DECL_EXP RFC_RC SAP_API RfcGetNumByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as num-char array (digits only).
void * extendedDescription
This field can be used by the application programmer (i.e. you) to store arbitrary extra information...
Definition: sapnwrfc.h:718
The called function module raised a class based exception.
Definition: sapnwrfc.h:162
The given buffer was to small to hold the entire parameter. Data has been truncated.
Definition: sapnwrfc.h:158
DECL_EXP RFC_RC SAP_API RfcMetadataBatchQuery(RFC_CONNECTION_HANDLE rfcHandle, const SAP_UC **functionNames, unsigned functionCount, const SAP_UC **typeNames, unsigned typeCount, const SAP_UC **classNames, unsigned classCount, RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_ERROR_INFO *errorInfo)
Queries the meta data for function, type and class lists.
DECL_EXP RFC_RC SAP_API RfcSetServerStateful(RFC_CONNECTION_HANDLE connectionHandle, unsigned isStateful, RFC_ERROR_INFO *errorInfo)
Sets this client's operation mode to statefull or stateless.
enum _RFC_SESSION_EVENT RFC_SESSION_EVENT
SAP_UC * functionName
Name of the called function module.
Definition: sapnwrfc.h:267
struct _RFC_CLASS_DESC_HANDLE * RFC_CLASS_DESC_HANDLE
DECL_EXP RFC_RC SAP_API RfcCancel(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
Cancels the RFC call which is currently being called over the given RFC connection and closes the con...
DECL_EXP RFC_RC SAP_API RfcConfirmUnit(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER *identifier, RFC_ERROR_INFO *errorInfo)
Removes the UID from the backend's status management.
DECL_EXP RFC_RC SAP_API RfcSetIntByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT4 field.
DATA_CONTAINER_HANDLE RFC_STRUCTURE_HANDLE
Definition: sapnwrfc.h:429
Handle to a data container for a bgRFC LUW.
Definition: sapnwrfc.h:600
RFC_CHAR RFC_PARAMETER_TEXT[79+1]
Parameter description for a function module parameter. (null-terminated)
Definition: sapnwrfc.h:336
TCP Client.
Definition: sapnwrfc.h:498
Authentication with assertion ticket.
Definition: sapnwrfc.h:376
The server object has been created, but nothing has been done with it yet.
Definition: sapnwrfc.h:511
DECL_EXP RFC_RC SAP_API RfcSetDecF16(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DECF16 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an 8 byte decfloat object into a field.
No information for this unit ID and unit type can be found in the target system. If you are sure...
Definition: sapnwrfc.h:327
Authentication with user and password.
Definition: sapnwrfc.h:374
struct _RFC_SERVER_ATTRIBUTES RFC_SERVER_ATTRIBUTES
DECL_EXP RFC_RC SAP_API RfcUTF8ToSAPUC(const RFC_BYTE *utf8, unsigned utf8Length, SAP_UC *sapuc, unsigned *sapucSize, unsigned *resultLength, RFC_ERROR_INFO *errorInfo)
Converts data in UTF-8 format to SAP_UC strings.
DECL_EXP RFC_ABAP_OBJECT_HANDLE SAP_API RfcCreateAbapObject(RFC_CLASS_DESC_HANDLE classDescHandle, RFC_ERROR_INFO *errorInfo)
Creates an ABAP object handle with the given class description handle.
The server has been started, but startup is not yet complete and the server is not yet able to receiv...
Definition: sapnwrfc.h:512
enum _RFC_RC RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetTraceLevel(RFC_CONNECTION_HANDLE connection, SAP_UC *destination, unsigned traceLevel, RFC_ERROR_INFO *errorInfo)
Sets the current trace level of the specified RFC connection or destination to the new value...
DECL_EXP RFC_RC SAP_API RfcGetNetworkReadingTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *readingTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated time that is used to read from the network during the requests, that the throughput object recorded since it was attached or since the last reset.
DECL_EXP RFC_RC SAP_API RfcInstallPasswordChangeHandler(RFC_ON_PASSWORD_CHANGE onPasswordChange, RFC_ERROR_INFO *errorInfo)
Installs an optional callback function for processing password change events.
DECL_EXP RFC_RC SAP_API RfcAddServerErrorListener(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_ERROR_LISTENER errorListener, RFC_ERROR_INFO *errorInfo)
Adds an error listener to this server.
DECL_EXP RFC_RC SAP_API RfcLaunchServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
Starts up an automatic server, so that it starts waiting for incoming requests and processes them...
struct _RFC_CONNECTION_HANDLE * RFC_CONNECTION_HANDLE
DECL_EXP RFC_RC SAP_API RfcSetInt8(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT8 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT8 field.
The server has been stopped via RfcShutdownServer() (with a timeout > 0) and is still busy processing...
Definition: sapnwrfc.h:515
DECL_EXP RFC_RC SAP_API RfcEnableAbapClassException(RFC_FUNCTION_HANDLE funcHandle, RFC_CONNECTION_HANDLE rfcHandleRepository, RFC_ERROR_INFO *errorInfo)
Enables this function handle for ABAP class exception support.
DECL_EXP const SAP_UC *SAP_API RfcGetTypeAsString(RFCTYPE type)
Converts an RFCTYPE data type indicator to a human readable string for logging purposes.
unsigned nucLength
Attribute length in bytes in a 1-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:709
struct RFC_DATA_CONTAINER * DATA_CONTAINER_HANDLE
DECL_EXP RFC_RC SAP_API RfcAddServerStateChangedListener(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_STATE_CHANGE_LISTENER stateChangeListener, RFC_ERROR_INFO *errorInfo)
Adds a state change listener to this server.
RFC_CLASS_ATTRIBUTE_TYPE attributeType
The attribute type tells you, whether this attribute is an instance attribute, a class attribute or a...
Definition: sapnwrfc.h:717
DECL_EXP RFC_RC SAP_API RfcSetNum(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the value of a NUMC field.
SAP_UC RFC_UNITID[RFC_UNITID_LN+1]
Used for Unit IDs in inbound and outbound bgRFC.
Definition: sapnwrfc.h:82
DECL_EXP RFC_RC SAP_API RfcAddException(RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
Adds a new ABAP Exception to the function description.
DECL_EXP RFC_RC SAP_API RfcGetDecF34(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DECF34 *value, RFC_ERROR_INFO *errorInfo)
Returns the field as a 16 byte IEEE 754r decimal floating point.
void(SAP_API * RFC_SERVER_STATE_CHANGE_LISTENER)(RFC_SERVER_HANDLE serverHandle, RFC_STATE_CHANGE *stateChange)
Definition: sapnwrfc.h:570
IEEE 754r decimal floating point, 16 bytes.
Definition: sapnwrfc.h:108
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCreateTable(RFC_TYPE_DESC_HANDLE typeDescHandle, RFC_ERROR_INFO *errorInfo)
Creates a data container for a table.
DECL_EXP RFC_RC SAP_API RfcSNCNameToKey(SAP_UC const *sncLib, SAP_UC const *sncName, SAP_RAW *sncKey, unsigned *keyLength, RFC_ERROR_INFO *errorInfo)
Converts SNC name to SNC key.
SAP_UC sessionID[30+1]
Session ID of the user session in question.
Definition: sapnwrfc.h:552
DECL_EXP RFC_RC SAP_API RfcSetString(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given string value (stringValue/valueLength) into the field.
Export parameter. This corresponds to ABAP EXPORTING parameter.
Definition: sapnwrfc.h:645
unsigned currentBusyCount
The number of requests currently being processed.
Definition: sapnwrfc.h:529
RFC_RC(SAP_API * RFC_SERVER_FUNCTION)(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Definition: sapnwrfc.h:726
struct _RFC_STATE_CHANGE RFC_STATE_CHANGE
_RFC_CLASS_ATTRIBUTE_TYPE
Determines the type of an ABAP Object attribute.
Definition: sapnwrfc.h:689
Error when dealing with io functions, streams etc.
Definition: sapnwrfc.h:167
DECL_EXP RFC_RC SAP_API RfcDestroyStructure(RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
Releases all memory for a particular structure.
Authorization check error.
Definition: sapnwrfc.h:164
const SAP_UC * value
The value of the given parameter.
Definition: sapnwrfc.h:611
Memory insufficient.
Definition: sapnwrfc.h:144
RFC_RC(SAP_API * RFC_ON_AUTHENTICATION_CHECK)(RFC_ATTRIBUTES rfcAttributes, RFC_AUTHENTICATION_HANDLE authenticationHandle, RFC_ERROR_INFO *errorInfo)
Definition: sapnwrfc.h:745
struct _RFC_UNIT_ATTRIBUTES RFC_UNIT_ATTRIBUTES
The operation is not supported on that handle at the current point of time (e.g. trying a callback on...
Definition: sapnwrfc.h:154
RFCTYPE type
Parameter data type.
Definition: sapnwrfc.h:659
ABAP object.
Definition: sapnwrfc.h:105
Function or structure definition not found (Metadata API)
Definition: sapnwrfc.h:152
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcInsertNewRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Inserts a new empty row at the current position of the table cursor.
DECL_EXP RFC_METADATA_QUERY_RESULT_HANDLE SAP_API RfcCreateMetadataQueryResult(RFC_ERROR_INFO *errorInfo)
Creates the metadata query resultMetadata query results contain the names of functions, types and classes queried successfully, and the corresponding errors, if the query failed.
DECL_EXP RFC_RC SAP_API RfcGetParentClassByIndex(RFC_CLASS_DESC_HANDLE classDesc, RFC_CLASS_NAME name, unsigned index, RFC_ERROR_INFO *errorInfo)
Returns the parent classes of the given class.
DECL_EXP RFC_RC SAP_API RfcAppendRow(RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
Appends an existing row to the end of the table and moves the table cursor to that row...
unsigned ucLength
Parameter length in bytes in a 2-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:662
Variable-length, null-terminated string.
Definition: sapnwrfc.h:110
DECL_EXP RFC_RC SAP_API RfcGetAuthenticationType(RFC_AUTHENTICATION_HANDLE authenticationHandle, RFC_AUTHENTICATION_TYPE *type, RFC_ERROR_INFO *errorInfo)
Gets the type of authentication data received from the backend in RFC_ON_AUTHENTICATION_CHECK.
DECL_EXP RFC_RC SAP_API RfcGetReceivedBytes(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *receivedBytes, RFC_ERROR_INFO *errorInfo)
Returns the cumulated amount of received bytes the throughput object recorded since it was attached o...
DECL_EXP RFC_RC SAP_API RfcMoveToPreviousRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Decrements the table cursor by one.
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcCreateFunctionDesc(SAP_UC const *name, RFC_ERROR_INFO *errorInfo)
Creates an empty function description with the given name.
int RFC_DTDAY
date/day
Definition: sapnwrfc.h:72
RFC_TYPE_DESC_HANDLE typeDescHandle
Pointer to an RFC_STRUCTURE_DESC structure for the nested sub-type if the type field is RFCTYPE_STRUC...
Definition: sapnwrfc.h:633
Error in external custom code. (E.g. in the function handlers or tRFC handlers.) Results in SYSTEM_FA...
Definition: sapnwrfc.h:150
RFC_TYPE_DESC_HANDLE typeDescHandle
Handle to the structure definition in case this parameter is a structure or table.
Definition: sapnwrfc.h:664
DECL_EXP RFC_RC SAP_API RfcGetTransactionID(RFC_CONNECTION_HANDLE rfcHandle, RFC_TID tid, RFC_ERROR_INFO *errorInfo)
Retrieves a unique 24-digit transaction ID from the backend.
No authentication data was provided.
Definition: sapnwrfc.h:373
RFC_CHAR RFC_PARAMETER_DEFVALUE[30+1]
Default value of a function module parameter. (null-terminated)
Definition: sapnwrfc.h:335
SAP_UC isoLanguage[2+1]
2-byte ISO-Language
Definition: sapnwrfc.h:241
Date ( YYYYYMMDD )
Definition: sapnwrfc.h:94
DECL_EXP RFC_SERVER_HANDLE SAP_API RfcCreateServer(RFC_CONNECTION_PARAMETER const *connectionParams, unsigned paramCount, RFC_ERROR_INFO *errorInfo)
This function can be used to start "automatic" servers.
This function call is part of a transactional LUW (tRFC).
Definition: sapnwrfc.h:347
SAP_UC abapMsgV4[50+1]
ABAP message details field 4, corresponds to SY-MSGV4.
Definition: sapnwrfc.h:221
RFC_RC(SAP_API * RFC_PM_CALLBACK)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *functionName, SAP_RAW *eppBuffer, size_t eppBufferSize, size_t *eppLength)
Definition: sapnwrfc.h:733
Structure for reading (RfcGetParameterDescByIndex() or RfcGetParameterDescByName()) or defining (RfcA...
Definition: sapnwrfc.h:705
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnServer(RFC_SERVER_HANDLE serverHandle, RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
Attaches a throughput object to an automated server.
const SAP_UC * signature
Fingerprint of the public key.
Definition: sapnwrfc.h:391
struct _RFC_CERTIFICATE_DATA * next
Pointer to the next certificate in the chain if any.
Definition: sapnwrfc.h:392
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetCachedTypeDesc(SAP_UC const *repositoryID, SAP_UC const *typeName, RFC_ERROR_INFO *errorInfo)
Looks for a cached structure/table description.
RFC_PARAMETER_TEXT parameterText
Description text of the parameter as defined in SE37. Null-terminated string.
Definition: sapnwrfc.h:666
short unitHistory
If != 0, the backend will keep a "history" for this unit.
Definition: sapnwrfc.h:293
DECL_EXP RFC_RC SAP_API RfcSetAbapClassException(RFC_FUNCTION_HANDLE funcHandle, RFC_ABAP_OBJECT_HANDLE excpHandle, const SAP_UC *exceptionText, RFC_ERROR_INFO *errorInfo)
Sets the ABAP exception object handle to the given function handle.
const SAP_UC * issuer
Distinguished name of the certificate authority (CA) that issued the certificate. ...
Definition: sapnwrfc.h:388
time_t lastActivity
Point of time of the last activity on this connection (if the connection is currently idle)...
Definition: sapnwrfc.h:582
RFC_INT8 RFC_UTCSECOND
timestamp/second
Definition: sapnwrfc.h:70
Started RFC Server.
Definition: sapnwrfc.h:495
DECL_EXP RFC_RC SAP_API RfcMoveTo(RFC_TABLE_HANDLE tableHandle, unsigned index, RFC_ERROR_INFO *errorInfo)
Sets the table cursor to a specific index.
DecFloat16 RFC_DECF16
IEEE 754r decimal floating point, 8 bytes.
Definition: sapnwrfc.h:67
SAP_UC partnerRel[4+1]
Partner system release.
Definition: sapnwrfc.h:248
It's a standard synchronous RFC call.
Definition: sapnwrfc.h:346
DECL_EXP RFC_RC SAP_API RfcAddClassDesc(SAP_UC const *repositoryID, RFC_CLASS_DESC_HANDLE classDesc, RFC_ERROR_INFO *errorInfo)
Adds a class description to the cache for the specified R/3 System.
unsigned decimals
Gives the number of decimals in case of a packed number (BCD)
Definition: sapnwrfc.h:663
struct _RFC_TYPE_DESC_HANDLE * RFC_TYPE_DESC_HANDLE
RFC_TIME sendingTime
Sending time in UTC (GMT-0). Used only when the external program is server. In the client case the nw...
Definition: sapnwrfc.h:307
RFC_RC(SAP_API * RFC_ON_GET_UNIT_STATE)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier, RFC_UNIT_STATE *unitState)
Definition: sapnwrfc.h:739
SAP_UC abapMsgV2[50+1]
ABAP message details field 2, corresponds to SY-MSGV2.
Definition: sapnwrfc.h:219
OK.
Definition: sapnwrfc.h:180
struct _RFC_PARAMETER_DESC * P_RFC_PARAMETER_DESC
DECL_EXP RFC_RC SAP_API RfcSetStructure(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the given structure into the target structure of the parent container.
SAP_UC tCode[20+1]
Sender Transaction Code (optional). Default is "".
Definition: sapnwrfc.h:303
DECL_EXP RFC_RC SAP_API RfcReserveCapacity(RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO *errorInfo)
Reserves memory without changing the size of a table so that new rows can be appended without new mem...
enum _RFC_CLASS_ATTRIBUTE_TYPE RFC_CLASS_ATTRIBUTE_TYPE
Structure for reading (RfcGetFieldDescByIndex() or RfcGetFieldDescByName()) or defining (RfcAddTypeFi...
Definition: sapnwrfc.h:620
DECL_EXP RFC_RC SAP_API RfcLoadCryptoLibrary(const SAP_UC *const pathToLibrary, RFC_ERROR_INFO *errorInfo)
Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc...
unsigned sncAclKeyLength
Length of the above SNC AclKey.
Definition: sapnwrfc.h:275
SAP_UC kernelRel[4+1]
Partner kernel release.
Definition: sapnwrfc.h:249
SAP_UC sysId[8+1]
R/3 system ID.
Definition: sapnwrfc.h:236
DECL_EXP RFC_RC SAP_API RfcGetDateByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DATE emptyDate, RFC_ERROR_INFO *errorInfo)
Reads a DATE field.
struct _RFC_ERROR_INFO RFC_ERROR_INFO
DECL_EXP RFC_RC SAP_API RfcSetInt1(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT1 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT1 field.
short RFC_INT2
2 byte integer, RFCTYPE_INT2
Definition: sapnwrfc.h:62
DECL_EXP RFC_RC SAP_API RfcSetFloat(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_FLOAT value, RFC_ERROR_INFO *errorInfo)
Sets a floating point field.
Packed number, any length between 1 and 16 bytes.
Definition: sapnwrfc.h:95
Trying to move the current position before the first row of the table.
Definition: sapnwrfc.h:159
struct _RFC_CLASS_ATTRIBUTE_DESC * P_RFC_CLASS_ATTRIBUTE_DESC
DECL_EXP RFC_RC SAP_API RfcListenAndDispatch(RFC_CONNECTION_HANDLE rfcHandle, int timeout, RFC_ERROR_INFO *errorInfo)
Listens on a server connection handle and waits for incoming RFC calls from the R/3 system...
DECL_EXP RFC_RC SAP_API RfcSetDecF16ByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF16 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an 8 byte decfloat object into a field.
DECL_EXP RFC_RC SAP_API RfcGetPartnerSSOTicket(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *ssoTicket, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the partner's SSO2 ticket, if any.
RFCTYPE type
Attribute data type.
Definition: sapnwrfc.h:708
DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcGetThroughputFromServer(RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
Returns the currently attached throughput object from a server, if any.
DECL_EXP const SAP_UC *SAP_API RfcGetVersion(unsigned *majorVersion, unsigned *minorVersion, unsigned *patchLevel)
Get information about currently loaded sapnwrfc library.
RFC_ERROR_GROUP group
Error group.
Definition: sapnwrfc.h:212
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcGetCurrentRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Returns the table row, on which the "table cursor" is currently positioned.
Raw data, binary, fixed length, zero padded.
Definition: sapnwrfc.h:97
DECL_EXP RFC_RC SAP_API RfcSetMessageServerResponseTimeout(unsigned timeout, RFC_ERROR_INFO *errorInfo)
Set Timeout for Message Server Response.
Don't use.
Definition: sapnwrfc.h:169
No longer used.
Definition: sapnwrfc.h:142
_RFC_METADATA_OBJ_TYPE
An RFC_METADATA_OBJ_TYPE indicates whether in a call to RfcGetMetadataQueryFailedEntry() or RfcGetMet...
Definition: sapnwrfc.h:5382
DECL_EXP RFC_RC SAP_API RfcRemoveClassDesc(SAP_UC const *repositoryID, SAP_UC const *className, RFC_ERROR_INFO *errorInfo)
Removes a class description from the cache for the specified R/3 System.
SAP_UC sessionID[33]
Contains a unique zero-terminated session ID, identifying the ABAP or external user session...
Definition: sapnwrfc.h:364
DECL_EXP RFC_RC SAP_API RfcGetApplicationTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *applicationTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated time of the C implementations of ABAP function modules that the throughput obje...
Websocket RFC Client.
Definition: sapnwrfc.h:500
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcCloneStructure(RFC_STRUCTURE_HANDLE srcStructureHandle, RFC_ERROR_INFO *errorInfo)
Clones a sructure including the data in it.
RFC_RC(SAP_API * RFC_ON_ROLLBACK_UNIT)(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNIT_IDENTIFIER const *identifier)
Definition: sapnwrfc.h:737
DECL_EXP RFC_RC SAP_API RfcIsAbapClassExceptionEnabled(RFC_FUNCTION_HANDLE funcHandle, int *isEnabled, RFC_ERROR_INFO *errorInfo)
Checks whether this function handle has been enabled for ABAP class exception support.
SAP_UC rfcRole[1+1]
C/S: RFC Client / RFC Server.
Definition: sapnwrfc.h:244
DECL_EXP RFC_RC SAP_API RfcIsConnectionHandleValid(RFC_CONNECTION_HANDLE rfcHandle, int *isValid, RFC_ERROR_INFO *errorInfo)
Checks an RFC connectionCan be used to check whether a client/server connection has already been clos...
struct _RFC_AUTHENTICATION_HANDLE * RFC_AUTHENTICATION_HANDLE
struct _RFC_ATTRIBUTES * P_RFC_ATTRIBUTES
DECL_EXP RFC_RC SAP_API RfcSetTypeLength(RFC_TYPE_DESC_HANDLE typeHandle, unsigned nucByteLength, unsigned ucByteLength, RFC_ERROR_INFO *errorInfo)
Sets the total byte length of the type description.
unsigned ucLength
Attribute length in bytes in a 2-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:710
RFC_RC(SAP_API * RFC_ON_CHECK_TRANSACTION)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *tid)
Definition: sapnwrfc.h:727
DECL_EXP RFC_RC SAP_API RfcSetTraceDir(SAP_UC *traceDir, RFC_ERROR_INFO *errorInfo)
Changes the directory where the NW RFC lib should write trace files.
DECL_EXP RFC_RC SAP_API RfcConfirmTransactionID(RFC_CONNECTION_HANDLE rfcHandle, RFC_TID tid, RFC_ERROR_INFO *errorInfo)
Convenience function to remove the TID contained in a previous RFC_TRANSACTION_HANDLE from the backen...
Handle to a cached metadata description of a class.
Definition: sapnwrfc.h:414
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByName(RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const *name, RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of a function module's ABAP Exception given by name.
SAP_ULLONG validFrom
UTC Starting date since the certificate is valid.
Definition: sapnwrfc.h:390
SAP_UC abapMsgV3[50+1]
ABAP message details field 3, corresponds to SY-MSGV3.
Definition: sapnwrfc.h:220
SAP_UC message[512]
Error message (exception text as defined in SE37)
Definition: sapnwrfc.h:680
DECL_EXP RFC_RC SAP_API RfcReloadIniFile(RFC_ERROR_INFO *errorInfo)
Reloads the contents of the sapnwrfc.ini file into memory.
DECL_EXP RFC_RC SAP_API RfcGetAuthenticationPassword(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC **password, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the password for authentication in RFC_ON_AUTHENTICATION_CHECK if basic authentication method wa...
SAP_UC trace[1+1]
Trace level (0-3)
Definition: sapnwrfc.h:240
DECL_EXP RFC_RC SAP_API RfcGetFieldDescByIndex(RFC_TYPE_DESC_HANDLE typeHandle, unsigned index, RFC_FIELD_DESC *fieldDescr, RFC_ERROR_INFO *errorInfo)
Reads the field description of the structure's ith field.
DECL_EXP const SAP_UC *SAP_API RfcGetRcAsString(RFC_RC rc)
Converts an RFC_RC return code to a human readable string for logging purposes.
DECL_EXP RFC_RC SAP_API RfcSetDate(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DATE date, RFC_ERROR_INFO *errorInfo)
Sets the value of a DATE field.
DATA_CONTAINER_HANDLE RFC_FUNCTION_HANDLE
Definition: sapnwrfc.h:436
No longer used!
Definition: sapnwrfc.h:109
SAP_UC message[512]
Error message.
Definition: sapnwrfc.h:214
DECL_EXP RFC_RC SAP_API RfcClearRepository(SAP_UC const *repositoryID, RFC_ERROR_INFO *errorInfo)
Removes all metadata from the repository cache of the specified R/3 System.
Error in Network & Communication layer.
Definition: sapnwrfc.h:136
DECL_EXP RFC_RC SAP_API RfcSetNumByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the value of a NUMC field.
boxed client dependent structure, note: not supported by NW RFC lib
Definition: sapnwrfc.h:123
An invalid handle was passed to an API call.
Definition: sapnwrfc.h:148
A new stateful user session has been created on the server. This can be done either by the server its...
Definition: sapnwrfc.h:540
Inbound tRFC Call already executed (needs to be returned from RFC_ON_CHECK_TRANSACTION in case the TI...
Definition: sapnwrfc.h:151
DECL_EXP RFC_RC SAP_API RfcGetFunctionName(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO *errorInfo)
Returns a function module's DDIC name.
DECL_EXP RFC_RC SAP_API RfcSetTraceEncoding(SAP_UC *traceEncoding, RFC_ERROR_INFO *errorInfo)
Changes the character encoding to be used in trace files.
DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcCreateThroughput(RFC_ERROR_INFO *errorInfo)
Creates a throughput object that can be used to measure performance relevant data of connections and ...
Unspecified.
Definition: sapnwrfc.h:493
DECL_EXP RFC_RC SAP_API RfcResetThroughput(RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
Resets the data so far collected and aggregated by the throughput object.
DECL_EXP RFC_RC SAP_API RfcSetTime(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_TIME time, RFC_ERROR_INFO *errorInfo)
Sets the value of a TIME field.
struct _RFC_FIELD_DESC RFC_FIELD_DESC
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetTypeDesc(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *typeName, RFC_ERROR_INFO *errorInfo)
Returns the structure description that is valid for the system to which rfcHandle points to...
_RFC_ERROR_GROUP
Groups several error conditions together, depending on the "layer" to which they belong.
Definition: sapnwrfc.h:178
date/week, 4-byte integer
Definition: sapnwrfc.h:117
DECL_EXP RFC_RC SAP_API RfcSetBytes(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
Sets the given byte value (byteValue/valueLength) into the field.
_RFCTYPE
RFCTYPE is used in field descriptions (RFC_FIELD_DESC) and parameter descriptions (RFC_PARAMETER_DESC...
Definition: sapnwrfc.h:91
DECL_EXP RFC_RC SAP_API RfcGetPartnerSNCName(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC *sncName, unsigned length, RFC_ERROR_INFO *errorInfo)
Gets the partner's SNC name, if any.
DecFloat34 RFC_DECF34
IEEE 754r decimal floating point, 16 bytes.
Definition: sapnwrfc.h:68
DECL_EXP RFC_RC SAP_API RfcGetParentClassesCount(RFC_CLASS_DESC_HANDLE classDesc, unsigned *parentClassesCount, RFC_ERROR_INFO *errorInfo)
Returns the number of parent classes of the given class.
DECL_EXP RFC_RC SAP_API RfcMoveToLastRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Positions the table cursor at the last row (or at index "-1", if the table is empty).
DECL_EXP RFC_RC SAP_API RfcSetWebsocketPingInterval(unsigned pingInterval, RFC_ERROR_INFO *errorInfo)
Sets the global idle time interval of a Websocket server connection in seconds after which a keep ali...
struct _RFC_CERTIFICATE_DATA RFC_CERTIFICATE_DATA
DECL_EXP RFC_RC SAP_API RfcGetIntByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT *value, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as RFC_INT (signed).
DECL_EXP RFC_RC SAP_API RfcGetXStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned *xstringLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as byte array.
4-byte integer
Definition: sapnwrfc.h:101
The received data has an unsupported format.
Definition: sapnwrfc.h:146
enum _RFC_AUTHENTICATION_TYPE RFC_AUTHENTICATION_TYPE
A function call completed processing. This event can probably be ignored by 99% of the applications...
Definition: sapnwrfc.h:542
DECL_EXP RFC_RC SAP_API RfcDestroyTypeDesc(RFC_TYPE_DESC_HANDLE typeHandle, RFC_ERROR_INFO *errorInfo)
Deletes the type description and releases the allocated resources.
struct _RFC_UNIT_IDENTIFIER RFC_UNIT_IDENTIFIER
DECL_EXP RFC_RC SAP_API RfcInstallAuthenticationCheckHandler(RFC_ON_AUTHENTICATION_CHECK onAuthenticationCheck, RFC_ERROR_INFO *errorInfo)
Installs an optional function for performing authentication checks on incoming login attempts...
Structure passed to the RFC_SERVER_AUTHORIZATION_HANDLER giving some security related information abo...
Definition: sapnwrfc.h:265
const SAP_UC * name
The name of the connection parameter, like ashost, user, client.
Definition: sapnwrfc.h:610
DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcOpenConnection(RFC_CONNECTION_PARAMETER const *connectionParams, unsigned paramCount, RFC_ERROR_INFO *errorInfo)
Opens an RFC client connection for invoking ABAP function modules in an R/3 backend.
void * extendedDescription
This field can be used by the application programmer (i.e. you) to store arbitrary extra information...
Definition: sapnwrfc.h:668
DECL_EXP RFC_RC SAP_API RfcGetStructureIntoCharBuffer(DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the entire structure value as a single char buffer.
An invalid parameter was passed to an API call, (e.g. invalid name, type or length) ...
Definition: sapnwrfc.h:155
DECL_EXP RFC_RC SAP_API RfcGetDate(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DATE emptyDate, RFC_ERROR_INFO *errorInfo)
Reads a DATE field.
1-byte or multibyte character, fixed size, blank padded
Definition: sapnwrfc.h:93
DECL_EXP RFC_RC SAP_API RfcLoadRepository(SAP_UC const *repositoryID, FILE *const targetStream, RFC_ERROR_INFO *errorInfo)
Retrieves metadata from a JSON formatted text file and creates the according repository to use for fu...
DECL_EXP RFC_RC SAP_API RfcAddParentClass(RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
Sets the parent classes of the given class.
SAP_UC client[3+1]
Sender Client ("Mandant") (optional). Default is "000".
Definition: sapnwrfc.h:302
DECL_EXP RFC_RC SAP_API RfcGetNumberOfCalls(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *numberOfCalls, RFC_ERROR_INFO *errorInfo)
Returns the cumulated number of calls the throughput object recorded since it was attached or since t...
SAP_UC partnerCodepage[4+1]
Partner code page.
Definition: sapnwrfc.h:243
_RFC_CALL_TYPE
Used in RfcGetServerContext() for inquiring the type of an incoming function call from the backend...
Definition: sapnwrfc.h:345
DECL_EXP RFC_CONNECTION_HANDLE SAP_API RfcRegisterServer(RFC_CONNECTION_PARAMETER const *connectionParams, unsigned paramCount, RFC_ERROR_INFO *errorInfo)
Registers a server connection at an SAP gateway.
Requesting or freeing critical sections or mutex failed.
Definition: sapnwrfc.h:168
timestamp/long, 8-byte integer
Definition: sapnwrfc.h:113
Error when dealing with functions provided by the cryptolibrary.
Definition: sapnwrfc.h:166
RFC_RC(SAP_API * RFC_ON_AUTHORIZATION_CHECK)(RFC_CONNECTION_HANDLE rfcHandle, RFC_SECURITY_ATTRIBUTES *secAttributes, RFC_ERROR_INFO *errorInfo)
Definition: sapnwrfc.h:744
Unable to logon to SAP system. Invalid password, user locked, etc.
Definition: sapnwrfc.h:137
unsigned isReadOnly
This attribute is read only if isReadOnly != 0.
Definition: sapnwrfc.h:716
DECL_EXP RFC_RC SAP_API RfcGetNetworkWritingTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *writingTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated time that is used to write to network during the requests, that the throughput ...
DECL_EXP RFC_RC SAP_API RfcGetStringByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_UC *stringBuffer, unsigned bufferLength, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as null-terminated string.
RFC_RC(SAP_API * RFC_ON_CONFIRM_TRANSACTION)(RFC_CONNECTION_HANDLE rfcHandle, SAP_UC const *tid)
Definition: sapnwrfc.h:730
enum _RFC_PROTOCOL_TYPE RFC_PROTOCOL_TYPE
SAP_UC abapMsgClass[20+1]
ABAP message ID , or class.
Definition: sapnwrfc.h:215
DECL_EXP RFC_UNIT_HANDLE SAP_API RfcCreateUnit(RFC_CONNECTION_HANDLE rfcHandle, RFC_UNITID uid, SAP_UC const *queueNames[], unsigned queueNameCount, const RFC_UNIT_ATTRIBUTES *unitAttr, RFC_UNIT_IDENTIFIER *identifier, RFC_ERROR_INFO *errorInfo)
Create a bgRFC unit.
SAP_UC partnerHost[100+1]
Partner host name.
Definition: sapnwrfc.h:234
int RFC_TSECOND
time/second
Definition: sapnwrfc.h:75
DECL_EXP RFC_RC SAP_API RfcGetAuthenticationUser(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC **user, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the user to authenticate in RFC_ON_AUTHENTICATION_CHECK if any is received.
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnConnection(RFC_CONNECTION_HANDLE rfcHandle, RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
Attaches a throughput object to a connection to be monitored by the throughput object.
DECL_EXP RFC_RC SAP_API RfcDescribeMetadataQueryResult(RFC_METADATA_QUERY_RESULT_HANDLE handle, RFC_METADATA_OBJ_TYPE type, unsigned *successful, unsigned *failed, RFC_ERROR_INFO *errorInfo)
Describes the metadata query resultReturns the number of succeeded and failed entries in the metadata...
DECL_EXP RFC_RC SAP_API RfcGetTotalTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *totalTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated time of call durations the throughput object recorded since it was attached or ...
DECL_EXP RFC_RC SAP_API RfcDestroyFunction(RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
Releases all memory used by the data container.
DECL_EXP RFC_RC SAP_API RfcAddTypeField(RFC_TYPE_DESC_HANDLE typeHandle, const RFC_FIELD_DESC *fieldDescr, RFC_ERROR_INFO *errorInfo)
Adds a new field to the type description.
Handle to a data container for an ABAP object instance.
unsigned nucOffset
Field offset in bytes in a 1-byte-per-SAP_CHAR system.
Definition: sapnwrfc.h:627
DECL_EXP RFC_RC SAP_API RfcGetSaplogonEntry(SAP_UC *saplogonID, RFC_CONNECTION_PARAMETER **entryParameters, unsigned *numParameters, RFC_ERROR_INFO *errorInfo)
Retrieves all connection parameters corresponding to the given ID from the saplogon.ini or SAPUILandscape.xml file.
Handle to a general data container (structure, table or function module).
Definition: sapnwrfc.h:422
DECL_EXP RFC_RC SAP_API RfcDestroyThroughput(RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
Releases all memory used by the throughput object.
RFC_SERVER_STATE oldState
Previous state of the given server.
Definition: sapnwrfc.h:566
DECL_EXP RFC_RC SAP_API RfcSetMaximumCpicConversations(unsigned maxCpicConversations, RFC_ERROR_INFO *errorInfo)
Sets the maximum number of concurrent CPIC conversations.
DECL_EXP RFC_RC SAP_API RfcSetInt2(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT2 value, RFC_ERROR_INFO *errorInfo)
Sets the value of an INT2 field.
RFC_RC(SAP_API * RFC_FUNC_DESC_CALLBACK)(SAP_UC const *functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle)
Definition: sapnwrfc.h:732
DECL_EXP RFC_RC SAP_API RfcInstallBgRfcHandlers(SAP_UC const *sysId, RFC_ON_CHECK_UNIT onCheckFunction, RFC_ON_COMMIT_UNIT onCommitFunction, RFC_ON_ROLLBACK_UNIT onRollbackFunction, RFC_ON_CONFIRM_UNIT onConfirmFunction, RFC_ON_GET_UNIT_STATE onGetStateFunction, RFC_ERROR_INFO *errorInfo)
Installs the necessary callback functions for processing incoming bgRFC calls.
SAP_UC key[128]
Exception key.
Definition: sapnwrfc.h:679
RFC_INT8 RFC_UTCLONG
timestamp/long
Definition: sapnwrfc.h:69
DECL_EXP RFC_RC SAP_API RfcGetStringLengthByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
Returns the length of the value of a STRING or XSTRING parameter.
_RFC_UNIT_STATE
Used in RfcGetUnitState() for inquiring the processing status of a background Unit that we (or someon...
Definition: sapnwrfc.h:326
SAP_UC host[100+1]
Own host name.
Definition: sapnwrfc.h:233
DECL_EXP RFC_RC SAP_API RfcAddClassAttribute(RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
Adds a new attribute (field, structure, table, method) to the class description.
struct _RFC_SERVER_MONITOR_DATA RFC_SERVER_MONITOR_DATA
DECL_EXP RFC_RC SAP_API RfcLanguageIsoToSap(const SAP_UC *laiso, SAP_UC *lang, RFC_ERROR_INFO *errorInfo)
Converts a 2-char SAP language code to the 1-char SAP language code.
DECL_EXP RFC_RC SAP_API RfcAddFunctionDesc(SAP_UC const *repositoryID, RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO *errorInfo)
Adds a function description to the cache for the specified R/3 System.
Not supported data type.
Definition: sapnwrfc.h:104
unsigned isStateful
Specifies whether the current server connection is processing stateful RFC requests (assigned permane...
Definition: sapnwrfc.h:363
int isActive
1, if this connection is currently processing a call, 0, if it is idle.
Definition: sapnwrfc.h:579
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcAppendNewRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Appends a new empty row at the end of the table and moves the table cursor to that row...
DECL_EXP RFC_RC SAP_API RfcSetSocketTraceLevel(unsigned traceLevel, RFC_ERROR_INFO *errorInfo)
Sets the global Websocket trace level used by the underlying NI libabry to write tracing information ...
DECL_EXP RFC_RC SAP_API RfcSetStructureFromCharBuffer(DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Set single char value buffer to the entire structure.
struct _RFC_FUNCTION_DESC_HANDLE * RFC_FUNCTION_DESC_HANDLE
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByIndex(RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
Reads the metadata description of the class attribute.
8-byte integer
Definition: sapnwrfc.h:112
DECL_EXP RFC_RC SAP_API RfcDeleteAllRows(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Deletes all rows from the table.
unsigned decimals
If the field is of type "packed number" (BCD), this member gives the number of decimals.
Definition: sapnwrfc.h:632
Structure containing the error that occurred during the metadata query.
Definition: sapnwrfc.h:5369
SAP_UC language[2+1]
Language.
Definition: sapnwrfc.h:239
DECL_EXP RFC_RC SAP_API RfcGetRowCount(RFC_TABLE_HANDLE tableHandle, unsigned *rowCount, RFC_ERROR_INFO *errorInfo)
Returns the number of rows in a table.
_RFC_AUTHENTICATION_TYPE
Type of authentication method used by the backend authentication handler (RFC_ON_AUTHENTICATION_CHECK...
Definition: sapnwrfc.h:372
ABAP Exception raised in ABAP function modules.
Definition: sapnwrfc.h:181
_RFC_DIRECTION
Used in RFC_PARAMETER_DESC::direction for specifying the direction of a function module parameter...
Definition: sapnwrfc.h:642
DECL_EXP RFC_RC SAP_API RfcCleanup(void)
Freeing of internal variablesObsolete.
DECL_EXP RFC_RC SAP_API RfcMoveToNextRow(RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
Increments the table cursor by one.
DECL_EXP RFC_RC SAP_API RfcAddServerSessionChangedListener(RFC_SERVER_HANDLE serverHandle, RFC_SERVER_SESSION_CHANGE_LISTENER sessionChangeListener, RFC_ERROR_INFO *errorInfo)
Adds a session change listener to this server.
DECL_EXP const SAP_UC *SAP_API RfcGetDirectionAsString(RFC_DIRECTION direction)
Converts an RFC_DIRECTION direction indicator to a human readable string for logging purposes...
DECL_EXP RFC_RC SAP_API RfcSetTable(DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO *errorInfo)
Copies the given table into the target table of the parent container.
SAP_UC partnerIPv6[45+1]
Partner IPv6.
Definition: sapnwrfc.h:255
_RFC_PROTOCOL_TYPE
Used in state information in order to indicate the different types of RFC programs, RFC Server types, etc.
Definition: sapnwrfc.h:492
DECL_EXP RFC_RC SAP_API RfcIsParameterActive(RFC_FUNCTION_HANDLE funcHandle, SAP_UC const *paramName, int *isActive, RFC_ERROR_INFO *errorInfo)
Query whether a parameter is active.
Import parameter. This corresponds to ABAP IMPORTING parameter.
Definition: sapnwrfc.h:644
SAP_UC * sysId
Calling ABAP system ID.
Definition: sapnwrfc.h:268
DECL_EXP RFC_RC SAP_API RfcDestroyServerConnectionMonitorData(unsigned numberOfConnections, RFC_SERVER_MONITOR_DATA *connectionData, RFC_ERROR_INFO *errorInfo)
Releases all internal memory hold by monitor data object.
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcCreateClassDesc(SAP_UC const *name, RFC_ERROR_INFO *errorInfo)
Creates an empty class description with the given name.
DECL_EXP RFC_RC SAP_API RfcInstallPassportManager(RFC_PM_CALLBACK onClientCallStart, RFC_PM_CALLBACK onClientCallEnd, RFC_PM_CALLBACK onServerCallStart, RFC_PM_CALLBACK onServerCallEnd, RFC_ERROR_INFO *errorInfo)
Installs the necessary callback functions for processing Extended Passport (EPP) events.
date/day , 4-byte integer
Definition: sapnwrfc.h:116
struct _RFC_SECURITY_ATTRIBUTES * P_RFC_SECURITY_ATTRIBUTES
DECL_EXP RFC_RC SAP_API RfcGetAuthenticationCertificateData(RFC_AUTHENTICATION_HANDLE authenticationHandle, const RFC_CERTIFICATE_DATA **certificateData, RFC_ERROR_INFO *errorInfo)
Gets the certificate chain for authentication in RFC_ON_AUTHENTICATION_CHECK if x509 authentication m...
DECL_EXP RFC_RC SAP_API RfcInstallAuthorizationCheckHandler(RFC_ON_AUTHORIZATION_CHECK onAuthorizationCheck, RFC_ERROR_INFO *errorInfo)
Installs an optional callback function for performing authorization checks on incoming function calls...
SAP_UC partnerIP[15+1]
Partner IP.
Definition: sapnwrfc.h:254
DECL_EXP RFC_RC SAP_API RfcGetAuthenticationAssertionTicket(RFC_AUTHENTICATION_HANDLE authenticationHandle, const SAP_UC **assertionTicket, unsigned *length, RFC_ERROR_INFO *errorInfo)
Gets the assertionTicket for authentication in RFC_ON_AUTHENTICATION_CHECK if SSO based authenticatio...
DECL_EXP RFC_RC SAP_API RfcSetCpicKeepalive(unsigned timeout, RFC_ERROR_INFO *errorInfo)
Activates the CPIC keepalive.
DECL_EXP RFC_RC SAP_API RfcGetServerTime(RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *serverTime, RFC_ERROR_INFO *errorInfo)
Returns the cumulated execution time of the requests at the server, that the throughput object record...
DECL_EXP RFC_RC SAP_API RfcSetDateByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DATE date, RFC_ERROR_INFO *errorInfo)
Sets the value of a DATE field.
DECL_EXP RFC_RC SAP_API RfcGetCharsByIndex(DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
Returns the value of the specified field as char array.
SAP_UC * user
ABAP User.
Definition: sapnwrfc.h:270
DECL_EXP RFC_RC SAP_API RfcGetClassName(RFC_CLASS_DESC_HANDLE classDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO *errorInfo)
Returns the class's DDIC name.
Variable-length raw string, length in bytes.
Definition: sapnwrfc.h:111
int isStateful
If this connection is currently processing a call, this flag indicates, whether it is a stateful or s...
Definition: sapnwrfc.h:580
Means at least one registration is still able to accept request from the gateway (in case of Register...
Definition: sapnwrfc.h:513
Information about an RFC Server returned by RfcGetServerAttributes().
Definition: sapnwrfc.h:524
RFC_CHAR RFC_NUM
Digits, RFCTYPE_NUM /*SAPUNICODEOK_CHARTYPE*/.
Definition: sapnwrfc.h:58
DECL_EXP RFC_RC SAP_API RfcSAPUCToUTF8(const SAP_UC *sapuc, unsigned sapucLength, RFC_BYTE *utf8, unsigned *utf8Size, unsigned *resultLength, RFC_ERROR_INFO *errorInfo)
Converts data in SAP_UC format to UTF-8 format.
struct _RFC_METADATA_QUERY_RESULT_ENTRY RFC_METADATA_QUERY_RESULT_ENTRY