Esempio n. 1
0
        public virtual void Bapi_Project_Getinfo(

            [RfcParameter(AbapName = "PROJECT_DEFINITION", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 24, Length2 = 48)]
            [XmlElement("PROJECT_DEFINITION", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string Project_Definition,
            [RfcParameter(AbapName = "WITH_ACTIVITIES", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 1, Length2 = 2)]
            [XmlElement("WITH_ACTIVITIES", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string With_Activities,
            [RfcParameter(AbapName = "WITH_MILESTONES", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 1, Length2 = 2)]
            [XmlElement("WITH_MILESTONES", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string With_Milestones,
            [RfcParameter(AbapName = "WITH_SUBTREE", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 1, Length2 = 2)]
            [XmlElement("WITH_SUBTREE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string With_Subtree,
            [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_PROJECT_DEFINITION_EX E_Project_Definition,
            [RfcParameter(AbapName = "RETURN", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = true, Direction = RFCINOUT.OUT)]
            [XmlElement("RETURN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out BAPIRETURN1 Return0,
            [RfcParameter(AbapName = "E_ACTIVITY_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("E_ACTIVITY_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_NETWORK_ACTIVITY_EXPTable E_Activity_Table,
            [RfcParameter(AbapName = "E_MESSAGE_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("E_MESSAGE_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_METH_MESSAGETable E_Message_Table,
            [RfcParameter(AbapName = "E_WBS_ELEMENT_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("E_WBS_ELEMENT_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_WBS_ELEMENT_EXPTable E_Wbs_Element_Table,
            [RfcParameter(AbapName = "E_WBS_HIERARCHIE_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("E_WBS_HIERARCHIE_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_WBS_HIERARCHIETable E_Wbs_Hierarchie_Table,
            [RfcParameter(AbapName = "E_WBS_MILESTONE_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("E_WBS_MILESTONE_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_WBS_MILESTONE_EXPTable E_Wbs_Milestone_Table,
            [RfcParameter(AbapName = "I_WBS_ELEMENT_TABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            [XmlArray("I_WBS_ELEMENT_TABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            [XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPI_WBS_ELEMENTSTable I_Wbs_Element_Table)
        {
            object[] results = null;
            results = this.SAPInvoke("Bapi_Project_Getinfo", new object[] {
                Project_Definition, With_Activities, With_Milestones, With_Subtree, E_Activity_Table, E_Message_Table, E_Wbs_Element_Table, E_Wbs_Hierarchie_Table, E_Wbs_Milestone_Table, I_Wbs_Element_Table
            });
            E_Project_Definition = (BAPI_PROJECT_DEFINITION_EX)results[0];
            Return0                = (BAPIRETURN1)results[1];
            E_Activity_Table       = (BAPI_NETWORK_ACTIVITY_EXPTable)results[2];
            E_Message_Table        = (BAPI_METH_MESSAGETable)results[3];
            E_Wbs_Element_Table    = (BAPI_WBS_ELEMENT_EXPTable)results[4];
            E_Wbs_Hierarchie_Table = (BAPI_WBS_HIERARCHIETable)results[5];
            E_Wbs_Milestone_Table  = (BAPI_WBS_MILESTONE_EXPTable)results[6];
            I_Wbs_Element_Table    = (BAPI_WBS_ELEMENTSTable)results[7];
        }
        public Boolean GetPrjWBSData(string sProjName,
                                     String sWithActivities,
                                     String sWithMilestones,
                                     String sWithSubtree,
                                     out BAPI_PROJECT_DEFINITION_EX stPrjDef,
                                     out BAPIRETURN1 stBAPIReturn1,
                                     ref BAPI_NETWORK_ACTIVITY_EXPTable arNtwkActy,
                                     ref BAPI_METH_MESSAGETable arMsgs,
                                     ref BAPI_WBS_ELEMENT_EXPTable arWBSELEMEXP,
                                     ref BAPI_WBS_HIERARCHIETable arWBSHRCY,
                                     ref BAPI_WBS_MILESTONE_EXPTable arWBSMLST,
                                     ref BAPI_WBS_ELEMENTSTable arWBSELEMSELECT)
        {
            try
            {
                oSAPProxy.Bapi_Project_Getinfo(sProjName,
                                               sWithActivities,
                                               sWithMilestones,
                                               sWithSubtree,
                                               out stPrjDef,
                                               out stBAPIReturn1,
                                               ref arNtwkActy,
                                               ref arMsgs,
                                               ref arWBSELEMEXP,
                                               ref arWBSHRCY,
                                               ref arWBSMLST,
                                               ref arWBSELEMSELECT);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "CSAPPrj:GetPrjWBSData.");
                stPrjDef      = null;
                stBAPIReturn1 = null;
                return(false);
            }

            return(true);
        }