/// <summary> /// Check if RFC_RC has errors. /// </summary> /// <param name="rfcRc"></param> /// <param name="errorInfo"></param> /// <param name="cleanction">>Method to be executed before throwing exception</param> internal static void OnErrorThrowException(this RFC_RC rfcRc, RFC_ERROR_INFO errorInfo, Action cleanction = null) { if (rfcRc == RFC_RC.RFC_OK) { return; } cleanction?.Invoke(); throw new RfcException(errorInfo.Message); }
internal RfcErrorInfo(RFC_ERROR_INFO errorInfo) { Code = (ErrorCode)errorInfo.Code; Group = (ErrorGroup)errorInfo.Group; Key = errorInfo.Key; Message = errorInfo.Message; AbapMsgClass = errorInfo.AbapMsgClass; AbapMsgType = errorInfo.AbapMsgType; AbapMsgNumber = errorInfo.AbapMsgNumber; AbapMsgV1 = errorInfo.AbapMsgV1; AbapMsgV2 = errorInfo.AbapMsgV2; AbapMsgV3 = errorInfo.AbapMsgV3; AbapMsgV4 = errorInfo.AbapMsgV4; }
public static extern RFC_RC RfcMoveToNextRow(IntPtr tableHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcInvoke(IntPtr rfcHandle, IntPtr funcHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcSetXString(IntPtr dataHandle, string name, byte[] byteValue, uint bufferLength, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcSetString(IntPtr dataHandle, string name, string value, uint valueLength, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetTime(IntPtr dataHandle, string name, char[] emptyTime, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcDeleteAllRows(IntPtr tableHandle, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcCreateTable(IntPtr typeDescHandle, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcGetFunctionDesc(IntPtr rfcHandle, string funcName, out RFC_ERROR_INFO errorInfo);
internal static extern RFC_RC RfcSetTraceLevel(IntPtr connection, string destination, uint traceLevel, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcOpenConnection(RFC_CONNECTION_PARAMETER[] connectionParams, uint paramCount, out RFC_ERROR_INFO errorInfo);
internal static extern RFC_RC RfcIsConnectionHandleValid(IntPtr rfcHandle, ref int isValid, out RFC_ERROR_INFO errorInfo);
internal static extern RFC_RC RfcPing(IntPtr rfcHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcMoveTo(IntPtr tableHandle, uint index, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcDestroyFunction(IntPtr funcHandle, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcGetCurrentRow(IntPtr tableHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetInt(IntPtr dataHandle, string name, out int value, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcAppendNewRow(IntPtr tableHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetChars(IntPtr dataHandle, string name, char[] charBuffer, uint bufferLength, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcSetDate(IntPtr dataHandle, string name, char[] date, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetStructure(IntPtr dataHandle, string name, out IntPtr structHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcSetInt8(IntPtr dataHandle, string name, long value, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetTable(IntPtr dataHandle, string name, out IntPtr tableHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetString(IntPtr dataHandle, string name, ref char[] stringBuffer, uint valueLength, out uint stringLength, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcGetRowCount(IntPtr tableHandle, out uint rowCount, out RFC_ERROR_INFO errorInfo);
public static extern IntPtr RfcCreateFunction(IntPtr funcDescHandle, out RFC_ERROR_INFO errorInfo);
public static extern RFC_RC RfcCloseConnection(IntPtr rfcHandle, out RFC_ERROR_INFO errorInfo);