コード例 #1
0
        private string ExcuteAbapCode(string Code)
        {
            SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.cboxSystemList1.Text.Trim().ToUpper());

            abap.ResetCode();
            //使用TEXTBOX转换字符串。
            TextBox box = new TextBox();

            box.Text = Code;

            foreach (string line in box.Lines)
            {
                abap.AddCodeLine(line);
            }
            box.Text = "";
            try
            {
                if (abap.InstallAndRun())
                {
                    for (int i = 0; i < abap.ResultLineCount; i++)
                    {
                        box.Text += abap.GetResultLine(i) + "\r\n";
                    }
                }
                else
                {
                    box.Text = "ABAP Error: " + abap.LastABAPSyntaxError;
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
            return(box.Text);
        }
コード例 #2
0
        private string ExcuteAbapCode(String code, String sapSystem)
        {
            SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(sapSystem);
            var result = string.Empty;

            try
            {
                result = abap.InstallAndRun(code);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            return(result);
        }
コード例 #3
0
        private string ExcuteAbapCode(String code, String sapSystem)
        {
            SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(sapSystem);
            var result = string.Empty;
            try
            {
                result = abap.InstallAndRun(code);
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }

            return result;
        }
コード例 #4
0
        private string ExcuteAbapCode(string Code)
        {
            SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.cboxSystemList1.Text.Trim().ToUpper());

            abap.ResetCode();
            //使用TEXTBOX转换字符串。
            TextBox box = new TextBox();
            box.Text = Code;

            foreach (string line in box.Lines)
            {
                abap.AddCodeLine(line);
            }
            box.Text = "";
            try
            {
                if (abap.InstallAndRun())
                {
                    for (int i = 0; i < abap.ResultLineCount; i++)
                    {
                        box.Text += abap.GetResultLine(i) + "\r\n";
                    }
                }
                else
                {
                    box.Text = "ABAP Error: " + abap.LastABAPSyntaxError;
                }

            }
            catch (Exception ee)
            {

                MessageBox.Show(ee.Message);
            }
            return box.Text;
        }