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