Ejemplo n.º 1
0
        public virtual void Bapi_Bus2001_Getdata(

            [RfcParameter(AbapName = "I_LANGUAGE", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 2, Length2 = 4)]
            [XmlElement("I_LANGUAGE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string I_Language,
            [RfcParameter(AbapName = "I_PROJECT_DEFINITION", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = false, Direction = RFCINOUT.IN, Length = 24, Length2 = 48)]
            [XmlElement("I_PROJECT_DEFINITION", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string I_Project_Definition,
            [RfcParameter(AbapName = "E_PROJECT_DEFINITION", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = true, Direction = RFCINOUT.OUT)]
            [XmlElement("E_PROJECT_DEFINITION", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out BAPI_BUS2001_DETAIL E_Project_Definition,
            [RfcParameter(AbapName = "ET_RETURN", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("ET_RETURN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIRET2Table Et_Return,
            [RfcParameter(AbapName = "EXTENSIONIN", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("EXTENSIONIN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIPAREXTable Extensionin,
            [RfcParameter(AbapName = "EXTENSIONOUT", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("EXTENSIONOUT", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIPAREXTable Extensionout)
        {
            object[] results = null;
            results = this.SAPInvoke("Bapi_Bus2001_Getdata", new object[] {
                I_Language, I_Project_Definition, Et_Return, Extensionin, Extensionout
            });
            E_Project_Definition = (BAPI_BUS2001_DETAIL)results[0];
            Et_Return            = (BAPIRET2Table)results[1];
            Extensionin          = (BAPIPAREXTable)results[2];
            Extensionout         = (BAPIPAREXTable)results[3];
        }
        public Boolean GetProjectDefData(String sLang,
                                         string sProjName,
                                         ref BAPI_BUS2001_DETAIL stProjectDetail)
        {
            BAPIRET2Table  ETReturn     = new BAPIRET2Table();
            BAPIPAREXTable Extensionin  = new BAPIPAREXTable();
            BAPIPAREXTable Extensionout = new BAPIPAREXTable();

            try
            {
                oSAPProxy.Bapi_Bus2001_Getdata(sLang, sProjName,
                                               out stProjectDetail,
                                               ref ETReturn,
                                               ref Extensionin,
                                               ref Extensionout);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "CSAPPrj:GetProjectDefData.");
                return(false);
            }

            return(true);
        }