示例#1
0
        public virtual void RFC_FUNCTION_SEARCH(

            [RfcParameter(AbapName = "FUNCNAME", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = false, Direction = RFCINOUT.IN, Length = 30, Length2 = 60)]
            [XmlElement("FUNCNAME", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string FUNCNAME,
            [RfcParameter(AbapName = "GROUPNAME", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 26, Length2 = 52)]
            [XmlElement("GROUPNAME", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string GROUPNAME,
            [RfcParameter(AbapName = "LANGUAGE", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 1, Length2 = 2)]
            [XmlElement("LANGUAGE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string LANGUAGE,
            [RfcParameter(AbapName = "FUNCTIONS", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = false, Direction = RFCINOUT.INOUT)]
            [XmlArray("FUNCTIONS", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref RFCFUNCTable FUNCTIONS)
        {
            try
            {
                object[] results = null;
                results   = this.SAPInvoke("RFC_FUNCTION_SEARCH", new object[] { FUNCNAME, GROUPNAME, LANGUAGE, FUNCTIONS });
                FUNCTIONS = (RFCFUNCTable)results[0];
            }
            catch (SoapException rx)
            {
                throw rx;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        private DataTable RFC_Function_Search(string strFuncName, string strGroupName, string strLang)
        {
            RFCFUNCTable oRfcTbl = null;

            if (this.Connection.IsOpen == false)
            {
                return(null);
            }

            try
            {
                oRfcTbl = new RFCFUNCTable();

                RFC_FUNCTION_SEARCH(strFuncName, strGroupName, strLang, ref oRfcTbl);
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(oRfcTbl.ToADODataTable()); // Converts the SAP table to an ADO.NET DataTable.
        }