private string ExcuteAbapCode(string Code) { SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.sapTableField1.SystemName.Trim().ToUpper()); // abap.AddCodeLine(this.txtAbapCode.Text); abap.ResetCode(); TextBox box = new TextBox(); box.Text = Code; foreach (string line in box.Lines) { abap.AddCodeLine(line); } box.Text = ""; try { if (abap.Execute()) { 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); }
private string ExcuteAbapCode(string Code) { SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.sapTableField1.SystemName.Trim().ToUpper()); // abap.AddCodeLine(this.txtAbapCode.Text); abap.ResetCode(); TextBox box = new TextBox(); box.Text = Code; foreach (string line in box.Lines) { abap.AddCodeLine(line); } box.Text = ""; try { if (abap.Execute()) { 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; }
/// <summary> /// 执行ABAP代码。 /// </summary> /// <param name="Code"></param> /// <returns></returns> private string ExcuteAbapCode(string Code) { SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.sapTableField1.SystemName.Trim().ToUpper()); var result = string.Empty; try { result = abap.InstallAndRun(Code); } catch (Exception ex) { MessageBox.Show(ex.Message); } return(result); }
/// <summary> /// 执行ABAP代码。 /// </summary> /// <param name="Code"></param> /// <returns></returns> private string ExcuteAbapCode(string Code) { SAPINT.Utils.ABAPCode abap = new SAPINT.Utils.ABAPCode(this.sapTableField1.SystemName.Trim().ToUpper()); var result = string.Empty; try { result = abap.InstallAndRun(Code); } catch (Exception ex) { MessageBox.Show(ex.Message); } return result; }