Exemple #1
0
        public virtual void RFC_GET_NAMETAB(

            [RfcParameter(AbapName = "TABNAME", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = false, Direction = RFCINOUT.IN, Length = 30, Length2 = 60)]
            [XmlElement("TABNAME", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string TABNAME,
            [RfcParameter(AbapName = "HEADER", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = true, Direction = RFCINOUT.OUT)]
            [XmlElement("HEADER", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out X030L HEADER,
            [RfcParameter(AbapName = "NAMETAB", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = false, Direction = RFCINOUT.INOUT)]
            [XmlArray("NAMETAB", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref X031LTable NAMETAB)
        {
            object[] results = null;
            results = this.SAPInvoke("RFC_GET_NAMETAB", new object[] {
                TABNAME, NAMETAB
            });
            HEADER  = (X030L)results[0];
            NAMETAB = (X031LTable)results[1];
        }
        private DataTable RFC_Get_TabName(String strTabName, out X030L oHeader)
        {
            X031LTable oNameTab = null;

            oHeader = null;

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

            try
            {
                oNameTab = new X031LTable();
                RFC_GET_NAMETAB(strTabName, out oHeader, ref oNameTab);
            }
            catch (Exception exp)
            {
                throw exp;
            }

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