ABAP 中的巨集

2021-04-23 05:43:29 字數 475 閱讀 3934

report zcp_saptest2 .

data: result type i,

int1   type i value 1,

int2   type i value 2.

define operation.

result = &1 &2 &3.

output &1 &2 &3 result.

end-of-definition.

define output.

write:/ 'the result of &1 &2 &3 is',&4.

end-of-definition.

operation 1 + 2 .

operation int2 - int1.

執行結果:

the result of 1 + 2 is          3

the result of int2 - int1 is          1

ABAP巨集的除錯

我們都知道高階語言巨集一般是無法除錯的。但是abap的巨集例外。比如我寫了下面一段巨集,名為insert table.執行這段 偵錯程式會在第23行停下來。abap偵錯程式裡有個工具可以用於巨集的除錯,如下圖 雙擊之後,可看到如下除錯介面 按f5即可開始單步除錯。上圖的22,23行strlen,if...

ABAP中的Table Control程式設計 2

上篇講了table control的基本功能,現在繼續討論它在其他方面的一些設定。4,滾動到某行某列 如果我們希望,螢幕顯示後展示在使用者面前的最上端或者左端是表內容中的某行某列,則應該修改變數top line和left col的值。一般可在pbo的tc 0100 change tc attr裡設定...

ABAP程式中的事件

事件流 6個 initialization 初始化 at selection screen 螢幕跳出前 start of selection 取資料 end of selection 展示資料 top of page 普通報表輸出頁頭 end of page 普通報表輸出頁尾 1.load of p...