PARAMETERS p_sub(40) TYPE c.
DATA fssub(40) TYPE c.
fssub = p_sub.
TRY.
PERFORM (fssub) IN PROGRAM ydemo_rick_a. ” IF FOUND.
CATCH cx_sy_dyn_call_illegal_form.
WRITE: ‘The routine’, p_sub COLOR 3, ‘is not exist!’.
ENDTRY.
*&———————————————————————*
*& Form sub_a
*&———————————————————————*
* text
*———————————————————————-*
FORM sub_a.
WRITE: ‘Congratulation! I am routine SUB_A!’.
ENDFORM. “sub_a
*&———————————————————————*
*& Form sub_b
*&———————————————————————*
* text
*———————————————————————-*
FORM sub_b.
WRITE: ‘Congratulation! I am routine sub_b.’.
ENDFORM. “sub_b
***当程序中的FUC不存在的时候 可以补捉到异常报错
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/18299.html