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