ABAP-递归的简单例子
1 *求一个数的阶层 2 REPORT y4_b4_test21. 3 4 DATA:n TYPE i . 5 6 n = 4 . 7 8 PERFORM frm_jiecheng USING n . 9 10 WRITE n . 11 12 FORM frm_jiecheng USING n . 13 14 DATA:n_1 TYPE i . 15 16 n_1 = n - 1 . 17 18 IF n = 1 . 19 n = 1 . 20 ELSE . 21 PERFORM frm_jiecheng USING n_1 . 22 n = n * n_1 . 23 ENDIF . 24 25 ENDFORM .