コード例 #1
0
        /// <summary>
        /// Remote Function Module YBAPI_UPD_INSTKEY1.
        /// Update eForm Id to Accounting Doc.
        /// </summary>
        /// <param name="Acckey_Tab">Key of Accounting Doc</param>
        /// <param name="Return0">Return Parameter</param>
        //[RfcMethod(AbapName = "YBAPI_UPD_INSTKEY1")]
        //[SoapDocumentMethodAttribute("http://tempuri.org/YBAPI_UPD_INSTKEY1",
        // RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
        // RequestElementName = "YBAPI_UPD_INSTKEY1",
        // ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
        // ResponseElementName = "YBAPI_UPD_INSTKEY1.Response")]
        public virtual void Ybapi_Upd_Instkey1(

            //    [RfcParameter(AbapName = "ACCKEY_TAB", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCKEY_TAB", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref ZACCKEY2Table Acckey_Tab,
            //[RfcParameter(AbapName = "RETURN", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("RETURN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIRET2Table Return0)
        {
            //object[] results = null;
            //results = this.SAPInvoke("Ybapi_Upd_Instkey1", new object[] {
            //                Acckey_Tab,Return0 });
            //Acckey_Tab = (ZACCKEY2Table)results[0];
            //Return0 = (BAPIRET2Table)results[1];

            IRfcFunction function = destination.Repository.CreateFunction("BAPI_UPD_INSTKEY1");

            #region set parameter value

            function.SetValue("ACCKEY_TAB", Acckey_Tab.GetTable(destination.Repository));
            function.SetValue("RETURN", Return0.GetTable(destination.Repository));

            #endregion

            function.Invoke(destination);


            Acckey_Tab.SetValue(function.GetTable("ACCKEY_TAB")); //Acckey_Tab = (ZACCKEY2Table)results[0];
            Return0.SetValue(function.GetTable("RETURN"));        //Return0 = (BAPIRET2Table)results[1];
        }
コード例 #2
0
        /// <summary>
        /// Remote Function Module YBAPI_EFORMID.
        /// Update eForm Id to Accounting Doc.
        /// </summary>
        /// <param name="I_Bpmuser">BPM User ID</param>
        /// <param name="I_Eformid">eForm Id.</param>
        /// <param name="Acckey_Tab">Key of Accounting Doc</param>
        /// <param name="Return0">Return Parameter</param>
        //[RfcMethod(AbapName = "YBAPI_EFORMID")]
        //[SoapDocumentMethodAttribute("http://tempuri.org/YBAPI_EFORMID",
        // RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
        // RequestElementName = "YBAPI_EFORMID",
        // ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
        // ResponseElementName = "YBAPI_EFORMID.Response")]
        public virtual void Ybapi_Eformid(

            //[RfcParameter(AbapName = "I_BPMUSER", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = false, Direction = RFCINOUT.IN, Length = 8, Length2 = 16)]
            //[XmlElement("I_BPMUSER", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string I_Bpmuser,
            //[RfcParameter(AbapName = "I_EFORMID", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.IN, Length = 10, Length2 = 20)]
            //[XmlElement("I_EFORMID", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            string I_Eformid,
            //[RfcParameter(AbapName = "ACCKEY_TAB", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCKEY_TAB", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref ZACCKEYTable Acckey_Tab,
            //[RfcParameter(AbapName = "RETURN", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("RETURN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIRET2Table Return0)
        {
            //object[] results = null;
            //results = this.SAPInvoke("Ybapi_Eformid", new object[] {
            //                I_Bpmuser,I_Eformid,Acckey_Tab,Return0 });
            //Acckey_Tab = (ZACCKEYTable)results[0];
            //Return0 = (BAPIRET2Table)results[1];

            IRfcFunction function = destination.Repository.CreateFunction("YBAPI_EFORMID");

            #region set parameter value

            function.SetValue("I_BPMUSER", I_Bpmuser);
            function.SetValue("I_EFORMID", I_Eformid);
            function.SetValue("ACCKEY_TAB", Acckey_Tab.GetTable(destination.Repository, function.GetTable("ACCKEY_TAB")));
            function.SetValue("RETURN", Return0.GetTable(destination.Repository, function.GetTable("RETURN")));

            #endregion

            function.Invoke(destination);

            Acckey_Tab.SetValue(function.GetTable("ACCKEY_TAB")); //(string)results[0];
            Return0.SetValue(function.GetTable("RETURN"));        //(string)results[1];
        }
コード例 #3
0
        /// <summary>
        /// Remote Function Module YBAPI_ACC_DOCUMENT_POST_COMMIT.
        /// YAPBAPIINVOICE
        /// </summary>
        /// <param name="Obj_Key">Reference Key</param>
        /// <param name="Obj_Sys">Logical system of source document</param>
        /// <param name="Obj_Type">Reference procedure</param>
        /// <param name="Contractheader">Add. Contract Accounts Recievable and Payable Header Line</param>
        /// <param name="Customercpd">Posting in accounting: Partner billing doc (load receivable)</param>
        /// <param name="Documentheader">Header</param>
        /// <param name="Accountgl">G/L account item</param>
        /// <param name="Accountpayable">Vendor Item</param>
        /// <param name="Accountreceivable">Customer Item</param>
        /// <param name="Accounttax">Tax item</param>
        /// <param name="Contractitem">Add. Contract Accounts Rec. and Payable Document Line Item</param>
        /// <param name="Criteria">Posting in accounting: CO-PA acct assignment characteristics</param>
        /// <param name="Currencyamount">Currency Items</param>
        /// <param name="Extension1">Container for 'Customer Exit' Parameter</param>
        /// <param name="Extension2">Ref. structure for BAPI parameter ExtensionIn/ExtensionOut</param>
        /// <param name="Paymentcard">Payment Card Information</param>
        /// <param name="Realestate">Real Estate Account Assignment Data</param>
        /// <param name="Return0">Return Parameter</param>
        /// <param name="Valuefield">Posting in accounting: CO-PA acct assignment value fields</param>
        //[RfcMethod(AbapName = "YBAPI_ACC_DOCUMENT_POST_COMMIT")]
        //[SoapDocumentMethodAttribute("http://tempuri.org/YBAPI_ACC_DOCUMENT_POST_COMMIT",
        // RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
        // RequestElementName = "YBAPI_ACC_DOCUMENT_POST_COMMIT",
        // ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
        // ResponseElementName = "YBAPI_ACC_DOCUMENT_POST_COMMIT.Response")]
        public virtual void Ybapi_Acc_Document_Post_Commit(
            //[RfcParameter(AbapName = "CONTRACTHEADER", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = true, Direction = RFCINOUT.IN)]
            //[XmlElement("CONTRACTHEADER", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            BAPIACCAHD Contractheader,
            //[RfcParameter(AbapName = "CUSTOMERCPD", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = true, Direction = RFCINOUT.IN)]
            //[XmlElement("CUSTOMERCPD", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            BAPIACPA09 Customercpd,
            //[RfcParameter(AbapName = "DOCUMENTHEADER", RfcType = RFCTYPE.RFCTYPE_STRUCTURE, Optional = false, Direction = RFCINOUT.IN)]
            //[XmlElement("DOCUMENTHEADER", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            BAPIACHE09 Documentheader,
            //[RfcParameter(AbapName = "OBJ_KEY", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.OUT, Length = 20, Length2 = 40)]
            //[XmlElement("OBJ_KEY", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out string Obj_Key,
            //[RfcParameter(AbapName = "OBJ_SYS", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.OUT, Length = 10, Length2 = 20)]
            //[XmlElement("OBJ_SYS", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out string Obj_Sys,
            //[RfcParameter(AbapName = "OBJ_TYPE", RfcType = RFCTYPE.RFCTYPE_CHAR, Optional = true, Direction = RFCINOUT.OUT, Length = 5, Length2 = 10)]
            //[XmlElement("OBJ_TYPE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            out string Obj_Type,
            //[RfcParameter(AbapName = "ACCOUNTGL", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCOUNTGL", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACGL09Table Accountgl,
            //[RfcParameter(AbapName = "ACCOUNTPAYABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCOUNTPAYABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACAP09Table Accountpayable,
            //[RfcParameter(AbapName = "ACCOUNTRECEIVABLE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCOUNTRECEIVABLE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACAR09Table Accountreceivable,
            //[RfcParameter(AbapName = "ACCOUNTTAX", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("ACCOUNTTAX", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACTX09Table Accounttax,
            //[RfcParameter(AbapName = "CONTRACTITEM", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("CONTRACTITEM", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACCAITTable Contractitem,
            //[RfcParameter(AbapName = "CRITERIA", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("CRITERIA", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACKEC9Table Criteria,
            //[RfcParameter(AbapName = "CURRENCYAMOUNT", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = false, Direction = RFCINOUT.INOUT)]
            //[XmlArray("CURRENCYAMOUNT", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACCR09Table Currencyamount,
            //[RfcParameter(AbapName = "EXTENSION1", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("EXTENSION1", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACEXTCTable Extension1,
            //[RfcParameter(AbapName = "EXTENSION2", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("EXTENSION2", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIPAREXTable Extension2,
            //[RfcParameter(AbapName = "PAYMENTCARD", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("PAYMENTCARD", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACPC09Table Paymentcard,
            //[RfcParameter(AbapName = "REALESTATE", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("REALESTATE", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACRE09Table Realestate,
            //[RfcParameter(AbapName = "RETURN", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = false, Direction = RFCINOUT.INOUT)]
            //[XmlArray("RETURN", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIRET2Table Return0,
            //[RfcParameter(AbapName = "VALUEFIELD", RfcType = RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
            //[XmlArray("VALUEFIELD", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            //[XmlArrayItem("item", IsNullable = false, Form = XmlSchemaForm.Unqualified)]
            ref BAPIACKEV9Table Valuefield, bool useEcc)
        {
            //object[] results = null;
            //results = this.SAPInvoke("Ybapi_Acc_Document_Post_Commit", new object[] {
            //                Contractheader,Customercpd,Documentheader,Accountgl,Accountpayable,Accountreceivable,Accounttax,Contractitem,Criteria,Currencyamount,Extension1,Extension2,Paymentcard,Realestate,Return0,Valuefield });

            IRfcFunction function = destination.Repository.CreateFunction("YBAPI_ACC_DOCUMENT_POST_COMMIT");

            #region set parameter value

            function.SetValue("CONTRACTHEADER", Contractheader.GetStructure(destination.Repository));
            function.SetValue("CUSTOMERCPD", Customercpd.GetStructure(destination.Repository, useEcc));
            function.SetValue("DOCUMENTHEADER", Documentheader.GetStructure(destination.Repository));
            function.SetValue("ACCOUNTGL", Accountgl.GetTable(destination.Repository, function.GetTable("ACCOUNTGL")));
            function.SetValue("ACCOUNTPAYABLE", Accountpayable.GetTable(destination.Repository, function.GetTable("ACCOUNTPAYABLE")));
            function.SetValue("ACCOUNTRECEIVABLE", Accountreceivable.GetTable(destination.Repository, function.GetTable("ACCOUNTRECEIVABLE")));
            function.SetValue("ACCOUNTTAX", Accounttax.GetTable(destination.Repository, function.GetTable("ACCOUNTTAX")));
            function.SetValue("CONTRACTITEM", Contractitem.GetTable(destination.Repository, function.GetTable("CONTRACTITEM")));
            function.SetValue("CRITERIA", Criteria.GetTable(destination.Repository, function.GetTable("CRITERIA")));
            function.SetValue("CURRENCYAMOUNT", Currencyamount.GetTable(destination.Repository, function.GetTable("CURRENCYAMOUNT")));
            function.SetValue("EXTENSION1", Extension1.GetTable(destination.Repository, function.GetTable("EXTENSION1")));
            function.SetValue("EXTENSION2", Extension2.GetTable(destination.Repository, function.GetTable("EXTENSION2")));
            function.SetValue("PAYMENTCARD", Paymentcard.GetTable(destination.Repository, function.GetTable("PAYMENTCARD")));
            function.SetValue("REALESTATE", Realestate.GetTable(destination.Repository, function.GetTable("REALESTATE")));
            function.SetValue("RETURN", Return0.GetTable(destination.Repository, function.GetTable("RETURN")));
            function.SetValue("VALUEFIELD", Valuefield.GetTable(destination.Repository, function.GetTable("VALUEFIELD")));

            #endregion

            function.Invoke(destination);

            Obj_Key  = function.GetString("OBJ_KEY");                           //(string)results[0];
            Obj_Sys  = function.GetString("OBJ_SYS");                           //(string)results[1];
            Obj_Type = function.GetString("OBJ_TYPE");                          //(string)results[2];
            Accountgl.SetValue(function.GetTable("ACCOUNTGL"));                 //Accountgl = (BAPIACGL09Table)results[3];
            Accountpayable.SetValue(function.GetTable("ACCOUNTPAYABLE"));       //Accountpayable = (BAPIACAP09Table)results[4];
            Accountreceivable.SetValue(function.GetTable("ACCOUNTRECEIVABLE")); //Accountreceivable = (BAPIACAR09Table)results[5];
            Accounttax.SetValue(function.GetTable("ACCOUNTTAX"));               //Accounttax = (BAPIACTX09Table)results[6];
            Contractitem.SetValue(function.GetTable("CONTRACTITEM"));           //Contractitem = (BAPIACCAITTable)results[7];
            Criteria.SetValue(function.GetTable("CRITERIA"));                   //Criteria = (BAPIACKEC9Table)results[8];
            Currencyamount.SetValue(function.GetTable("CURRENCYAMOUNT"));       //Currencyamount = (BAPIACCR09Table)results[9];
            Extension1.SetValue(function.GetTable("EXTENSION1"));               //Extension1 = (BAPIACEXTCTable)results[10];
            Extension2.SetValue(function.GetTable("EXTENSION2"));               //Extension2 = (BAPIPAREXTable)results[11];
            Paymentcard.SetValue(function.GetTable("PAYMENTCARD"));             //Paymentcard = (BAPIACPC09Table)results[12];
            Realestate.SetValue(function.GetTable("REALESTATE"));               //Realestate = (BAPIACRE09Table)results[13];
            Return0.SetValue(function.GetTable("RETURN"));                      //Return0 = (BAPIRET2Table)results[14];
            Valuefield.SetValue(function.GetTable("VALUEFIELD"));               //Valuefield = (BAPIACKEV9Table)results[15];
        }